Quantcast
Channel: ฟอรัม Getting started with SQL Server
Viewing all articles
Browse latest Browse all 8428

Print data in same line

$
0
0

Hi,

i have loop like printing number from 1 to 5.

But i want to print those output in the same line. What i am getting is 1 and on next line 2 and goes on.

Sample:

while @i<5

begin

print @i;

set @i=@i+1;

end

I know that it can be done like concating the data in a string variable. and finally to print it. But i am eager to know is there any function to achieve this.

Thanks in advance.



NANDAKUMAR.T


Viewing all articles
Browse latest Browse all 8428

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>