Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 ALias

Author  Topic 

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2005-04-28 : 07:44:09
Hi All

Is there any way i can use the Alias name in where clause.
for eg

Select Sum(ActCost) - Sum(SaleCost) as SalesDiff
From SalesInventory
Where SalesDiff >1000

hope to get some comment on same.

Complicated things can be done by simple thinking

mr_mist
Grunnio

1870 Posts

Posted - 2005-04-28 : 07:58:37
Only if you make it a derived table whatsit.

select * from (select blah - blah as moo) b order by blah

-------
Moo. :)
Go to Top of Page
   

- Advertisement -