Using PowerHouse functions in cursor
Peter Bateman
peterbateman808 at hotmail.com
Fri Sep 7 15:22:18 CDT 2007
Hi all:
The problem is that the SQL is expecting
SYSDATE to be a column in CONSULTAS
we need to declare the result of SYSDATE ( a PowerHouse function )
to be a host variable by using the following syntax
:( < ph function > )
e.g.
>DECLARE CSR_CONS_PEND CURSOR
>FOR &
>
>SELECT &
>
> (TRUNC ( :(SYSDATE) - TO_DATE (fecha_origen, 'YYYYMMDD'))) &
>
>FROM CONSULTAS
Regards,
Peter Bateman
>From: Richard Sheehan <sheerich at isu.edu>
>To: "jmalmaga at wanadoo.es" <jmalmaga at wanadoo.es>
>CC: "powerh-l at lists.sowder.com" <powerh-l at lists.sowder.com>
>Subject: Re:
>Date: Fri, 07 Sep 2007 11:08:22 -0600
>
>
>
>
>
>
>
>There must be a problem with the list serve. The messages posted
>today don't have a subject.
>
>
>
>Quite disturbing...
>
>
>
>
>
>jmalmaga at wanadoo.es wrote:
>
>
>Hi all,
>
>I have problems with oracle and one cursor using qdesign
>
>this is the cursor
>
>SQL IN SGBASE &
>
> DECLARE CSR_CONS_PEND CURSOR
>FOR &
>
> SELECT
>&
>
> (TRUNC (SYSDATE - TO_DATE (fecha_origen, 'YYYYMMDD'))) &
>
>FROM CONSULTAS
>
>*E* Error parsing SQL
>statement.
>
>DMS-E-GENERAL, A
>general exception has occurred during operation 'prepare
>
>request'.
>
>DMS-E-RBI_COLUMN,
>Column SYSDATE was not found.
>
>the problem is in the
>field sysdate, Anybody Know how solve this problem?
> ¡Viva los novios! En Match.com lo gritamos todos los
>días
>
>
>
>
>--
>Richard Sheehan
>Computer Analyst, Senior
>208-282-4430
>Office of Institutional Research
>Idaho State University
>Pocatello, ID 83209-8368
>
>
>
>
_________________________________________________________________
Enter to win a night a VIP night out at TIFF
http://redcarpet.sympatico.msn.ca/
More information about the powerh-l
mailing list