I did slightly more testing with the same query.
The error goes away if I put the caret within the first few declaration and variable assignment lines of the query:
DECLARE
@Program VARCHAR(10)
,@PartNumber VARCHAR(10)
,@CompNumber VARCHAR(10)
SELECT @Program = 'P415'
,@PartNumber = 'abc'
,@CompNumber = 'xyz'
But as soon as I move the caret onto the query's 1st line containing SELECT or further down, the error returns.
Hoping that helps
Thank you
Alex
From: Alex Malmyguine [mailto:ale...@wo...]
Sent: Thursday, November 21, 2013 3:10 PM
To: squ...@li...
Subject: [Squirrel-sql-users] Query runs only when all of its SQL is selected
I have a query that runs against MS SQL 2012 only when all of its SQL is selected.
If I tried to run it with no selection, it would throw and error:
Error: The multi-part identifier "pid.PI_LINE_NUMBER" could not be bound.
SQLState: S0001
ErrorCode: 4104
What am I doing wrong?
Thanks
Alex
|