Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing data out on-screen from a temp table.

Status
Not open for further replies.

sanjdhiman

Programmer
Jan 15, 2003
189
GB
Hi this might be very basic but I have a quick question

Im trying to do the following,

PRINT '***********'
PROMT 'key: ' + SELECT * FROM #Instrument
PRINT '***********'


Im hoping to get it to come out like this:

**********
Key: 23434343
234234234234234
234234234
ss24323423
**********

but it doesnt do that, does anyone know how to print a list of data from a table using the PRINT statement for output.

thanks in advance

Sanj
 
Print is used for sending back a "string" of data, not a Resultset/cursor/series of Rows and columns

What tool are you using to query SQLServer?


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top