Monday, March 26, 2012

having a select statement with no output

i have the following select query "select myCol from myTbl"

i cant modify the query but i can add to it;
what i want is to cancel the output of this query so it has no output( just like an update or insert query). a way for doing this is using 'select into' a #temp table but i cant do this becoz adding the 'into' at the end wont work after the 'from'.

i can use 'union all' to add another select statement but i cant use 'into' in the second statement becoz it has to be in the first one.

adding 'where 1=2' is not what i want becoz it still gives an empty output

any way to do this ?

thxCan you only add to the end of it? If you just add "--" to the front of it it won't execute at all, and you won't get any output.

This is certainly one of the strange requests I've seen on this forum. Why do you wan't a select statements with no output? Are you doing debugging or some sort of iterative process automation?

blindman|||thx for ur reply

i cant add to the front becoz it's a written query that i cant modify but can only add a string to the end before it is executed.

my prob is solved now after i found my source files and now i can modify the query..

thx|||I STILL have no idea...

WOAC radio

No comments:

Post a Comment