Subject | Re: [firebird-support] How to force data type of returned value in query? |
---|---|
Author | Sergio H. Gonzalez |
Post date | 2009-10-03T16:53:24Z |
>I have a query like this:In these cases I always do (inmediatly after the select)
>
> SELECT SUM(INVOICE.TOT_OWING)
> FROM INVOICE
> WHERE INVOICE.FK_ACCOUNT_ID = :A_ACCOUNT_ID AND
> (((:V_CURRENT_DATE - INVOICE.INVOICE_DATE) >=31) AND ((CAST('NOW' AS
> DATE) - INVOICE.INVOICE_DATE) <=60)) AND
> INVOICE.IS_PROCESSED = 'Y'
> INTO :V_30_INV_TOTAL;
>
if (V_30_INV_TOTAL is null) then
V_30_INV_TOTAL = 0;
-s