AnsweredAssumed Answered

ExecuteSQL() - AM I JUST NOT GETTING IT?!?

Question asked by JeffMillard on Jul 24, 2013
Latest reply on Jul 25, 2013 by philmodjunk

Title

ExecuteSQL() - AM I JUST NOT GETTING IT?!?

Post

     Was so pleased to find this feature...and so amazed at how qwerky it seems to implement.  I built a VERY simple database example trying to do a select with a where clause. Without the where clause $$SQL1/$$RESULT1 works fine but the second query $$SQL2/$$RESULT2  it I get no data and no error.  

     Set Variable [$$SQL1;Value:"SELECT NAME FROM PRODUCTS"]
     Set Variable [$$RESULT1;Value:ExecuteSQL ($$SQL1;",";",")]
     Set Variable [$$SQL2;Value:"SELECT NAME FROM PRODUCTS WHERE NAME = PEAR"]
     Set Variable [$$RESULT2;Value:ExecuteSQL ($$SQL2;",";",")]

     PRODUCTS table has two fields KEY, NAME and records

     1,APPLE
     2,PEAR
     3,BANANA

     First QUERY returns APPLE,PEAR,BANANA

     Second a "?"

     What Gives? Also tried changing where clause to WHERE KEY = 1... no luck.

      

Outcomes