pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedSeeding
6+ messages / 3 participants
[nested] [flat]
* Seeding
@ 2002-07-15 18:45 Chad Thompson <chad@weblinkservices.com>
2002-07-15 22:54 ` Re: [SQL] Seeding Peter Eisentraut <peter_e@gmx.net>
0 siblings, 1 reply; 6+ messages in thread
From: Chad Thompson @ 2002-07-15 18:45 UTC (permalink / raw)
To: pgsql-novice <pgsql-novice@postgresql.org>; pgsql-sql
Is there any way to automaticly "seed" a number into a list. For example
create table "temp"(
select distinct(full_phone)
from lists
where client_id =8)
This gives me 100,000 unique records
What i would like to do is, every 2500, insert a specific number like '5552552555'
can this be done through sql? or what would be the best approach.
TIA
Chad
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [SQL] Seeding
2002-07-15 18:45 Seeding Chad Thompson <chad@weblinkservices.com>
@ 2002-07-15 22:54 ` Peter Eisentraut <peter_e@gmx.net>
2002-07-16 17:31 ` Re: Seeding Chad Thompson <chad@weblinkservices.com>
0 siblings, 1 reply; 6+ messages in thread
From: Peter Eisentraut @ 2002-07-15 22:54 UTC (permalink / raw)
To: Chad Thompson <chad@weblinkservices.com>; +Cc: pgsql-novice <pgsql-novice@postgresql.org>; pgsql-sql
Chad Thompson writes:
> create table "temp"(
> select distinct(full_phone)
> >from lists
> where client_id =8)
>
> This gives me 100,000 unique records
>
> What i would like to do is, every 2500, insert a specific number like '5552552555'
The first thing you're going to have to define is what you mean with
"every 2500", because records in tables are not ordered.
--
Peter Eisentraut peter_e@gmx.net
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Seeding
2002-07-15 18:45 Seeding Chad Thompson <chad@weblinkservices.com>
2002-07-15 22:54 ` Re: [SQL] Seeding Peter Eisentraut <peter_e@gmx.net>
@ 2002-07-16 17:31 ` Chad Thompson <chad@weblinkservices.com>
2002-07-16 18:38 ` Re: Seeding Ron Johnson <ron.l.johnson@cox.net>
2002-07-17 22:33 ` Re: Seeding Peter Eisentraut <peter_e@gmx.net>
0 siblings, 2 replies; 6+ messages in thread
From: Chad Thompson @ 2002-07-16 17:31 UTC (permalink / raw)
To: Peter Eisentraut <peter_e@gmx.net>; +Cc: pgsql-novice <pgsql-novice@postgresql.org>
So if there is an order by in that statement and i want to insert every 2500
records is that specific?
e.g.
create table "temp"(
select distinct(full_phone)
from lists
where client_id =8
order by full_phone)
Thanks
Chad
----- Original Message -----
From: "Peter Eisentraut" <peter_e@gmx.net>
To: "Chad Thompson" <chad@weblinkservices.com>
Cc: "pgsql-novice" <pgsql-novice@postgresql.org>; "pgsql-sql"
<pgsql-sql@postgresql.org>
Sent: Monday, July 15, 2002 4:54 PM
Subject: Re: [SQL] Seeding
> Chad Thompson writes:
>
> > create table "temp"(
> > select distinct(full_phone)
> > >from lists
> > where client_id =8)
> >
> > This gives me 100,000 unique records
> >
> > What i would like to do is, every 2500, insert a specific number like
'5552552555'
>
> The first thing you're going to have to define is what you mean with
> "every 2500", because records in tables are not ordered.
>
> --
> Peter Eisentraut peter_e@gmx.net
>
>
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Seeding
2002-07-15 18:45 Seeding Chad Thompson <chad@weblinkservices.com>
2002-07-15 22:54 ` Re: [SQL] Seeding Peter Eisentraut <peter_e@gmx.net>
2002-07-16 17:31 ` Re: Seeding Chad Thompson <chad@weblinkservices.com>
@ 2002-07-16 18:38 ` Ron Johnson <ron.l.johnson@cox.net>
2002-07-16 19:38 ` Re: Seeding Chad Thompson <chad@weblinkservices.com>
1 sibling, 1 reply; 6+ messages in thread
From: Ron Johnson @ 2002-07-16 18:38 UTC (permalink / raw)
To: PgSQL Novice ML <pgsql-novice@postgresql.org>
On Tue, 2002-07-16 at 12:31, Chad Thompson wrote:
> So if there is an order by in that statement and i want to insert every 2500
> records is that specific?
But you'll still have trouble, since the next time you say
ORDER BY FULL_PHONE, all of the records with FULL_PHONE='5552552555'
will all be grouped together.
What is the reason for wanting these '5552552555' records?
Maybe there is another way to skin this cat...
> e.g.
> create table "temp"(
> select distinct(full_phone)
> from lists
> where client_id =8
> order by full_phone)
>
> Thanks
> Chad
>
> ----- Original Message -----
> From: "Peter Eisentraut" <peter_e@gmx.net>
> To: "Chad Thompson" <chad@weblinkservices.com>
> Cc: "pgsql-novice" <pgsql-novice@postgresql.org>; "pgsql-sql"
> <pgsql-sql@postgresql.org>
> Sent: Monday, July 15, 2002 4:54 PM
> Subject: Re: [SQL] Seeding
>
>
> > Chad Thompson writes:
> >
> > > create table "temp"(
> > > select distinct(full_phone)
> > > >from lists
> > > where client_id =8)
> > >
> > > This gives me 100,000 unique records
> > >
> > > What i would like to do is, every 2500, insert a specific number like
> '5552552555'
> >
> > The first thing you're going to have to define is what you mean with
> > "every 2500", because records in tables are not ordered.
--
+-----------------------------------------------------------------+
| Ron Johnson, Jr. Home: ron.l.johnson@cox.net |
| Jefferson, LA USA |
| |
| "The greatest dangers to liberty lurk in insidious encroachment |
| by men of zeal, well-meaning, but without understanding." |
| Justice Louis Brandeis, dissenting, Olmstead v US (1928) |
+-----------------------------------------------------------------+
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Seeding
2002-07-15 18:45 Seeding Chad Thompson <chad@weblinkservices.com>
2002-07-15 22:54 ` Re: [SQL] Seeding Peter Eisentraut <peter_e@gmx.net>
2002-07-16 17:31 ` Re: Seeding Chad Thompson <chad@weblinkservices.com>
2002-07-16 18:38 ` Re: Seeding Ron Johnson <ron.l.johnson@cox.net>
@ 2002-07-16 19:38 ` Chad Thompson <chad@weblinkservices.com>
0 siblings, 0 replies; 6+ messages in thread
From: Chad Thompson @ 2002-07-16 19:38 UTC (permalink / raw)
To: Ron Johnson <ron.l.johnson@cox.net>; pgsql-novice <pgsql-novice@postgresql.org>
I feed this list into a 3rd party dialer. My objective is to try to have my
number or the clients number called during the running of the project. I
need the list to be generated from the database so the results of the
project will be submitted to the database. (if i generate a text file to
feed to the dialer the results only show up in a text file.)
Thanks
Chad
----- Original Message -----
From: "Ron Johnson" <ron.l.johnson@cox.net>
To: "PgSQL Novice ML" <pgsql-novice@postgresql.org>
Sent: Tuesday, July 16, 2002 12:38 PM
Subject: Re: [NOVICE] Seeding
> On Tue, 2002-07-16 at 12:31, Chad Thompson wrote:
> > So if there is an order by in that statement and i want to insert every
2500
> > records is that specific?
>
> But you'll still have trouble, since the next time you say
> ORDER BY FULL_PHONE, all of the records with FULL_PHONE='5552552555'
> will all be grouped together.
>
> What is the reason for wanting these '5552552555' records?
> Maybe there is another way to skin this cat...
>
> > e.g.
> > create table "temp"(
> > select distinct(full_phone)
> > from lists
> > where client_id =8
> > order by full_phone)
> >
> > Thanks
> > Chad
> >
> > ----- Original Message -----
> > From: "Peter Eisentraut" <peter_e@gmx.net>
> > To: "Chad Thompson" <chad@weblinkservices.com>
> > Cc: "pgsql-novice" <pgsql-novice@postgresql.org>; "pgsql-sql"
> > <pgsql-sql@postgresql.org>
> > Sent: Monday, July 15, 2002 4:54 PM
> > Subject: Re: [SQL] Seeding
> >
> >
> > > Chad Thompson writes:
> > >
> > > > create table "temp"(
> > > > select distinct(full_phone)
> > > > >from lists
> > > > where client_id =8)
> > > >
> > > > This gives me 100,000 unique records
> > > >
> > > > What i would like to do is, every 2500, insert a specific number
like
> > '5552552555'
> > >
> > > The first thing you're going to have to define is what you mean with
> > > "every 2500", because records in tables are not ordered.
>
> --
> +-----------------------------------------------------------------+
> | Ron Johnson, Jr. Home: ron.l.johnson@cox.net |
> | Jefferson, LA USA |
> | |
> | "The greatest dangers to liberty lurk in insidious encroachment |
> | by men of zeal, well-meaning, but without understanding." |
> | Justice Louis Brandeis, dissenting, Olmstead v US (1928) |
> +-----------------------------------------------------------------+
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Seeding
2002-07-15 18:45 Seeding Chad Thompson <chad@weblinkservices.com>
2002-07-15 22:54 ` Re: [SQL] Seeding Peter Eisentraut <peter_e@gmx.net>
2002-07-16 17:31 ` Re: Seeding Chad Thompson <chad@weblinkservices.com>
@ 2002-07-17 22:33 ` Peter Eisentraut <peter_e@gmx.net>
1 sibling, 0 replies; 6+ messages in thread
From: Peter Eisentraut @ 2002-07-17 22:33 UTC (permalink / raw)
To: Chad Thompson <chad@weblinkservices.com>; +Cc: pgsql-novice <pgsql-novice@postgresql.org>
Chad Thompson writes:
> So if there is an order by in that statement and i want to insert every 2500
> records is that specific?
>
> e.g.
> create table "temp"(
> select distinct(full_phone)
> >from lists
> where client_id =8
> order by full_phone)
That will make the table temporarily ordered, but that will only last
until the next update.
Maybe you want to number your records, and then you can insert the records
you want at the numbers you want (2500, 5000, ...).
--
Peter Eisentraut peter_e@gmx.net
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2002-07-17 22:33 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-07-15 18:45 Seeding Chad Thompson <chad@weblinkservices.com>
2002-07-15 22:54 ` Peter Eisentraut <peter_e@gmx.net>
2002-07-16 17:31 ` Chad Thompson <chad@weblinkservices.com>
2002-07-16 18:38 ` Ron Johnson <ron.l.johnson@cox.net>
2002-07-16 19:38 ` Chad Thompson <chad@weblinkservices.com>
2002-07-17 22:33 ` Peter Eisentraut <peter_e@gmx.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox