View Single Post
 
Old October 26th, 2010, 03:56 AM
arbab arbab is offline
Authorized User
Points: 350, Level: 6
Points: 350, Level: 6 Points: 350, Level: 6 Points: 350, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2008
Location: , , Pakistan.
Posts: 54
Thanks: 8
Thanked 1 Time in 1 Post
Default How to make a query which use column and table aliases but not using joins

How to make a query which use column and table aliases but not using joins

Select channel_id AS "ClAlias" from tblchannel TbAlias where tblaias.IS_DEFAULT = 1;


Giving error of invalid identifier, how can I make such a query which uses both table and column aliases but not related to joins.


My separate table alias and column aliases queries are working fine:


(Table alias query)
SELECT CHANNEL_ID, IS_DEFAULT from tblchannel ImTbAlias WHERE ImTbAlias.IS_DEFAULT = 1;



(Column alias query)
Select channel_id "ImClAlias" from tblchannel;

Thanks in advance.
__________________
How to do programming?