Hi All,
I have tried several methods to try to get a field value one of two optiones based on its value.
This is what I think I should be doing, but I am not aware of the correct syntax/logic.
Code:
Select
title,
price,
IF royalty = 10
Begin
select 'Y'
end
else
begin
Select 'N'
end
from titles
This sample is using pubs but basically I whish to make a query that will return 'Y' if the value of the field is 1 or 'N' if it is 2 or greater.
In the end I wish to order by this putting all the Y's at the end of the query
Any help would be greatly appreciated
======================================
They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad.
======================================