Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Question About Cursor

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-09-15 : 08:50:07
Danish Mustafa Khan writes "Sir I have a table whos fields are

USERID--------UserName
1 -------------Danish
2 -------------Mustafa
3 -------------Khan

I want to write a stored procedure in which i have to get all the rows and print the USER ID's Like

1 | 2 | 3 |...and so on how can i do this.

Thanks in Advance."

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2004-09-15 : 08:52:22
search here for info on "coalesce".
Go to Top of Page

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2004-09-15 : 08:52:27
Never use stored procedures to format output.

The SQL Server layer is used to store, calculate and return data.

To display or print or format data, you use a tool that retrieves data from SQL Server and that is designed to accomidate output needs. For example, Excel, Access, Crystal Reports, ASP, Visual Basic, etc.


- Jeff
Go to Top of Page
   

- Advertisement -