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 -> Re: How to imitate autovalues ?

Re: How to imitate autovalues ?

From: Bob Nightingale <rnightingale_at_comshare.com>
Date: Thu, 7 May 1998 13:54:24 -0500
Message-ID: <6it0ft$h0k$1@inet-prime.comshare.com>


You may want to read up on Dynamic SQL in your Application Developer's Guide and "Bind Variables". I'm working on a project where the names of the tables I'm getting data from is sensitive to the type of data and which year of historical information. There was no other way to do it.

With Dynamic SQL you can build up a character string with any legal SQL statement under program control.

--Bob.

Thorsten Buchheim wrote in message <3551CC63.7E8E_at_ls7.uni.dortmund.de>...
>Hello all,
>
>
>I am looking for a way to realze the following :
>
>I need a table, consisting of some columns including one to store
>sequential numbers (for later foreign-key-purposes).
>
>The problem is that I don't want to mention explicitly the
>sequential-number-column in an insert-statement, but simply :
>
>insert(col2,...,coln) values (val2,..,valn) into TABLE
>
>with ORACLE doing the rest by transforming this into
>
>insert(count_col1,...,coln) values (SEQ.nextval,val2,...,valn) into
>TABLE.
>
>Unfortunately I´m a newbie in ORACLE (guessed it?) and presumably
>this can be done by a TRIGGER. If I only knew how....
>It would be nice if you could give me with some hints how to do it.
>
>
>Thanks for any help
>
>Thorsten
Received on Thu May 07 1998 - 13:54:24 CDT

Original text of this message

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