X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id F0AA7329ECA for ; Tue, 19 Oct 2004 09:22:01 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 00858-02 for ; Tue, 19 Oct 2004 08:21:51 +0000 (GMT) Received: from anchor-post-30.mail.demon.net (anchor-post-30.mail.demon.net [194.217.242.88]) by svr1.postgresql.org (Postfix) with ESMTP id E9EA2329ED3 for ; Tue, 19 Oct 2004 09:21:52 +0100 (BST) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-30.mail.demon.net with esmtp (Exim 4.42) id 1CJpFb-0001Ms-13; Tue, 19 Oct 2004 08:21:51 +0000 Received: from [192.168.1.17] (client17.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 13FE71637E; Tue, 19 Oct 2004 09:21:29 +0100 (BST) Message-ID: <4174CE8C.6090707@archonet.com> Date: Tue, 19 Oct 2004 09:21:32 +0100 From: Richard Huxton User-Agent: Mozilla Thunderbird 0.7 (X11/20040615) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kent Anderson Cc: "Pgsql-Sql@Postgresql. Org" Subject: Re: Ordering a record returned from a stored procedure - date References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/122 X-Sequence-Number: 19225 Kent Anderson wrote: > Never mind, it requires '''''''' on each side of the variable. You will be delighted to learn that "dollar quoting" is in 8.0, which allows you to do things like: CREATE FUNCTION .... AS $$ ...function body here without needing doubling of ' $$ LANGUAGE plpgsql; I believe you can nest them too so long as you change the included string: $UNIQUESYMBOL1$ > -----Original Message----- > From: pgsql-sql-owner@postgresql.org > [mailto:pgsql-sql-owner@postgresql.org]On Behalf Of Kent Anderson > Sent: Monday, October 18, 2004 1:32 PM > To: Pgsql-Sql@Postgresql. Org > Subject: Re: [SQL] Ordering a record returned from a stored procedure - > date issue > > > I have the code working except for the date part of the where clause. Can > anyone point out how > yield_date = ''''10/18/2004'''' > > can be translated so the 10/18/2004 is coming from a variable? > ie yield_date = '' ... variable with date -- Richard Huxton Archonet Ltd