Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding Values.... 1

Status
Not open for further replies.

CTSQLGUY

Technical User
Feb 4, 2007
33
US
I want to be able to add the results of my query, shown below, together to create a new expression...

----------------------------------------------------

SELECT TOP 1 TableA.F1 AS A, TableB.F1 AS B
FROM TableB CROSS JOIN
TableA
ORDER BY TableA.F1 DESC, TableB.F1 DESC

----------------------------------------------------

I want to be able to take the results of A and B and add them together to create C without creating a new table... any help is MUCH appreciated!

Thanks!
 
SELECT TOP 1
TableA.F1 AS A
, TableB.F1 AS B
[red], TableA.F1 + TableB.F1 AS C[/red]
FROM TableB
CROSS
JOIN TableA
ORDER BY TableA.F1 DESC, TableB.F1 DESC


r937.com | rudy.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top