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

how i use string functions to write sql query

Status
Not open for further replies.

2314

Programmer
May 19, 2001
69
0
0
IN
hi,
i want to select first two characters of a field using sql how do i do that
 
HOW DO I CHECK WHETHER THE FIRST TWO CHARACTERS ARE NUMERIC
 
2314

As I mentioned in your other thread, one method is:

Code:
...Where translate(substr(<colname>,1,2),'^0123456789','^') is null...

Let us know if this does what you wanted.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
@ 11:00 (25Oct04) UTC (aka "GMT" and "Zulu"),
@ 04:00 (25Oct04) Mountain Time
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top