Quote:
Originally Posted by expat
SELECT band_name
FROM bands
WHERE UPPER(substr(band_name,1,1)) < 'A'
OR UPPER(substr(band_name,1,1)) > 'Z'
This uses Oracle's UPPER(string) to convert to upper case, your flavour of SQL will doubtless have something like it (I presume that you want a case-independent test).
|
Great but you haven't read the requirement have you?
There is one parameter, either the letter I want or everything that does not start with a letter (# passed in) in one simple, efficient, fast SQL statement.
I know SQL very well and it's pretty obvious how to select everything that's not A to Z.
