🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.sql
Article #896

create generator from a select

#896
From: aleplgr
Date: Tue, 10 Apr 2007 10:07
5 lines
1411 bytes
Hi! 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 can only add a generator in an INSERT sentence but I can't INSERT in order because IB 7.5 does not let me do it so I don't know how to add a generator in the order I need...
 
Technical Details
Message-ID: <461b53cd$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder3.cambrium.nl!feed.tweaknews.nl!newsfeed0.kamp.net!newsfeed.kamp.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,de71095c7084a322,start
X-Google-Attributes: gid114a0e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "aleplgr" <aleplgr@yahoo.es>
Sender: "aleplgr" <aleplgr@yahoo.es>
Reply-To: "aleplgr" <aleplgr@yahoo.es>
Subject: create generator from a select
Newsgroups: borland.public.interbase.sql
X-User-Info: 80.58.205.38     
X-Forwarded-For: 80.25.195.180, 192.168.1.66
NNTP-Posting-Host: 207.105.83.66
Message-ID: <461b53cd$1@newsgroups.borland.com>
Date: 10 Apr 2007 02:07:25 -0800
X-Trace: newsgroups.borland.com 1176196045 207.105.83.66 (10 Apr 2007 02:07:25 -0800)
Lines: 6
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder3.cambrium.nl!feed.tweaknews.nl!newsfeed0.kamp.net!newsfeed.kamp.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail