From: | Nicolay A Vasiliev <nvasiliev(at)whiteriversoft(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: script |
Date: | 2005-11-10 09:07:43 |
Message-ID: | dkv2l1$i4l$1@sea.gmane.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello!
How do you get the list of id's? If you get it while some calculating
you may get the list of them (1, 3, 6,...) and then produce the query
select * from tablename where id in (your_list)
Hope this helps,
Nicolay
Maik Trömel wrote:
> Hello!
>
> I want to run a shell script with variables under Postgresql.
>
> An example:
> I want to make the following query;
>
> select * from tablename where id=1;
> select * from tablename where id=2;
> select * from tablename where id=3;
> select * from tablename where id=4;
> .........
>
> Is it possible to do it this way and what is the right syntax. All i've
> tried out didn't work.
>
> while i<100 do
> select * from tablename where id=i;
> i=i+1;
> done
>
> Thanks for your help.
>
> Greetings
> Maik
>
From | Date | Subject | |
---|---|---|---|
Next Message | Maik Trömel | 2005-11-10 09:10:22 | script |
Previous Message | Richard Sydney-Smith | 2005-11-10 09:00:37 | Windows installer fails for 8.1 |