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 |
|
grippa
Starting Member
2 Posts |
Posted - 2012-06-20 : 03:46:50
|
| HiI'm looking for a way so that i can use the like operator to work with an inner query. for example that it likes the left 3 of the result of the inner query. so something like this:select customeridfrom customerwhere ZIPcode like 'left 3' (select zipcode from customer where age = 150) |
|
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2012-06-20 : 03:56:26
|
| someting like this?select customeridfrom customerwhere left(ZIPcode,3) in (select distinct left(zipcode,3) from customer where age = 150)==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
grippa
Starting Member
2 Posts |
Posted - 2012-06-20 : 04:04:32
|
| thanks ye thats what i needed :D:D:D |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2012-06-20 : 05:39:36
|
| orselect c1.customeridfrom customer as c1 inner join customer as c2 on c1.ZIPcode like left(c2.zipcode,3)+'%'where c2.age = 150MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|