Announcement

Collapse
No announcement yet.

Listing with Where Clause

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Listing with Where Clause

    From: Tony Tomlinson
    Sent: Wednesday, August 01, 2007
    To: Support
    Subject: listing question

    Hi all,

    I am running listings using QueryDetail, is there a where statement I can use to only list those with a query code starting with CM or AE? (example: where querycode='AE*') I know the asterik doesn't work, is there another way?

    Tony
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


    Hi Tony,

    To search for querycodes whose first two characters begin with AE, you can use a substring function on the variable in the where clause; for example:

    substr(querycode,1,2)=’AE’;

    That function will take the position specified by the first integer and a length of the second integer from the variable specified and return its value.

    Peter Loonan
Working...
X