Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> DBMS_SQL.PARSE

DBMS_SQL.PARSE

From: <hclarius_at_mindspring.com>
Date: 2000/04/26
Message-ID: <39079F28.BE126D44@mindspring.com>#1/1

I am using DBMS_SQL to generate dynamic cursors to interact with Web Server.

I have a date variable in my table called DATE_TIME

I create a local date variable using
START_DATE:=TO_DATE('01-APR-95) I create the following varchars (strings).

SERIES_PARM:=' SITES ' ; (SITES is a table)

SITE_PARM:= ' (SITE_ID:=''VB122'') ' ; SITE_ID is a varchar in the SITES table.

DATE_PARM:=' (DATE_TIME>=START_DATE) ' ; ALL_PARMS:='SELECT * FROM ' || SERIES_PARM || ' WHERE ' || SITE_PARM || ' AND ' || DATE_PARM; The string when printed out looks like
SELECT * FROM SITES WHERE (SITE_ID='VB122') AND (DATE_TIME
>= START_DATE)
Then I pass this string as follows

C1:= DBMS_SQL.OPEN_CURSOR; --Allocates a cursor

DBMS_SQL.PARSE(C1,ALL_PARMS,DBMS_SQL.NATIVE); This Works for SELECT * FROM SITES WHERE (SITE_ID='VB122') but I get invalid column error when I tack on the DATE_PARM.

START_DATE IS A VALID DATE AND DATE_TIME IS A DATE IN THE SITES TABLE. Any ideas would be helpful. Received on Wed Apr 26 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US