Issue in executing query

Hi All,

I am facing issue in Executing query.Getting below error.
Execute query on CA2PD: ORA-00972: identifier is too long

Below is the query

SELECT A.group_id, B.external_system_id as “Tenant_id” FROM (SELECT group_id FROM customer_group WHERE customer_group_id IN (SELECT customer_group_id FROM customer_group_mapping WHERE owner_id IN (SELECT address_id FROM address_mapping WHERE owner_id IN (SELECT directory_number_id FROM directory_number WHERE directory_number IN (‘4175811051’,‘4177317144’,‘4177317145’,‘4177317146’,‘4177317147’,‘4177317148’,‘4175811051’) AND status_cd IN (11, 16, 21)) AND mapping_close_date IS NULL AND status_cd IN (11, 21) AND owner_type = ‘DIRECTORY_NUMBER’) AND owner_type = ‘ADDRESS’ AND status_cd IN (21, 11))) A,(SELECT external_system_id FROM external_system_data WHERE OWNER_ID IN(SELECT account_id FROM directory_number WHERE directory_number IN (‘4175811051’,‘4177317144’,‘4177317145’,‘4177317146’,‘4177317147’,‘4177317148’,‘4175811051’) AND dn_close_date IS NULL and STATUS_CD in (11,16,21))AND OWNER_TYPE = ‘ACCOUNT’ AND external_system_name IN (‘NETWORK_SYSTEM’)) B

Does the query work outside of UiPath?

Yes its work when i execute manually

How are you entering the query in the query activity? Can you share a photo of the query text in the activity? UiPath can be finicky with double quotes within the string if you miss one.

If you are putting the query text directly in the activity, try putting your query script in a text file, then read text file to save it as a Variable, then use the variable in the query activity.