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 |
|
rb31619
Starting Member
2 Posts |
Posted - 2012-03-15 : 21:08:22
|
| HelloI am trying to select x where y like 'whatever%' and y is like '%whatever'.The reason is I have some incomplete data where I only have the beginning and end of what I am searching for but not the middle piece.Let me me know if there are questions about what I am trying to do.Thanks! |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-03-15 : 22:37:28
|
| what does that mean? Do you mean you're facing some issues and needs assistance?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
rb31619
Starting Member
2 Posts |
Posted - 2012-03-16 : 11:12:34
|
| Yes, I need assistance..I am trying to query a field that begins with 'something%' and ends with '%something'Percent sign indicates that there is more data after what I am searching for (begins with) or before (ends with)Can anyone help?Thanks.Edit: in case anyone is wondering if you want to do begins with ends with you useLike 'whatever%whatever' and if you don't have the info in the middle it will return all cases that begin like/end with.I'm trying to do this for a list of 10k things.. So I'm off to figure out the best way. Any help is appreciated. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-03-16 : 11:15:42
|
| sorry..i feel like you've answered yourself. what happened when you used Like 'whatever%whatever' ? Didnt that worked for youI would suggest explaining your problem with some sample data if you're still facing it. Reading your post gives me feeling like you've it working!------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
|
|
|