Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Issue while using enhanced query

saimeghana
Regular Contributor II
Regular Contributor II

Hi Team,

We are using below Query, when we try to save the query it is throwing the error.

SELECT
entitlement_Valuekey as entitlement_values__primarykey,
CASE
WHEN entitlement_value LIKE '%,OU=Administration,OU=GROUPS,DC=net' THEN 1
WHEN entitlement_value LIKE '%,OU=Administration,OU=Groups,DC=net' THEN 1
WHEN entitlement_value LIKE '%,OU=18,OU=GROUPS,DC=net' THEN 1
ELSE customproperty40
END AS entitlement_values__customproperty40,
CASE
WHEN entitlement_value LIKE '%,OU=Administration,OU=GROUPS,DC=net' THEN 'Common'
WHEN entitlement_value LIKE '%,OU=Administration,OU=Groups,DC=net' THEN 65
WHEN entitlement_value LIKE '%,OU=18,OU=GROUPS,DC=net' THEN 18
ELSE customproperty20
END AS entitlement_values__customproperty20
FROM
entitlement_values
WHERE
entitlement_value LIKE '%,OU=Administration,OU=GROUPS,DC=net'
OR entitlement_value LIKE '%,OU=Administration,OU=Groups,DC=net'
OR entitlement_value LIKE '%,OU=18,OU=GROUPS,DC=net';

Error:

saimeghana_0-1713454256035.png

Thanks & Regards,

Sai Meghana

3 REPLIES 3

Raghu
Valued Contributor III
Valued Contributor III

@saimeghana  your query is correct only , am able save similar case i passed same format but diffent name

check your end and share logs


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

saimeghana
Regular Contributor II
Regular Contributor II

Hi Raghu,

Thank you, issue resolved missing '_' in one of the case statements.

Regards,

Sai Meghana

rushikeshvartak
All-Star
All-Star

SELECT
entitlement_Valuekey AS entitlement_values__primarykey,
CASE
WHEN entitlement_value LIKE '%,OU=Administration,OU=GROUPS,DC=net' THEN 1
WHEN entitlement_value LIKE '%,OU=Administration,OU=Groups,DC=net' THEN 1
WHEN entitlement_value LIKE '%,OU=18,OU=GROUPS,DC=net' THEN 1
ELSE customproperty40
END AS entitlement_values__customproperty40,
CASE
WHEN entitlement_value LIKE '%,OU=Administration,OU=GROUPS,DC=net' THEN 'Common'
WHEN entitlement_value LIKE '%,OU=Administration,OU=Groups,DC=net' THEN 65
WHEN entitlement_value LIKE '%,OU=18,OU=GROUPS,DC=net' THEN 18
ELSE customproperty20
END AS entitlement_values__customproperty20
FROM
entitlement_values
WHERE
entitlement_value LIKE '%,OU=Administration,OU=GROUPS,DC=net'
OR entitlement_value LIKE '%,OU=Administration,OU=Groups,DC=net'
OR entitlement_value LIKE '%,OU=18,OU=GROUPS,DC=net';


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.