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

Home -> Community -> Usenet -> c.d.o.server -> Help with dynamic insert

Help with dynamic insert

From: Ryan Gaffuri <rgaffuri_at_cox.net>
Date: 3 Feb 2003 12:26:40 -0800
Message-ID: <1efdad5b.0302031226.63fa6a41@posting.google.com>


Trying to help someone do this. Its not for the application. He is trying to fix some crystal reports and wants a utility.

Basically he is going to create a table or a view at runtime. The view will be based on an existing table but will have no data. He then wants to populate all the fields in that view with 8's. However, he wants the 8's to be as long as the field length. Columns will either be Number or Varchar.

For example, you have a field length of 10. Add 88888888 and so on.

Im having trouble with coming up with a simple insert statement.

I can build v_fields from a loop and add commas, but cycling through USER_TAB_COLUMNS

EXECUTE IMMEDIATE 'INSERT INTO TABLE '||

'('||v_fields||')'||
'VALUES'( <now what do I here to make it dynamic?>)'
Received on Mon Feb 03 2003 - 14:26:40 CST

Original text of this message

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