|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
select records that contain a question mark
Hi,
I'm trying to come up with a select statement in Access that will give me back all the rows that actually contain a question mark character. For instance, some of the rows in my db contain strings like "What is your name? Bill" (without the quotes) and I want to just strip out the question out of any rows in which a question exists... so I thought I'd just do something like Select * from survey where question1 like '*\\?*' ; But this doesn't work... I hav tried tons of combinations... all I'm trying to do is escape the question mark... Can anyone help? Thanks Vida |
|
#2
|
||||
|
||||
|
As far as I know, Access uses the same wildcard notation as any other database.
Code:
SELECT * FROM foo WHERE name LIKE '%?%' |
|
#3
|
|||
|
|||
|
According to a (Access 97) book I've been scanning through to solve a different problem it says:
To find values that end in a question mark use this: Like "*[?]" I hope this helps. Jim |
|
#4
|
|||
|
|||
|
Quote:
Oh yea!! I suppose that makes sense eh? Access uses the square brackets for the range of chars.... Great, Thanks Jim! BTW for anyone who comes looking for info about this question in relation to an oracle database... [I'm using linked tables to an oracle 8 database just to confuse matters] .. in oracle 8 the question mark is not a wildcard character at all.... so to do an oracle query straight (using Toad or something like that) you can just use: LIKE '%?%' to identify records containing a question mark. |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft SQL Server > select records that contain a question mark |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|