Selecting record that contains text

  • Thread starter Thread starter Brad Clarke
  • Start date Start date
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
 
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
 
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
 
Back
Top