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)
 Using an alias in a query

Author  Topic 

sharonchapman
Starting Member

35 Posts

Posted - 2001-09-03 : 13:32:54
I have created the following query, it uses alias. I have tried placing the alias in single and double quotes and it is still kicking out as an error. How do you use an alias in a query?

SELECT DISTINCT Sum([Construction Cost]) AS [SubTotal Construction], [SubTotal Construction]*[Contractor Tax Rate] AS Tax,
FROM JobConstructionCost INNER JOIN [JobDetails Query] ON (JobConstructionCost.[Project Number] = [JobDetails Query].[Project Number]) AND (JobConstructionCost.[Job Number] = [JobDetails Query].[Job Number])
GROUP BY [JobDetails Query].[Project Number], [JobDetails Query].[Job Number], [JobDetails Query].[Contractor Tax Rate]
   

- Advertisement -