You receive the column names in position 0 of the resultset. i.e. @@local$resultset[0,1] is the column name of column 1.
Also, if you want to do something like this, make a stored procedure to do it and call the stored procedure from a directDBMS action. No point of bringing the info into Tango unless you are not comfortable with stored procedures in which case doing it in tango will work just fine! p. -----Original Message----- From: MJPinckard [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 27, 2005 7:46 PM To: Witango Subject: Witango-Talk: duplicating a row in Oracle 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 ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
