Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
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.
Hey everyone, What can I say im still feeling a little thick after the bank holiday you should be able to tell from the query what I am trying to retrieve currently;
WHERE something = 'D'*
when life hands you lemons, ask for tequila and salt
jsmith8858
Dr. Cross Join
7423 Posts
Posted - 2005-05-03 : 09:43:14
WHERE something = 'D%'- Jeff
X002548
Not Just a Number
15586 Posts
Posted - 2005-05-03 : 10:01:07
quote:Originally posted by Pace when life hands you lemons, ask for tequila and salt
That's better than firing the DBA...Maybe it's all the ta-kill-ya during the holiday....Brett8-)
Pace
Constraint Violating Yak Guru
264 Posts
Posted - 2005-05-03 : 10:21:43
quote:Originally posted by X002548Maybe it's all the ta-kill-ya during the holiday....Brett8-)
Hell Yes that it was my friend, that it was. Hey Jsmith a valliant attempt my friend but unfortunately my query still doesnt return my desired results. Are those quoted identifiers correct? I thought that WHERE something = 'D%' would look for characters like D% and not D and a number/wildcard. or is it becuase its a number to follow?I would have thought it to be something like WHERE something = ('D',%)when life hands you lemons, ask for tequila and salt
spirit1
Cybernetic Yak Master
11752 Posts
Posted - 2005-05-03 : 10:46:46
when you get a block you sure do get a block WHERE something like 'D%'Go with the flow & have fun! Else fight the flow
X002548
Not Just a Number
15586 Posts
Posted - 2005-05-03 : 10:48:08
EDIT: Sniped WHERE something LIKE 'D%'Been having Lunch at the beer works Jeff?
USE NorthwindGOSELECT * FROM Orders WHERE ShipName LIKE 'D%'GO
Brett8-)
Pace
Constraint Violating Yak Guru
264 Posts
Posted - 2005-05-03 : 10:49:57
quote:Originally posted by spirit1 when you get a block you sure do get a block WHERE something like 'D%'Go with the flow & have fun! Else fight the flow
Woo Woo Most of our queries used to come from Access and im trying to get as many out in QA as poss to get the syntax change in my head good and proper. I have never used the LIKE operator before powerfulwhen life hands you lemons, ask for tequila and salt
spirit1
Cybernetic Yak Master
11752 Posts
Posted - 2005-05-03 : 11:12:49
then you'll just love the "regEx" power of it look it up in BOL.Go with the flow & have fun! Else fight the flow
jsmith8858
Dr. Cross Join
7423 Posts
Posted - 2005-05-03 : 13:40:51
quote:WHERE something LIKE 'D%'Been having Lunch at the beer works Jeff?