Saturday, February 25, 2012

Column Names with a cursor

I have set up a query where I am using a cursor to pass result from one
query to use as select parameters in another query. The problem I am
having is that when I pass the results into the second query I get the
column headers?

How do you suppress the column headers from showing in the query? I
see how you select options - print headers.

Thanks

JasonIf you dont want to have headers, then you can use ' '

Select col1 as ' ', col2 as ' ' ...... from table

Madhivanan|||Why use a cursor at all? You should be able to make the first query into a
correlated subquery.

--
David Portas
SQL Server MVP
--

No comments:

Post a Comment