Subject create generator from a select
Author Alejandro Garcia
Hi! I'm trying to create a generator:
I have a table with 80 columns, I need to select 3 of them: CLIENTID, DATE1 and DATE2 and order them by CLIENTID, DATE1 and then create another column that is a sequencial number (a generator) that reflects that order.
I need this to be a new table because I've done a stored procedure assuming that I have this 4 columns table which one of them is a generator.

I'm trying to do something like this, TEST is my new table that I've already created:

INSERT INTO TEST (
TEST.CLIENTID,
TEST.DATE2,
TEST.DATE1,
GEN_ID(GENID, 1)
)
SELECT T1.CLIENTID,
T1.DATA2,
T1.DATA1
FROM
T1
WHERE
CONDITIONS
ORDER BY
T1.CLIENTID,T1.DATA1





---------------------------------

LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com

[Non-text portions of this message have been removed]