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 |
mohan123
Constraint Violating Yak Guru
252 Posts |
Posted - 2013-07-26 : 02:25:53
|
Hi all,i have requirement like this 1 st column 'A1Ctest' 2 nd column 'diagnoising heart disease' and my 3 rd column is combination of both columns 'A1Ctest for diagnoising heart disease'.Here i need to comapre 'A1Ctest' from 1st column and 'diagnoising heart disease' from 2 nd columnP.V.P.MOhan |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-07-26 : 02:29:52
|
isnt this join condition enough? Col1 + Col2 = Col3 ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-07-26 : 02:30:24
|
isnt this join condition enough? Col1 + Col2 = Col3 ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
mohan123
Constraint Violating Yak Guru
252 Posts |
Posted - 2013-07-26 : 03:23:45
|
for example : 1st column : 'A1Ctest'2nd column : 'to test heart disease'3 col : 'A1Ctest for to test heart disease'from 3 rd column i need to compare 1 st and 2nd plz observe 'for' for 1 st column data and 'for' after 2 nd column datahow can i compare ??? in query sideP.V.P.MOhan |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-07-26 : 03:50:02
|
Change condition toCol3 LIKE '%' + Col1 + ' %' + Col2 + '%'------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2013-07-28 : 10:34:02
|
Is "for" always appended after column 1? In that case, you can writewhere col3=col1+' for '+col2MadhivananFailing to plan is Planning to fail |
|
|
|
|
|