AnsweredAssumed Answered

SQL Where

Question asked by Tom_Droz on Sep 5, 2017
Latest reply on Sep 5, 2017 by beverly

Hi all

 

The SQL functions are just not well documented (as far as I can tell anyway).

 

I have a statement that works fine but when I want to enter a WHERE it fails.  I am trying to only get records where "Status" = "Sale Pending" or "Sale Pending Can Still Be shown"

 

I have a couple custom functions (GFN, GTN) but they are unimportant here (I Think).  Below works, but without the "WHERE"  Can anyone suggest how to add the above Where?

 

Thanks, any good reference for this and future questions is appreciated too!

 

ExecuteSQL (
//sqlQuery
"SELECT " & GFN ( ATR::__kp_ATR_ID )& ", " & GFN (ATR::Subject_Address_w_Est_closing)&
" FROM "  & GTN ( ATR::__kp_ATR_ID) &
" ORDER BY " & GFN ( ATR::Expected First Contact ) & " ASC" &
Case($$VehicleOffSet>0;" OFFSET "  & $$VehicleOffSet*25  & " ROWS ") &
" FETCH FIRST 30 ROWS ONLY"

;
//fieldSeparator
" | ";
//rowSeparator
"¶" ;
"Sale Pending"
)

Outcomes