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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Many rows to one column...

Status
Not open for further replies.

ckabi

Programmer
May 12, 2005
2
GR
I thought this would be very simple, but I can't seem to figure it out ...

from this table:
phID usID phone
1 1 555-1212
2 1 555-2121
3 2 555-9955

I want this view:
usID calcphones
1 555-1212 555-2121
2 555-9955

where calcphones is a calculated column.
How can I do this?
 
This depends on the DBMS you are using, eg in SQL Server you would create a user defined function that took a userid as inpuit and returned the concatenated list of numbers.

--James
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top