Forum Discussion

Cheyenne's avatar
Cheyenne
New Contributor
5 years ago

q.where string (query)

Greetings, I am working on my first ever REST API and thank you in advance for your guidance.

 

I am trying to locate the correct syntax for my query :  CRD_Connect=True, have tried some different things, but can't seem to get it to work.

 

Cheers!

 

 

 

 

  • Hey Cheyenne 

     

    Can you just please clarify cos I cant tell whats going on with your minimal screenshot.

     

    Is this part of querybuilder in a JDBC step?

     

    Rather than use the GUI to build queries - just plug your SQL directly into the JDBC input field - it's a lot more straight forward.

     

    From your screenshot - I can't tell what 'q.where' is other than this is your where clause?????

     

    in the 'string (query)' row you have the value CRD_Connect = True

     

    Is CRD_Connect a column in a table?  

     

    Hold it - I just realised - the CRD_Connect =  True - is this what forms your where clause in your query?

     

    If that's the case - then as True is a string/text value - you need to wrap the value in single quote characters - e.g. 'True'

     

    Cheers,

     

    rich

  • richie's avatar
    richie
    Community Hero

    Hey Cheyenne 

     

    Can you just please clarify cos I cant tell whats going on with your minimal screenshot.

     

    Is this part of querybuilder in a JDBC step?

     

    Rather than use the GUI to build queries - just plug your SQL directly into the JDBC input field - it's a lot more straight forward.

     

    From your screenshot - I can't tell what 'q.where' is other than this is your where clause?????

     

    in the 'string (query)' row you have the value CRD_Connect = True

     

    Is CRD_Connect a column in a table?  

     

    Hold it - I just realised - the CRD_Connect =  True - is this what forms your where clause in your query?

     

    If that's the case - then as True is a string/text value - you need to wrap the value in single quote characters - e.g. 'True'

     

    Cheers,

     

    rich

    • Cheyenne's avatar
      Cheyenne
      New Contributor

      Thank you SOO much Rich, you are spot on!!
      This query in the Swagger REST API UI gave me the needed results.  CRD_'Connect'

       

      Really appreciate your time!