1 2 Previous Next 25 Replies Latest reply on May 23, 2012 5:16 AM by beverly

    Help with Execute SQL

    pmconaway

      Ok, I need some syntax help with the ExecuteSQL function. I can't get it to return a valid response.

       

      I have a table "Regional Data_DB" and a field in that table "CTYNAMEA"

       

      Here is the SQL I would like to run "Select distinct(CTYNAMEA) from Regional Data_DB"

       

      I have a set variable script step with the following ExecuteSQL function as the calculated result. I assumed that the command as it stands now would return a list into the variable of all the counties listed in the records in that table. I figured a basic select statement returning one field should work. Unfortunately I can't make it work. The value returned is "?" which I am assuming is undefined.

       

      "ExecuteSQL ( "Select Regional Data DistrictIRN 2.CTYNAMEA from Regional Data Data_DB" ;"" ;"" )"

       

      What am I doing wrong? Thanks.

       

       

      Paul

        1 2 Previous Next