[dba-SQLServer] Does view support column alias?

Susan Harkins ssharkins at gmail.com
Mon Feb 23 14:36:58 CST 2009


That's what i did -- used a derived table.

Susan H.


> No Problem.  Sometimes when you need those types of calculations you can
> just create the calculated columns out of your table, then your view is 
> just
> that a select * from transactions where cost >100
>
> -Francisco
> http://sqlthis.blogspot.com | Tsql and More...
>
>
> On Mon, Feb 23, 2009 at 11:18 AM, Susan Harkins <ssharkins at gmail.com> 
> wrote:
>
>> That's the result I got too Francisco -- I'm wondering now what put that
>> idea into my head -- it obviously is incorrect. Thanks for verifying it!
>>
>> Susan H.
>>
>>
>> > Within the view... you'll need to write it as:
>> > CREATE VIEW
>> > FROM transactions
>> > SELECT id, quantity * cost AS [Total Cost]
>> > WHERE quantity * cost > 100
>>
>> _______________________________________________
>> dba-SQLServer mailing list
>> dba-SQLServer at databaseadvisors.com
>> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
>> http://www.databaseadvisors.com
>>
>>
> _______________________________________________
> dba-SQLServer mailing list
> dba-SQLServer at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
> http://www.databaseadvisors.com
> 




More information about the dba-SQLServer mailing list