SQL Alias Problem

  • Thread starter Thread starter Vincent
  • Start date Start date
V

Vincent

In access:
' select (1+2) as T1, ([T1]*2) as T2, ([T2] *3) as T3 from tbl_test ' is fine
But why it can not be run at mssql 2000.

How can I achieve this function in mssql 2000?
 
This isn't a SQL Server news group. However, I would not even use the syntax
in Access even if it works. I would use:

select (1+2) as T1, ((1+2)*2) as T2, (((1+2)*2) *3) as T3 from tbl_test

This should be more reliable in all flavors of SQL.
 
This works on Access because the final result of the select is interpreted
as VBA code. However, doing so may lead to a severe loss of performance on
many occasions; for exemple when used in a JOIN or a WHERE clause.

You must be very carefull every time you are using a VBA function or an
expression in an Access query statement.

S. L.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top