Quote:
Originally Posted by rsingh
Assuming that you pass in @P and have validated it, then something like the following should work.
Code:
SELECT band_name
FROM bands
WHERE
(@P = '#' AND LEFT(band_name,1) NOT LIKE [a-z])
OR
(@P != '#' AND LEFT(band_name,1) = @P)

|
Now that's what I'm talking about!

__________________
By the time you finish reading this sentence, the national debt will have risen by another £1,500 - which you or your children will have to repay.
Just so you know.
|