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 Part of the value from a query

Status
Not open for further replies.

gradinumcp

IS-IT--Management
Apr 6, 2005
85
US
Hi there,

I have a column in the table(Collection) called Contact where the data is in the format Name Ext eg. John lennon 1601. I want to write a query that will display just the name and another query that will display just the Ext--that is the right 4 numbers.

Any clues what the 2 queries will be????

Thanks in advance:)
 
why two queries when one will do?
Code:
select left(Contact,length(Contact)-4) as name
     , right(Contact,4) as ext
  from Collection

r937.com | rudy.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top