dear all
i have a dataSet in this way
ID NAME
1 VALUE1
2 VAlue2
3 VALUE3
4 VALUE4
5 VALUE5
i need to display this daya as the following
1- VALUE1 2- VALUE2 3- VALUE3
4- VALUE4 5- VALUE5
is there are anyway
thanksBolos,
A few options for you here,
You could use the multi-column feature. I think it is the Body's
Columns property.
Or, if we are talking about low volumes of data you pivot in-line. The
following is based on a code snippet in an article by Clinton Herring
on SQLServerCentral.com. You could use as is for one line or stick
inside a loop for a few more
SELECT @.tmp_values = @.tmp_values + convert(varchar(20), column_data) +
','
FROM DB.dbo.many_tbl
WHERE id = @.tmp_id
ORDER BY column_data
SELECT @.tmp_values
Chris
Bolos wageh wrote:
> dear all
> i have a dataSet in this way
> ID NAME
> 1 VALUE1
> 2 VAlue2
> 3 VALUE3
> 4 VALUE4
> 5 VALUE5
> i need to display this daya as the following
> 1- VALUE1 2- VALUE2 3- VALUE3
> 4- VALUE4 5- VALUE5
> is there are anyway
> thanks
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment