Query #character

sallee77

New Member
Joined
Mar 17, 2005
Messages
41
Hi There!

Novice Access User here (running on SQL Server).

I have records that contain an indicator of ##. I need to run a query to only return records that have this indicator. I've tried the below, however it is returning records that have 2 numbers (EG instead of returning "TOWN HALL ##" it is returning "TOWN HALL (H.6.2.09)"

SELECT dbo_Master.[Problem Store Name]
FROM dbo_Master
WHERE (((dbo_Master.[Problem Store Name]) Like '*##*'));

Is it possible to query the # as the symbol itself rather than a wildcard for a number?

any help would be greatly appreciated!

Thanks!
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
I don't know if this will help but.
MS Access Help said:
Note To match the special characters left bracket ([), question mark (?), number sign (#), and asterisk (*), enclose them in brackets. The right bracket (]) can't be used within a group to match itself, but it can be used outside a group as an individual character.
 
Upvote 0
THANKYOU!

Many thanks for the suggestions!

I've worked it out, using:

SELECT dbo_Master.[Problem Store Name]
FROM dbo_Master
GROUP BY dbo_Master.[Problem Store Name]
HAVING (((dbo_Master.[Problem Store Name]) Like "*[##]*"));

Thanks for your assistance!

Merry Christmas
 
Upvote 0

Forum statistics

Threads
1,214,660
Messages
6,120,787
Members
448,994
Latest member
rohitsomani

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top