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.
Author |
Topic |
asm
Posting Yak Master
140 Posts |
Posted - 2014-09-14 : 09:46:46
|
Hi,Till now I get data form multiple table using join, but unable to understand how can i get the this result based on given table -Result should be - ProCode Product NamePRO00001;PRO00002 Product Test Searched Promotion One;Promotion TwoPRO00001;PRO00002;PRO00002 Product Final Searched Promotion One;Promotion Two;Promotion ThreePRO00002 Testing Promotion TwoTables - select * from ProMaster Code NamePRO00001 Promotion OnePRO00002 Promotion TwoPRO00003 Promotion Threeselect * from ProDetail ID ProCode Product1 PRO00001;PRO00002 Product Test Searched2 PRO00001;PRO00002;PRO00002 Product Final Searched3 PRO00002 Testing |
|
chikupalli
Starting Member
3 Posts |
Posted - 2014-09-14 : 10:34:41
|
HI Try this,select a.code,a.name b.procode,b.product from proMaster a innerjoin proDetail b where a.code=b.procode |
|
|
asm
Posting Yak Master
140 Posts |
Posted - 2014-09-14 : 10:50:13
|
This seems simple inner join query... |
|
|
|
|
|