Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL question

Status
Not open for further replies.

JeanneZ

Programmer
May 1, 2003
55
0
0
US
I am new for SQL Server and have a question to consult experts.

I have an Employee table:

ID Name ManagerID DepartmentID Region
101 Kay Scott 201 D1 South
102 Kim Lee 201 D1 South
103 Jean Lu 301 D2 North
107 Sam Smith 402 D7 West
109 Petter Ray 501 D6 East
...

I would like to display the table data like:

ID 101
Name Kay Scott
ManagerID 201
DepartmentID D1
Region South
ID 102
Name Kim Lee
ManagerID 201
DepartmentID D1
Region South
...

Thanks a lot for any help.

Jeanne


 
Thread Title said:
SQL question
Every question that is asked in this forum is a SQL question. You should choose a better title to help you get better answers and to help others locate your thread.

As for the answer to your question, it may be better to do this in the front end application rather than SQL Server.


-------------------------------------------------------

Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]
[URL unfurl="true"]http://mdssolutions.co.uk[/url] - Delivering professional ASP.NET solutions
[URL unfurl="true"]http://weblogs.asp.net/marksmith[/url]
 
In this case I think it may be much better to do this in your reporting client, because you will have the problem of trying to find what Name goes with what ID, etc...

[small]----signature below----[/small]
I'm pushing an elephant up the stairs

My Crummy Web Page
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top