Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> How to accomplish this using ONLY one update sentence?

How to accomplish this using ONLY one update sentence?

From: kent <dashen.zhang_at_johnsondiversey.com>
Date: Sun, 22 Jan 2006 19:31:02 +0800
Message-ID: <dqvrhr$ve$1@news.cn99.com>


There is a table named test1.
it have 2 number fields: field1 field2
the initial value is:
field1 field2

1      null
1      null
2      null
3      null
3      null
3      null

how to accomplish this using ONLY one update sentence? Group by field1, that is field1 =1 is one group, field2 =2 is another group use field2 to represent the sequence in the group

the result is :

field1 field2

1      1
1      2
2      1
3      1
3      2
3      3
Received on Sun Jan 22 2006 - 05:31:02 CST

Original text of this message

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