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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Ahh mind block, really easy

Author  Topic 

Pace
Constraint Violating Yak Guru

264 Posts

Posted - 2005-05-03 : 09:29:44
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
Go to Top of Page

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....



Brett

8-)
Go to Top of Page

Pace
Constraint Violating Yak Guru

264 Posts

Posted - 2005-05-03 : 10:21:43
quote:
Originally posted by X002548
Maybe it's all the ta-kill-ya during the holiday....
Brett
8-)


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
Go to Top of Page

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
Go to Top of Page

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 Northwind
GO

SELECT * FROM Orders WHERE ShipName LIKE 'D%'
GO




Brett

8-)
Go to Top of Page

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 powerful

when life hands you lemons, ask for tequila and salt
Go to Top of Page

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
Go to Top of Page

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?



d'oh!

- Jeff
Go to Top of Page
   

- Advertisement -