May 5, 2010 at 7:05 pm
i have very basic question ,i am trying to select 4 column in my select statement and want to "print" the result of the select query , dont know how i can print mutliple columns result , can some body please help?
i know i can do that for one coulmn as below but not sure for multiple columns
Declare @test-2 varchar(100);
Select @test-2=count(problemid) From tasks;
Print @test-2;
thanks
May 5, 2010 at 8:26 pm
you don't really print results; you'll want to toggle between grid mode and text mode to get the results you want.
in SSMS click control + t to switch to text mode.
run your select statement; it will appear as text in the lower panel, and you can copy and paste it with all the white space it contains.
switch back by clicking control+d and rerun your select; it will appear in grid mode, which you can also copy and paste as a tab-delimited list directly to a text editor or excel.
Lowell
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply