Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Help

I am working on a personnel directory for the school district were I work. I included the ability to do searches in ASP. The information is pulled from a SQL database. One of the fields the search returns is the building were they work. In the database, teachers that work in multiple buildings have multiple records in the database-- a record for each building they work in. These people are displayed multiple times in the search.
Example:
Joe Smith - Building A
Joe Smith - Building B

I would like to do something so the results are as follows:
Joe Smith - Building A, Building B

Any idea how I can do this :confused: ? Any help is appreciated.
[684 byte] By [jir107] at [2007-11-11 10:07:32]
# 1 Re: Help
when u want to display results u may search in the whole tabel if there are more than one joe and display it's info .. or u may append .. before insert new record seek if there is allready joe so append the new building.
Amahdy at 2007-11-11 17:23:08 >
# 2 Re: Help
You would probably need to create a stored procedure if you wanted to handle this via SQL. The following should help:

http://aspadvice.com/blogs/plitwin/archive/2005/12/23/14445.aspx
pclement at 2007-11-11 17:24:18 >