Since the variable @WODUTFK is of type int then when you say
'wo_dutfk = '+@WODUTFK
it interpets the + as an addition sign rather than concatenation when you have assigned a non-NULL value to it. You will have to convert @WODUTFK to the correct type before you can use + to concatenate it.
The output of the @chvQuery in my Query Analyzer Grid is truncated
Example: In the above code, as I continue specifying fields to pull and expand the where clause - I'm getting:
SET QUOTED_IDENTIFIER OFF select wo_pk as "WO Number",wo_rempfk as "Requestor",wo_dutfk as "DUT",wo_assignempfk as "Assigned To",wo_labfk as "Lab",wo_compdat as "Desired Complete",wo_status as "Status",wo_subject as "Subject" FROM WO WHERE (wo_rempfk=22 OR
ie - the system is cutting it off at 'OR'.
If I use 'SELECT *' instead of the field list above, it properly results in:
SET QUOTED_IDENTIFIER OFF select * FROM WO WHERE (wo_rempfk=22 OR wo_assignempfk = 88)
The Query results are fine - it's just the debug display in the grid is truncated. Any way around this? Or should i just debug with 'SELECT *'?
Thanks blindgod. Right again. You wanna come to Milwaukee and sit next to me for a week? I'll even spring for the Tequilla.
Heck, I thought everyone in the Milwaukee area thought that SQL was a mangled form of the Palwaukee transponder code, if they had any clue at all. You mean that there are folks between Brown Deer and the border that think of Structured Query Language when they hear SQL ?!?!
Just FYI Brett, there's a really GREAT little place just of the Brown Deer Road exit on I-42 that does wonderful Margaritas and does Buffet every Saturday night. You would have been pleased to see the lines outside of Alpine Valley waiting for the Buffet concert last summer, they went literally for miles in both directions!