Link to home
Start Free TrialLog in
Avatar of babita220004
babita220004

asked on

display horizontally records

i have only one coloumn in a table i want to dispaly all the datas in a row.Name of the table is student which contains only one coloumns slno
Student
           Slno
           1
           2
           3
           4
           5
I want to display them as
slno 1 2 3 4 5
ASKER CERTIFIED SOLUTION
Avatar of nathaniel
nathaniel
Flag of Philippines image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Djuradj
Djuradj

Display it where? On your web page, gui application,...?
Which server-side language (Script) do you use? Which DB do you use?

If you want to crete a query which will collect values of this one column (Slno) and sore it in one single row, it is only to possible to by creating temporary table with as many columns as you query returns rows. And then, to create (build) a query to insert those values into that temp table.
OR to user pivot table. You could use an OLAP (OnLine Analytical Processing) data cube to get PIVOT functionality. "Pivoting" will be supported in Yukon (next version of ms sql server), and  i am not sure about Oracle.

Anyway, to hard task, so If you can skip to do that on sql server - don't do it.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial