I'm trying to add an option for users to clone their user session.

I have a table with ~500 columns (yeah I know, but that's how it's structured, legacy code...ugh).

I want to duplicate this row, changing only the primary key (session_id). Since it is not inconceivable that the column structure might change someday, I'd like to make the code as generic as possible (not coding each column into an update or insert action).

Using directDBMS, I can easily extract all the existing data using the following code.

   select * from Input where session_id=someNumber

But this gives me data only (no column names) and in any event I can't figure out how to get the data into another row. I've tried a variety of different ways (using both INSERT and creating a row in another action then performing an UPDATE) but can't get anything to work.

Has anyone any suggestions about how I might accomplish this? I'm about to give in and manually code all 500 columns into an insert action... but surely there has got to be an easier way...

Mac OS X server
Witango 5.0.9 (I think)
Oracle db using Oracle OCI drivers.

Thanks for any assistance.

Cheers,

Maggie Pinckard
Principal Research Associate
Lawrence Berkeley National Laboratory
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to