0

I'm running this query

      SET @Qry = ' SELECT [MLSTQT] INTO ##DISPENSED_LOCATION' 
              +' FROM OPENQUERY(MA,''SELECT MLSTQT FROM ES3.MD.MOC   WHERE MLWHSL='''+    @ProcessOrder+''' '')'
        EXEC (@Qry)

And I'm getting an error saying that there is incorrect syntax next to the value @ProcessOrder.

What's wrong with my query?

Seems it would be WHERE MLWHSL='10000' which is correct.

Jack Reilly
  • 158
  • 2
  • 14

0 Answers0