SQLTeam.com | Weblogs | Forums

Join top row and display


#1

I have 2 tables, Table A and Table b like below,
Table A

id name Display
101 A V
101 B W
101 C X
101 D Y
101 E Z

Table B

id child_id
101 201
101 202

Desired output

id name Display id child_id
101 A V 101 201
101 B W 101 202
101 C X
101 D Y
101 E Z
Any thoughts,Thanks


#2

Please show table b is refering to child id 201 and 202. Please show those rows


#3

Not that it can't be done in t-sql but this are really just presentation issue. You should do this in your front end where the result is show