-
Combining records
Hi,
Can anybody please tell how can I combing all records in field into one field.
For example
If my table is like
Final
_______
aaa
bbb
ccc
ddd
and i want result as
final1
_____
aaabbbcccddd
I do not want to use cursors for this. Please let me know if somebody knows the answer
Thanks
-
If total string length is less than 8000 characters then you can do
declare @result varchar(8000)
set @result=''
select @result=@result+final
from mytable
print @result
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|