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 |
|
satish.gorijala
Posting Yak Master
182 Posts |
Posted - 2009-05-22 : 07:16:30
|
| Can any help me to figure out the error in below query.SELECT TBL_LastName.Continent, TBL_LastName.Culture, TBL_LastName.Religion, TBL_LastName.Name = case when TBL_LastName.Name is null then 'not found' else TBL_LastName.Name endFROM TBL_LastName INNER JOINTBL_NameBreakdown ON TBL_LastName.Name = TBL_NameBreakdown.Name Order by TBL_LastName.NameI am getting error at line-3 as "Incorrect syntax near '='."G. Satish |
|
|
vision99
Starting Member
14 Posts |
Posted - 2009-05-22 : 07:43:35
|
| Try following select statment.......SELECT TBL_LastName.Continent,TBL_LastName.Culture,TBL_LastName.Religion,case when TBL_LastName.Name is nullthen 'not found'else TBL_LastName.NameendFROM TBL_LastName INNER JOINTBL_NameBreakdown ON TBL_LastName.Name = TBL_NameBreakdown.Name Order by TBL_LastName.Name -Vision |
 |
|
|
satish.gorijala
Posting Yak Master
182 Posts |
Posted - 2009-05-22 : 07:55:15
|
yes, perfect. thank youquote: Originally posted by vision99 Try following select statment.......SELECT TBL_LastName.Continent,TBL_LastName.Culture,TBL_LastName.Religion,case when TBL_LastName.Name is nullthen 'not found'else TBL_LastName.NameendFROM TBL_LastName INNER JOINTBL_NameBreakdown ON TBL_LastName.Name = TBL_NameBreakdown.Name Order by TBL_LastName.Name -Vision
G. Satish |
 |
|
|
|
|
|