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
 General SQL Server Forums
 New to SQL Server Programming
 how to display not a actual column

Author  Topic 

usafelix
Posting Yak Master

165 Posts

Posted - 2015-01-29 : 02:57:26
Anyone can help give query for output this result on Table C ?
========================================================
i have one table store below information, and other one table is
store staff name and phone number. how to display of table c data by new column and using the key staff_code1=staff_id or staff_code2= staff_id or staff_code3=staff_id ?
---------------------------------------------------------
Table A
staff_code1,staff_code2,staff_code3

Table B
staff name
staff_id
staff_phone
-----------------------------------------------
Table C display in new column .
staff name-1 code1 staff name-2 code2 , staff name-3 code3
peter id-01 susuan id-03 david id-05




gbritton
Master Smack Fu Yak Hacker

2780 Posts

Posted - 2015-01-29 : 07:01:43
post some sample data and required output in Table C
Go to Top of Page
   

- Advertisement -