Post

1 follower Follow
0
Avatar

CZQL - Syntax Help

 Hi,

The below mentioned query runs perfectly -

curl  -H "Authorization: Session 1563d923-6487-40f2-9ef3-1ed65479784e_23787713" -X POST https://api2.clarizen.com/V2.0/services/data/query -d '{q:"SELECT
BillingAddress,BusinessAddress,CreatedBy,CreatedOn,Name,ExternalID,
SYSID,EntityType,LastUpdatedBy,LastUpdatedOn,LastUpdatedBySystemOn,InternalId,LastDateContacted FROM Customer",
paging: {"hasMore": false,"limit": 100000}}'

But when i add a where condition as below, it fails -

curl -H "Authorization: Session 1563d923-6487-40f2-9ef3-1ed65479784e_23787713" -X POST https://api2.clarizen.com/V2.0/services/data/query -d '{q:"SELECT
BillingAddress,BusinessAddress,CreatedBy,CreatedOn,Name,ExternalID,
SYSID,EntityType,LastUpdatedBy,LastUpdatedOn,LastUpdatedBySystemOn,InternalId,LastDateContacted FROM Customer (WHERE BillingAddress="abc")",
paging: {"hasMore": false,"limit": 100000}}'

Can you help or provide guidance ?

Sahil Batra Answered

Please sign in to leave a comment.

1 comment

1
Avatar

Please ignore but adding the response for any one else -

I was able to resolve this problem by changing the syntax and escaping the double quotes -

curl -H "Authorization: Session 1563d923-6487-40f2-9ef3-1ed65479784e_23787713" -X POST https://api2.clarizen.com/V2.0/services/data/query -d '{q:"SELECT
BillingAddress,BusinessAddress,CreatedBy,CreatedOn,Name,ExternalID,
SYSID,EntityType,LastUpdatedBy,LastUpdatedOn,LastUpdatedBySystemOn,InternalId,LastDateContacted FROM Customer WHERE BillingAddress=\"abc\"",
paging: {"hasMore": false,"limit": 100000}}'

 

Sahil Batra 1 vote
Comment actions Permalink