Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

SQL Help?

$
0
0

Hi All,

My below join working perfectly. Now I need to add one more condition for existing join.

In M table I have one column ‘Type’=2 then I need +1 date condition including below join in E table and remaining types equal dates.

selectdistinctb2.*,dm.*

intoC

FROMbb2 LEFTOUTERJOIN Mdm

                    ONb2.CPT=dm.CPTLEFTOUTER JOIN  E erPON  b2.MBR_KEY=erp.MBR_KEYandb2.DATE=erp.DATE

Thanks

CMK


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>