Query/Table term confusion
From: JasonCook (anonymous_at_discussions.microsoft.com)
Date: 03/22/04
- Next message: Vishal Parkar: "Re: Query/Table term confusion"
- Previous message: Steve Kass: "Re: Select instruction not returning entire column (explicit truncate ???)"
- Next in thread: Vishal Parkar: "Re: Query/Table term confusion"
- Reply: Vishal Parkar: "Re: Query/Table term confusion"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 22 Mar 2004 13:56:11 -0800
Looking at http://www.databasejournal.com/features/mssql/article.php/3112381 the guy creates a table called Orders, then has the query
select OrderId, OrderDate, O.OrderAmt
,(select sum(OrderAmt) from Orders
where OrderID <= O.OrderID)
'Running Total'
from Orders O
My question . . . what is the purpose of the "O"
Why does he specify O.OrderAmt yet doesn't use it anymore until the subquery? Then, why does he use it with O.OrderID in the subquery?
- Next message: Vishal Parkar: "Re: Query/Table term confusion"
- Previous message: Steve Kass: "Re: Select instruction not returning entire column (explicit truncate ???)"
- Next in thread: Vishal Parkar: "Re: Query/Table term confusion"
- Reply: Vishal Parkar: "Re: Query/Table term confusion"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|