At 6:06 +0300 on 28/8/98, Walt Bigelow wrote:
> I was looking more on the lines of a list of dest values. This list is by
> no means in order, or sequential.
> For example: I want to copy this data TO this list of lib #'s
> 3422, 4456, 7743... etc (baiscally random)
> I'd prefer to have 1 insert statment do the job. Right now I have M$
> Access doing this in a for/next loop, changing the dest lib number for
> each in the list.
> I'd prefer to do this on the server end. Whould this be easy to do with
> server side funcs?
Well.... SQL was NOT designed as a procedural language, and when you have
data of a 'random' nature, as you said, you need a procedural languague,
which the current backend doesn't have.
If you want to insert just the new lib numbers into an auxiliary table, you
can easily do the insert as a cartesian product between the rows you want
to duplicates and the rows in the auxiliary table.
Of course, then you'll need a loop for inserting the lib values into the
auxiliary table - or you can do that with a COPY.
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
In response to
pgsql-sql by date
|Next:||From: Cho Yan Wong||Date: 1998-08-31 00:36:10|
|Subject: Re: [SQL] copy probs|
|Previous:||From: Herouth Maoz||Date: 1998-08-30 08:40:26|
|Subject: Re: [SQL] Contertine timespan to hours|