Re: DB2 - Sequentielle Numerierung


[ ruban.de ] [ Antworten ] [ Forum ]

Geschrieben von hi am Mai 27, 2002 um 15:23:

Als Antwort auf Re: DB2 - Sequentielle Numerierung geschrieben von Andreas Bornhorst on Februar 14, 2002 um 09:54:

: Hallo Albert,

: Danke für Deine schnelle Antwort.
: Das mit dem ROW_NUMBER() OVER() hatte ich mir auch schon gedacht, aber leider funktioniert das bei mir nicht - oder ich mache noch etwas falsch.

: Es sollte zumindest nachfolgende SQL-Anweisung (DB2 V7.1 unter SuSE Linux 7.3) funktionieren:
: db2 "update detail set jobseq=INT(ROW_NUMBER() OVER())"

: DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned:
: SQL0901N The SQL statement failed because of a non-severe system error.
: Subsequent SQL statements can be processed. (Reason "unable to pop argument
: for function".) SQLSTATE=58004


: : : Hallo Leute,

: : : ich suche nach einer Möglichkeit, bei einem UPDATE die Felder einer Spalte mit einer fortlaufenden Nummer zu füllen. Hat irgendjemand eine Idee- wie dies zu lösen ist?

: : : Gruß,
: : : Andreas

: : Hallo Andreas,

: : mit "INT(ROW_NUMBER() OVER())" bekommt man eine Nummerierung beginnend ab 0.

: : Gruß

: : Albert




Antworten:


Schreibe eine Antwort

Name:   
E-Mail:  

Thema:

Kommentar:

Optionale Link URL:   
Link Titel:                  
Optionale Image URL:


[ Antworten ] [ Forum ]