Unix Technical Forum

oracle 9i i=i+1??

This is a discussion on oracle 9i i=i+1?? within the Oracle Database forums, part of the Database Server Software category; --> Hi all, It is any function in Oracle 9i equal o with a similar funtionability than (i=i+1). I want ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-26-2008, 06:00 AM
valigula
 
Posts: n/a
Default oracle 9i i=i+1??

Hi all,
It is any function in Oracle 9i equal o with a similar
funtionability than (i=i+1).
I want to do a "Insert Into a select" but one fileds is a counter ...

Thanks in advance ..
A.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-26-2008, 06:00 AM
Valentin Minzatu
 
Posts: n/a
Default Re: oracle 9i i=i+1??

On May 27, 2:15 pm, valigula <valig...@gmail.com> wrote:
> Hi all,
> It is any function in Oracle 9i equal o with a similar
> funtionability than (i=i+1).
> I want to do a "Insert Into a select" but one fileds is a counter ...
>
> Thanks in advance ..
> A.


I am not very clear on the question, but I guess you can use ROWNUM, a
sequence or implement your own function. Maybe others have more ideas.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-26-2008, 06:00 AM
valigula
 
Posts: n/a
Default Re: oracle 9i i=i+1??

On 27 mayo, 20:50, Valentin Minzatu <valentinminz...@yahoo.com> wrote:
> On May 27, 2:15 pm, valigula <valig...@gmail.com> wrote:
>
> > Hi all,
> > It is any function in Oracle 9i equal o with a similar
> > funtionability than (i=i+1).
> > I want to do a "Insert Into a select" but one fileds is a counter ...

>
> > Thanks in advance ..
> > A.

>
> I am not very clear on the question, but I guess you can use ROWNUM, a
> sequence or implement your own function. Maybe others have more ideas.


Thanks for your respond i have a function that already does it. But it
is to resource/time consuming, therefore i am trying to do it on the
fly.
And i can not use the rownum since i will need to start from the
value 53425...this number should be increase by one in every row
insert.

A.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-26-2008, 06:00 AM
Vladimir M. Zakharychev
 
Posts: n/a
Default Re: oracle 9i i=i+1??

On May 27, 11:44 pm, valigula <valig...@gmail.com> wrote:
> On 27 mayo, 20:50, Valentin Minzatu <valentinminz...@yahoo.com> wrote:
>
> > On May 27, 2:15 pm, valigula <valig...@gmail.com> wrote:

>
> > > Hi all,
> > > It is any function in Oracle 9i equal o with a similar
> > > funtionability than (i=i+1).
> > > I want to do a "Insert Into a select" but one fileds is a counter ...

>
> > > Thanks in advance ..
> > > A.

>
> > I am not very clear on the question, but I guess you can use ROWNUM, a
> > sequence or implement your own function. Maybe others have more ideas.

>
> Thanks for your respond i have a function that already does it. But it
> is to resource/time consuming, therefore i am trying to do it on the
> fly.
> And i can not use the rownum since i will need to start from the
> value 53425...this number should be increase by one in every row
> insert.
>
> A.


Research SEQUENCEs and BEFORE INSERT FOR EACH ROW triggers. Oracle
doesn't support 'identity'/autoincrement columns.

Hth,
Vladimir M. Zakharychev
N-Networks, makers of Dynamic PSP(tm)
http://www.dynamicpsp.com

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-26-2008, 06:01 AM
ryckaes@gmail.com
 
Posts: n/a
Default Re: oracle 9i i=i+1??

On 27 mei, 22:06, "Vladimir M. Zakharychev"
<vladimir.zakharyc...@gmail.com> wrote:
> On May 27, 11:44 pm, valigula <valig...@gmail.com> wrote:
>
>
>
> > On 27 mayo, 20:50, Valentin Minzatu <valentinminz...@yahoo.com> wrote:

>
> > > On May 27, 2:15 pm, valigula <valig...@gmail.com> wrote:

>
> > > > Hi all,
> > > > It is any function in Oracle 9i equal o with a similar
> > > > funtionability than (i=i+1).
> > > > I want to do a "Insert Into a select" but one fileds is a counter ...

>
> > > > Thanks in advance ..
> > > > A.

>
> > > I am not very clear on the question, but I guess you can use ROWNUM, a
> > > sequence or implement your own function. Maybe others have more ideas.

>
> > Thanks for your respond i have a function that already does it. But it
> > is to resource/time consuming, therefore i am trying to do it on the
> > fly.
> > And i can not use the rownum since i will need to start from the
> > value 53425...this number should be increase by one in every row
> > insert.

>
> > A.

>
> Research SEQUENCEs and BEFORE INSERT FOR EACH ROW triggers. Oracle
> doesn't support 'identity'/autoincrement columns.
>
> Hth,
> Vladimir M. Zakharychev
> N-Networks, makers of Dynamic PSP(tm)
> http://www.dynamicpsp.com


insert into tbl2
select rownum+53424, fielda,fieldb from tbl2

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-26-2008, 06:01 AM
valigula
 
Posts: n/a
Default Re: oracle 9i i=i+1??

On 28 mayo, 09:29, ryck...@gmail.com wrote:
> On 27 mei, 22:06, "Vladimir M. Zakharychev"
>
>
>
> <vladimir.zakharyc...@gmail.com> wrote:
> > On May 27, 11:44 pm, valigula <valig...@gmail.com> wrote:

>
> > > On 27 mayo, 20:50, Valentin Minzatu <valentinminz...@yahoo.com> wrote:

>
> > > > On May 27, 2:15 pm, valigula <valig...@gmail.com> wrote:

>
> > > > > Hi all,
> > > > > It is any function in Oracle 9i equal o with a similar
> > > > > funtionability than (i=i+1).
> > > > > I want to do a "Insert Into a select" but one fileds is a counter ...

>
> > > > > Thanks in advance ..
> > > > > A.

>
> > > > I am not very clear on the question, but I guess you can use ROWNUM, a
> > > > sequence or implement your own function. Maybe others have more ideas.

>
> > > Thanks for your respond i have a function that already does it. But it
> > > is to resource/time consuming, therefore i am trying to do it on the
> > > fly.
> > > And i can not use the rownum since i will need to start from the
> > > value 53425...this number should be increase by one in every row
> > > insert.

>
> > > A.

>
> > Research SEQUENCEs and BEFORE INSERT FOR EACH ROW triggers. Oracle
> > doesn't support 'identity'/autoincrement columns.

>
> > Hth,
> > Vladimir M. Zakharychev
> > N-Networks, makers of Dynamic PSP(tm)
> > http://www.dynamicpsp.com

>
> insert into tbl2
> select rownum+53424, fielda,fieldb from tbl2


thanks that is what i was looking for.
Regards

A.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:50 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com