General information
Title:
Using a column alias in a sql select where clause.
I want to use a column alias in a where clause like the following:
select order_id,
decode(status, 'Held', '1 - Held', 'Shipped', '2 - Shipped) as ordstatus
from order_header
where ordstatus = '1 - Held'
I get 'invalid column name' on ordstatus. Any ideas would be appreciated.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only