Binding to Variables at Runtime Using PL/SQL
Date: 1997/12/17
Message-ID: <34982835.E3FA345A_at_ott.montage.ca>#1/1
I hoping someone can tell me whether it is possible for PL/SQL to map a string to a variable. The problem I'm trying to solve is as follows...
I've got a web page that I am converting to run under OWS with the PL/SQL cartridge. To make the conversion easy, what I'm doing is taking the entire web page and placing it in a VARCHAR2. I've inserted "tags" of the form "_at__at_columnname@@" into the string.
I then create a cursor that retrieves a bunch of columns from the source table.
What I'd like to do is scan through the big HTML string, looking for my tags. When I find one, I want to parse "columname" out of the tag, and then get the value for that column from the current cursor record. This last stage is where things stop working.
I don't think it's possible to take a string like "Record.Column" and somehow get the acutal value. In, for example, JavaScript I would use the "exec" function, which treats a string like actual JavaScript code. I'm hoping that somewhere in PL/SQL is a similar beast.
A similar problem would be to write a function that, given a cursor or record, would be able to enumerate all of the columns contained in the object. I don't think this is possible either.
I've taken a look at the DBMS_SQL package, but it doesn't quite let me solve my problems as I still have to treat variables and their names in string form differently.
Any suggestions would be greatly appreciated!
Thanks!
Jason Foster
Jason.Foster_at_ott.montage.ca
Received on Wed Dec 17 1997 - 00:00:00 CET