14 Replies Latest reply on Nov 21, 2016 11:24 AM by jfletch

    ExecuteSQL FROM with a v?


      I have been looking at a very good demo that uses executeSQL to gather data for a virtual list.  The from statement appears to have an argument with a value of v in it.   What is the purpose of the v argument?


      The executeSQL statement is in a set variable script step and uses substitution to develop the text of the statement.  The initial setup is:


        Let ( [ $~sql = "

          SELECT ~level

          FROM ~@Values v

          WHERE ~id=?";


      SELECT ~level FROM ~@Values v WHERE ~id=?


      The actual query is:

      $sqlResult = ExecuteSQL ( $sqlQuery ; "" ; "" ; $id )


      The query appears to work with and without the v in the FROM statement.  I am very far from being an expert on SQL but my experience is that it is very syntax sensitive and have an invalid argument usually results in a ? or error as a result.


      Thanks for you help with this.  I know curiosity will killed the cat.. but I am curious about this.