Subject Returning parameter value with query
Author Daniel Rail
Hi,

Is there a way to pass as a parameter of a query as a column?

i.e.:

SELECT
INVOICE.CLIENTNO
, :PDate
, COUNT(INVOICE.INVOICENO)
FROM INVOICE
WHERE INVOICE.INVOICEDATE<=:PDate
GROUP BY INVOICE.CLIENTNO

I need to know this, because I'm trying to generate a report and the detail
query uses as parameters clientno and PDate to retrieve the list if
invoices. The only problem is that the detail query is
automatically(cannot set this) trying to find PDate in the fields of the
master query and it's not there.

I was able to make a work-around, by using a sub-select to get the
max(invoicedate). But, I would still like to know if it's possible, and if
so, how it can be done.

If you need more info, let me know.

Thanks in advance.


Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.accramed.ca)