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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Dynamic SQL in a function

Re: Dynamic SQL in a function

From: <sybrandb_at_yahoo.com>
Date: 19 Sep 2005 01:18:52 -0700
Message-ID: <1127117932.109104.20250@f14g2000cwb.googlegroups.com>


No space following the = sign.
Also the rowid would need to be embedded in quotes at the least, but better still you would use the chartorowid function.

  str := 'SELECT n.' || fld || ' INTO long_var FROM ttadm.' || tbl || '

n WHERE n.rowid = chartorowid(''' || v||''')';

The code of course is horrible and won't scale.

-- 
Sybrand Bakker
Senior Oracle DBA
Received on Mon Sep 19 2005 - 03:18:52 CDT

Original text of this message

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