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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Left, Right function?? 1

Status
Not open for further replies.

Zonie32

Technical User
Jan 13, 2004
242
US
I have a field called Plan. It list several different Plan names, but I just want to extract all PLANS that have the first words as SINGLE DED and then the number 70 in the same string.

SINGLE DED FAM 2500/70 RX 4

this is a sample: it is all one string. I tried using the Right and Left function, but was not getting anywhere. Can anyone help me?

 
Code:
select Plan
  from yourtable
 where left(Plan,11) = 'SINGLE DED '
   and Plan like '*70*'

rudy
SQL Consulting
 
or you can combine what rudy said in one line:
"select plan form table where plan like 'SINGLE DED*70*'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top