January 30, 2009 at 3:18 am
I have a table with following schema
Table Name [OfficeDirectory]
Columns
EmpID RoomNumber Extension
31313 HSG-526 326
31313 HSG-526 327
31313 HSG-527 328
31313 HSG-527 329
31313 HSG-528 330
31313 HSG-528 331
Although the above table is not normalized but keeping in view the limited amount of employee and room numbers in building it is suitable to avoid joins processing.
Now i have to get the data data of [employeenumber] 31313 in following format.
EmpID RoomNumber Extension
31313 HSG-526 , HSG-527 , HSG-528 326 , 327, 328 , 329 , 330 , 331
Several clients will access this data in above format. So what is best way to get the data in required format from above table. Also please keep in view that if we normalize the above table even then we have to apply some way to get data in required format. So now actual problem is to get data in required format with comma separated values for each empID.
Regards
DBDigger Microsoft Data Platform Consultancy.
January 30, 2009 at 4:46 am
[font="Verdana"]Almost similar post. Please view http://www.sqlservercentral.com/Forums/Topic646567-145-1.aspx
Mahesh[/font]
MH-09-AM-8694
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply