How can I
Write a prepared query and
Set values at run time and
Execute that query for
different values.
LOOP
…..
…..
sql := INSERT
INTO MYTABLE VALUES(?, ?);
……
--EXECUTE (sql);
END LOOP;
Regards
Dinesh Pandey
Dinesh Pandey wrote:
How can I
1. Write a prepared query and
2. Set values at run time and
3. Execute that query for different values.
LOOP
…..
…..
sql := INSERT INTO MYTABLE VALUES(?, ?);
--EXECUTE (sql);
You don't say what language you want to use, but assuming it's plpgsql,
I am using PL/pgSQL.
Thanks
Dinesh Pandey
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Frank Bax
Sent: Thursday, April 14, 2005
8:24 PM
To: pgsql-sql@postgresql.org
Subject: Re: [SQL] Prepared query
?
At
10:28 AM 4/14/05, Dinesh Pandey wrote
At 10:28 AM 4/14/05, Dinesh Pandey wrote:
How can
I
Write a prepared query and
Set values at run time and
Execute that query for different values.
Depends on what language you are using - try interfaces mailing
list.
ter Valley', 't', 200.00);
Thanks
Dinesh Pandey
-Original Message-
From: Richard Huxton [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 14, 2005 8:29 PM
To: [EMAIL PROTECTED]
Cc: 'PostgreSQL'
Subject: Re: [SQL] Prepared query ?
Dinesh Pandey wrote:
> How can I
&
Good morning,
I tried to use prepared query plan to update columns, but it did not
update at all.
PREPARE pname(varchar) AS
UPDATE t1
SETcol1 = false
WHERE col1 AND
col2 = '$1' ;
EXECUTE pname( 'value' )
Could someone tell me where I did wrong please?
Thanks alot!
--
Sent vi
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Emi Lu
Sent: Wednesday, September 17, 2008 2:55 PM
To: pgsql-sql@postgresql.org
Subject: [SQL] prepared query plan did not update
Good morning,
I tried to use prepared query plan to update columns, but
I tried to use prepared query plan to update columns, but it did not
update at all.
PREPARE pname(varchar) AS
UPDATE t1
SETcol1 = false
WHERE col1 AND
col2 = '$1' ;
EXECUTE pname( 'value' )
Could someone tell me where I did wrong please?
WHERE col1 AND
col2 = '$1' ;
Are
On Wed, 17 Sep 2008, Emi Lu wrote:
> Good morning,
>
> I tried to use prepared query plan to update columns, but it did not
> update at all.
>
> PREPARE pname(varchar) AS
> UPDATE t1
> SETcol1 = false
> WHERE col1 AND
> col2 = '$1' ;
I don't think you want those quotes in the second
Stephan Szabo wrote:
On Wed, 17 Sep 2008, Emi Lu wrote:
Good morning,
I tried to use prepared query plan to update columns, but it did not
update at all.
PREPARE pname(varchar) AS
UPDATE t1
SETcol1 = false
WHERE col1 AND
col2 = '$1' ;
I don't think you want those quotes in the
On Wed, 17 Sep 2008, Emi Lu wrote:
> Stephan Szabo wrote:
> > On Wed, 17 Sep 2008, Emi Lu wrote:
> >
> >> Good morning,
> >>
> >> I tried to use prepared query plan to update columns, but it did not
> >> update at all.
> >>
> >> PREPARE pname(varchar) AS
> >> UPDATE t1
> >> SETcol1 = false
> >
11 matches
Mail list logo