alas... row zero seems to be empty... I repeated my search then printed out @@resultset[0,1], @@resultset[1,1]

it returned
, 26300

plus if I display @@resultset I get a one row array (data only).

Anyone know of a way to specifically request column names... I was thinking maybe trying to parse a DESCRIBE command, but haven't managed to get that working either.

Arrrggghhh.

Maggie

Alan Wolfe wrote:

Heya,

I do believe you're in luck.  In row 0 of an array that is the results
of an sql query, it has the column names.

so whereas @@request$resultset[1,1] would be the first column of data,
@@request$resultset[0,1] would be the NAME of the first column.

You should be able to loop through that and build an insert statement (:


On 7/27/05, MJPinckard <[EMAIL PROTECTED]> wrote:
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
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to