Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tp2Mp-0001M2-5i for pgsql-sql@arkaria.postgresql.org; Sat, 29 Dec 2012 19:46:47 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1Tp2Mo-0004Ry-AI for pgsql-sql@arkaria.postgresql.org; Sat, 29 Dec 2012 19:46:46 +0000 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tp2Mn-0004Rs-9r for pgsql-sql@postgresql.org; Sat, 29 Dec 2012 19:46:45 +0000 Received: from mail-da0-f41.google.com ([209.85.210.41]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tp2Ml-0007GK-Mj for pgsql-sql@postgresql.org; Sat, 29 Dec 2012 19:46:44 +0000 Received: by mail-da0-f41.google.com with SMTP id e20so5272937dak.28 for ; Sat, 29 Dec 2012 11:46:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=368/eOpRnLuP0NnX1zepyBIY+/fqMDhKEwh17vaKz94=; b=rcHty+9XOCrIlbh+8dYAE78s9KX2AbtPCFmEwhpDJnbKgQL2bfMqdz9arxdrXnc4Fc 5GullXmDzX1oT4mr3mTvE2Cd2aRLawzVHCmFOMpxaKqHQsDeDi2672wfV/y6bULIRRS9 ArEy12OdJfol57qjewOkwyWqq8GuGCTSOZ8357KKCytwdgXNzK6zoGZx+P/MZJjxdh9q iv3QKm1h6W57FFyywmFMfDMcYNgXhPPzU62pck8GfSQJjemVh8mRV3TTR8UWuKOkzHYw 5Y7z90gg2aYS1WgjAMTy2kECwUBL5AVmyDtTqW4KLY2C3bRzNhjc5+ACTxsqPwDYcOTE P15Q== X-Received: by 10.66.73.138 with SMTP id l10mr109320386pav.44.1356810402667; Sat, 29 Dec 2012 11:46:42 -0800 (PST) Received: from [192.168.0.2] (c-24-17-164-54.hsd1.wa.comcast.net. [24.17.164.54]) by mx.google.com with ESMTPS id na7sm21880357pbc.48.2012.12.29.11.46.40 (version=SSLv3 cipher=OTHER); Sat, 29 Dec 2012 11:46:41 -0800 (PST) Message-ID: <50DF489F.4030109@gmail.com> Date: Sat, 29 Dec 2012 11:46:39 -0800 From: Adrian Klaver User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: JORGE MALDONADO CC: pgsql-sql@postgresql.org Subject: Re: Query execution based on a condition References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org On 12/29/2012 11:05 AM, JORGE MALDONADO wrote: > I have a query similar to the one shown below but, depending on the > value of a field, only the first SELECT statement shoud execute and the > other 3 should be ignored. Is there a way to achieve this situation? Probably so, but is hard to be specific without more information. In a particular the condition/field being tested and values being tested for. > Respectfully, > Jorge Maldonado -- Adrian Klaver adrian.klaver@gmail.com -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql