|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
urgent help!-how to format after getting rows? for newline
while(@@FETCH_STATUS=0)
begin print 'inside while' set @BodyContents = @BodyContents+@gotclientName+@gotproductName set @Body= @Body + @BodyContents + ',' fetch next from resultcursor into @gotclientName,@gotproductName print 'going outside of while' end --while end Client Name Product Name aaa test1 bbb test4 how to format row like above. currently i am getting aaa,test1,bbb,test4 |
|
#2
|
||||
|
||||
|
Code:
set @BodyContents = @gotclientName + ' ' + @gotproductName set @Body= @Body + @BodyContents + ' ' Yes, that's a newline character between the first ' and second ' in the set @Body statement. You can make a string span multiple lines.
__________________
Up the Irons What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home. "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest Down with Sharon Osbourne Puzzle of the Month solved by Keath and KevinADC, superior perl programmers of the month Looking for a perl job with kick-*** programmers in a well-known NASDAQ listed tech company with branches in the US and Europe? We're hiring. PM me for details. Requirements |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > urgent help!-how to format after getting rows? for newline |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|