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

Basic select query problem

Status
Not open for further replies.

ehspacl

IS-IT--Management
Feb 11, 2002
54
GB
Dear All,
I have some data in a column e.g
G457435732
H475894374
123456465
S405843280
876546123

And I am trying to select only the data that starts with a letter. I tried:-
select * from <table> where column like '{A-Z}%'
But without success. How do you select only rows that start with only one letter followed by numbers?

Many thanks in advance

Paul
 
select * from <table> where
ASCII(substr(colname,1,1)) between 65 and 90


(too many functions??????????????)


regards,
sudhi
 
Or even

[tt]select * from <table> where
substr(colname,1,1) between 'A' and 'Z'[/tt]
 
There's never too many functions when it works!!!

Many thanks Sudhi

and many thanks lewisp for your addition.

Cheers guys

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top