> SELECT TotalInvoice, (SELECT SUM(PaymentValue) FROM Payments
> WHERE Payments.IDInvoice = IDInvoice) AS TotalPaid, TotalPaid = TotalInvoice
> AS FullyPaid FROM Invoices;
>
> Here, I select:
> - TotalInvoice the total amount of the invoice
> - TotalPaid the total amount paid till now
> - FullyP
On 7/17/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hello, and thanks for the reply.
SELECT *
from Employees
where IDContractLevel > 4
is not enough, since I actually need to use a field that is created inside the
SQL statement to create another field. The problem is that it seems that t
Hello, and thanks for the reply.
SELECT *
from Employees
where IDContractLevel > 4
is not enough, since I actually need to use a field that is created inside the
SQL statement to create another field. The problem is that it seems that the
computed fields is not existing yet when it is used for
On 7/17/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hello, everybody
I'm using a SQL clause to get data from the DB, and I need to use "computed"
fields to get the value of other fields. A (stupid) example of what I need is this:
SELECT IDContractLevel, IDContractLevel > 4 as IAmBoss, (
Hello, everybody
I'm using a SQL clause to get data from the DB, and I need to use "computed"
fields to get the value of other fields. A (stupid) example of what I need is
this:
SELECT IDContractLevel, IDContractLevel > 4 as IAmBoss, (SELECT * FROM Bosses
WHERE Flag = IAmBoss) FROM Employees
5 matches
Mail list logo