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.
| Author |
Topic |
|
rum23
Yak Posting Veteran
77 Posts |
Posted - 2008-12-04 : 20:08:07
|
| Please help.....The "AmountPaidTillNow" is not appearing when I execute the following sql. Why is that? It instead comes up as "No column name"SELECT (POProject.Cost) TotalAmount, (SELECT (ISNULL(SUM(Invoice.PaidAmount),0)) AmountPaidTillNow FROM INVOICE WHERE Invoice.InvoiceStatusId = '2')FROM POProject, PurchaseOrder, InvoiceWHERE PurchaseOrder.PONumber ='PO0000001'AND PurchaseOrder.PurchaseOrderId = POProject.PurchaseOrderIdAND Invoice.PurchaseOrderId = PurchaseOrder.PurchaseOrderIdGroup by Cost, PaidAmount |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-12-04 : 20:10:00
|
quote: Originally posted by rum23 Please help.....The "AmountPaidTillNow" is not appearing when I execute the following sql. Why is that? It instead comes up as "No column name"SELECT (POProject.Cost) TotalAmount, (SELECT (ISNULL(SUM(Invoice.PaidAmount),0)) AmountPaidTillNow FROM INVOICE WHERE Invoice.InvoiceStatusId = '2')as AmountPaidTillNowFROM POProject, PurchaseOrder, InvoiceWHERE PurchaseOrder.PONumber ='PO0000001'AND PurchaseOrder.PurchaseOrderId = POProject.PurchaseOrderIdAND Invoice.PurchaseOrderId = PurchaseOrder.PurchaseOrderIdGroup by Cost, PaidAmount
|
 |
|
|
rum23
Yak Posting Veteran
77 Posts |
Posted - 2008-12-04 : 20:13:15
|
| Perfect! thanks |
 |
|
|
|
|
|