Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SELECT rows having specific SUBSTRING

Status
Not open for further replies.

Delphard

Programmer
Jul 22, 2004
144
RS
Table with field "SPEC_STRING" (VARCHAR(15)). How to SELECT rows having substring '111222' at position 9 (for example: strings like 'abcdefghi111222' or '000000000111222')?
 
Use SELECT with LIKE and use underscore to indicate any character.

Andrew
Hampshire, UK
 
Did you look in the manual specifically under String Functions for substring? Since you mentioned it I thought it would be worth your while reading the manual to see what substring does. (Hint: it will do what you are looking to do)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top