5 Replies Latest reply on Jul 15, 2016 2:13 PM by ragava28

    How to execute queries from Squirrel which has input vaiables

    ragava28

      Hi All,

      I am trying to execute below lines of code from Squirrel Tool  by connecting to VDB(which has only 1 data source),Which always fails saying expecting something ,but if we package this into store procedure in VDB it works fine. I am not sure is going wrong while executing from Squirrel.


      1.     Can we execute queries from Squirrel which has input parameters as variables? as shown in below code. So that I can build complete query in Squirrel & paste it as it is to the VDB store procedure.


      Reason for my question. every time  I build long queries in Squirrel & converting them to store procedure is taking more time. A good example of this would be SQL server management Studio

          

      Please share your suggestions on this.


      ======================================================

      BEGIN

        DECLARE string VARIABLES.varUserName = 'Test';

        SELECT * FROM AspNetUsers Where UserName=VARIABLES.varUserName;

      END;

      =======================================================


      ErrorScreen.png