Selecting record that contains text

B

Brad Clarke

Hi all,

This is probably a very basic question, but it is late on a Friday
afternoon.

How do I select all the records that contain a specific text string in a
specific location?

What I want to do is:

Select all records that have a string SelString in the leftmost 3
characters.

ie,

Field = LoadNo
001-003
001-004
003-006
005-009
005-010

Want to select all records that have "005" as the first 3 characters.

I can select manually by defining the complete value for LoadNo, ie "LoadNo
= '005-009' LoadNo = '005-010'", but how do I get the equivalent to

Left(LoadNo,3) = "005"

Thanks

Brad Clarke
 
T

Tony Oakley

As it's only early on a Friday morning here, I can provide you with an answer!

in your WHERE clause using something like

LEFT([LoadNo], 3) = "005")

Hope this helps!
Tony
 
B

Brad Clarke

Tony,

Thanks for that, it does exactly what I want.

Cheers

Brad Clarke


Tony Oakley said:
As it's only early on a Friday morning here, I can provide you with an answer!

in your WHERE clause using something like

LEFT([LoadNo], 3) = "005")

Hope this helps!
Tony


Brad said:
Hi all,

This is probably a very basic question, but it is late on a Friday
afternoon.

How do I select all the records that contain a specific text string in a
specific location?

What I want to do is:

Select all records that have a string SelString in the leftmost 3
characters.

ie,

Field = LoadNo
001-003
001-004
003-006
005-009
005-010

Want to select all records that have "005" as the first 3 characters.

I can select manually by defining the complete value for LoadNo, ie "LoadNo
= '005-009' LoadNo = '005-010'", but how do I get the equivalent to

Left(LoadNo,3) = "005"

Thanks

Brad Clarke
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top