且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在新行中显示记录

更新时间:2023-12-04 13:23:58

你在哪里运行这个,为什么需要把它放在第二行?


- CK



你在哪里运行这个,为什么需要把它放在第二行?


- CK



i需要我的项目。


你可能想考虑在前端做这件事。


- CK


dear all
iam new to sql server. I have a query. I want to display records in a new line.
Iam using char(13) but it won''t work.

The table record contains only one field Name


select * from record


DECLARE @x varchar(8000)
SELECT @x =COALESCE(@x+'' '',+char(13))+ISNULL(Name,'''')+char(13) FROM record
SELECT @x

after executing above query result should come like
abc
xyz
adz

but it comes like abc xyz adz

any help
yogesh

Where are you running this and why do you need to place it on the second line?

-- CK


Where are you running this and why do you need to place it on the second line?

-- CK

i need in my project.


You might want to consider just doing it on front-end side.

-- CK