executing delete in a case statement?

From: Jean-Christian Imbeault <jc(at)mega-bucks(dot)co(dot)jp>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: executing delete in a case statement?
Date: 2002-11-05 10:03:13
Message-ID: 3DC79761.5020607@mega-bucks.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

What is the proper way to execute a delete statement (if possible) in a
case statement. I am trying various versions of the following but can't
get it to work:

"select member_id, case when (select count(buy_later) from cart_li where
member_id=cart_id AND buy_later=true) > 0 then (delete from cart_li
where cart_id=10) end from carts"

Thanks!

Jc

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Danil Kovtunovich 2002-11-05 10:29:23 Re: EMS PostgreSQL Manager released!
Previous Message frbn 2002-11-05 09:22:11 Re: PostgreSQL for Windows 2000