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 |
kond.mohan
Posting Yak Master
213 Posts |
Posted - 2012-01-24 : 08:32:17
|
Hi,i have 2 tables i need to join table1 id to table 2 substring in SSMSEXAMPLETABLE 1NO NAME ID1 DSFD 0958/0958cbd11000900/012 FGDS 0926/0926abc11000989/013 FGDSsdf 0958/0926abc11000522/01table 2loc sal no sdfd 2000 0958cbd11000900sdfd 2000 0926cbd11000989sdfd 2000 0958cbd11000522here i had join substring(table1.id ,5,15)=table2.nothe above join is correct or noti did not get the datacan anybody know the pls logic tell me |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2012-01-24 : 08:41:08
|
select substring('0958/0958cbd11000900/01',5,15) = /0958cbd1100090select substring('0958/0958cbd11000900/01',6,15) = 0958cbd11000900 No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
|
|