pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
delete with and
3+ messages / 2 participants
[nested] [flat]

* delete with and
@ 1999-05-17 14:55  Mario Olimpio de Menezes <mario@curiango.ipen.br>
  0 siblings, 0 replies; 3+ messages in thread

From: Mario Olimpio de Menezes @ 1999-05-17 14:55 UTC (permalink / raw)
  To: pgsql-sql


Hi,

	I'm trying to port some perl scripts that used MySql to Postgres
and I'm having problems with a delete statement.
	With MySql, the script has a line like this:
DELETE FROM CartItems WHERE UserID='$CartCookie' AND ItemID='$ItemID'
	How can I use such delete statement in Postgres?
	Is there another way to do this?
	Please, help and if possible cc to my e-mail as I'm not currently 
subscribed to this list.
	Thanks,
[]s,
Mario O.de Menezes            "Many are the plans in a man's heart, but
    IPEN-CNEN/SP                 is the Lord's purpose that prevails"
http://curiango.ipen.br/~mario                 Prov. 19.21




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Delete with AND
@ 1999-05-17 15:08  Mario Olimpio de Menezes <mario@curiango.ipen.br>
  0 siblings, 0 replies; 3+ messages in thread

From: Mario Olimpio de Menezes @ 1999-05-17 15:08 UTC (permalink / raw)
  To: pgsql-sql

Hi,

        I'm trying to port some perl scripts that used MySql to Postgres
and I'm having problems with a delete statement.
        With MySql, the script has a line like this:
DELETE FROM CartItems WHERE UserID='$CartCookie' AND ItemID='$ItemID'
        How can I use such delete statement in Postgres?
        Is there another way to do this?
        Please, help and if possible cc to my e-mail as I'm not currently 
subscribed to this list.
        Thanks,

[]s,
Mario O.de Menezes            "Many are the plans in a man's heart, but
    IPEN-CNEN/SP                 is the Lord's purpose that prevails"
http://curiango.ipen.br/~mario                 Prov. 19.21




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* RE: [SQL] Delete with AND
@ 1999-05-17 18:03  Jackson, DeJuan <djackson@cpsgroup.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Jackson, DeJuan @ 1999-05-17 18:03 UTC (permalink / raw)
  To: Mario Olimpio de Menezes <mario@curiango.ipen.br>; pgsql-sql

That statement should work just fine (assuming $CartCookie and $ItemID are
perl variable to be expanded before sent to the DB or that the strings
actually contain those values).

You may be having trouble with the uppercase column and table names if the
tables in the database are actually that case then you'll need to
double-quote the table and column names.
	-DEJ

> Hi,
> 
>         I'm trying to port some perl scripts that used MySql to Postgres
> and I'm having problems with a delete statement.
>         With MySql, the script has a line like this:
> DELETE FROM CartItems WHERE UserID='$CartCookie' AND ItemID='$ItemID'
>         How can I use such delete statement in Postgres?
>         Is there another way to do this?
>         Please, help and if possible cc to my e-mail as I'm not currently 
> subscribed to this list.
>         Thanks,
> 
> []s,
> Mario O.de Menezes            "Many are the plans in a man's heart, but
>     IPEN-CNEN/SP                 is the Lord's purpose that prevails"
> http://curiango.ipen.br/~mario                 Prov. 19.21
> 



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~1999-05-17 18:03 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-05-17 14:55 delete with and Mario Olimpio de Menezes <mario@curiango.ipen.br>
1999-05-17 15:08 Delete with AND Mario Olimpio de Menezes <mario@curiango.ipen.br>
1999-05-17 18:03 RE: [SQL] Delete with AND Jackson, DeJuan <djackson@cpsgroup.com>

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