From vikas.jadhav@codecindia.com Tue Oct 11 07:17:09 2005 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E54ADD9570 for ; Tue, 11 Oct 2005 04:17:09 -0300 (ADT) 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 28708-03 for ; Tue, 11 Oct 2005 07:17:06 +0000 (GMT) Received: from smtp.bizmail.net4india.com (smtp.bizmail.net4india.com [202.71.129.102]) by svr1.postgresql.org (Postfix) with ESMTP id C6D03D6F17 for ; Tue, 11 Oct 2005 04:17:06 -0300 (ADT) Received: from [61.11.17.20] (helo=devpser02) by smtp.bizmail.net4india.com with smtp (Exim 3.36 #2) id 1EPEOv-0000M7-00 for pgsql-sql@postgresql.org; Tue, 11 Oct 2005 12:48:18 +0530 Message-ID: <000c01c5ce34$61797c20$6f0aa8c0@codecindia.com> From: "Vikas J" To: Subject: Problem -Postgre sql Date: Tue, 11 Oct 2005 12:50:49 +0530 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0007_01C5CE62.68215920" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.001 required=5 tests=[HTML_MESSAGE=0.001] X-Spam-Level: X-Archive-Number: 200510/196 X-Sequence-Number: 23049 This is a multi-part message in MIME format. ------=_NextPart_000_0007_01C5CE62.68215920 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi I want to know substitute function for sql server ISNULL() function in = postgre Regards, Vikas Jadhav=20 Codec Communication Pvt. Ltd. Swargate, Pune. Ph: 020-2422 1460/70 (Ext 37) Email: vikas.jadhav@codecindia.com ------=_NextPart_000_0007_01C5CE62.68215920 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi
I want to know substitute function for = sql server=20 ISNULL() function in postgre
 
Regards,

Vikas Jadhav =
Codec=20 Communication Pvt. Ltd.
Swargate, Pune.
Ph: 020-2422 1460/70 (Ext=20 37)
Email: vikas.jadhav@codecindia.com
------=_NextPart_000_0007_01C5CE62.68215920-- From grzm@myrealbox.com Tue Oct 18 23:45:07 2005 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A897ADA03D for ; Tue, 18 Oct 2005 20:45:07 -0300 (ADT) 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 21144-05 for ; Tue, 18 Oct 2005 23:45:04 +0000 (GMT) Received: from smtp-send.myrealbox.com (smtp-send.myrealbox.com [151.155.5.143]) by svr1.postgresql.org (Postfix) with ESMTP id BF0FEDA020 for ; Tue, 18 Oct 2005 20:45:05 -0300 (ADT) Received: from [172.16.1.100] grzm [61.197.227.146] by smtp-send.myrealbox.com with NetMail SMTP Agent $Revision: 1.6 $ on Linux via secured & encrypted transport (TLS); Tue, 18 Oct 2005 17:45:00 -0600 In-Reply-To: <000c01c5ce34$61797c20$6f0aa8c0@codecindia.com> References: <000c01c5ce34$61797c20$6f0aa8c0@codecindia.com> Mime-Version: 1.0 (Apple Message framework v734) X-Priority: 3 Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Cc: Content-Transfer-Encoding: 7bit From: Michael Glaesemann Subject: Re: Problem -Postgre sql Date: Wed, 19 Oct 2005 08:44:58 +0900 To: "Vikas J" X-Mailer: Apple Mail (2.734) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.119 required=5 tests=[AWL=0.119] X-Spam-Level: X-Archive-Number: 200510/199 X-Sequence-Number: 23052 [It's PostgreSQL, Postgres, or pgsql. It's never "postgre"] On Oct 11, 2005, at 16:20 , Vikas J wrote: > Hi > I want to know substitute function for sql server ISNULL() function > in postgre I'm not quite sure what the ISNULL() function does in SQL Server, but it sounds like it might be similar to either COALESCE or the IS NULL expression. These pages might help you: COALESCE http://www.postgresql.org/docs/8.0/interactive/functions- conditional.html#AEN12056 IS NULL http://www.postgresql.org/docs/8.0/interactive/functions-comparison.html Hope this helps. Michael Glaesemann grzm myrealbox com From mike@fuhr.org Tue Oct 18 23:52:15 2005 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9051BD97CD for ; Tue, 18 Oct 2005 20:52:15 -0300 (ADT) 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 37326-05 for ; Tue, 18 Oct 2005 23:52:12 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id B009CD6EB7 for ; Tue, 18 Oct 2005 20:52:13 -0300 (ADT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id j9INpZqE093583 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 18 Oct 2005 17:51:38 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.4/8.13.4) with ESMTP id j9INpZDe044462; Tue, 18 Oct 2005 17:51:35 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.4/8.13.4/Submit) id j9INpZhu044461; Tue, 18 Oct 2005 17:51:35 -0600 (MDT) (envelope-from mfuhr) Date: Tue, 18 Oct 2005 17:51:35 -0600 From: Michael Fuhr To: Vikas J Cc: pgsql-sql@postgresql.org Subject: Re: Problem -Postgre sql Message-ID: <20051018235135.GA44375@winnie.fuhr.org> References: <000c01c5ce34$61797c20$6f0aa8c0@codecindia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000c01c5ce34$61797c20$6f0aa8c0@codecindia.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 required=5 tests=[AWL=0.006] X-Spam-Level: X-Archive-Number: 200510/205 X-Sequence-Number: 23058 On Tue, Oct 11, 2005 at 12:50:49PM +0530, Vikas J wrote: > I want to know substitute function for sql server ISNULL() function in postgre If you look in the index of the PostgreSQL documentation you'll find an entry for ISNULL: http://www.postgresql.org/docs/8.0/interactive/bookindex.html If PostgreSQL's ISNULL doesn't do what you want then please explain what you're trying to do. Many people on these lists don't use SQL Server so they don't know its ISNULL works. (BTW, it's PostgreSQL or Postgres, not Postgre.) -- Michael Fuhr From grzm@myrealbox.com Wed Oct 19 05:41:42 2005 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 18CF8D8DD1 for ; Wed, 19 Oct 2005 02:41:42 -0300 (ADT) 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 31619-08 for ; Wed, 19 Oct 2005 05:41:37 +0000 (GMT) Received: from smtp-send.myrealbox.com (smtp-send.myrealbox.com [151.155.5.143]) by svr1.postgresql.org (Postfix) with ESMTP id 00545D8B94 for ; Wed, 19 Oct 2005 02:41:37 -0300 (ADT) Received: from [172.16.1.100] grzm [61.197.227.146] by smtp-send.myrealbox.com with NetMail SMTP Agent $Revision: 1.6 $ on Linux via secured & encrypted transport (TLS); Tue, 18 Oct 2005 23:41:29 -0600 In-Reply-To: <00b101c5d46e$3cd6fa60$6f0aa8c0@codecindia.com> References: <000c01c5ce34$61797c20$6f0aa8c0@codecindia.com> <00b101c5d46e$3cd6fa60$6f0aa8c0@codecindia.com> Mime-Version: 1.0 (Apple Message framework v734) X-Priority: 3 Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <8FB39706-1EFC-4D9F-ADBD-1311D4B08940@myrealbox.com> Cc: postgresql sql list Content-Transfer-Encoding: 7bit From: Michael Glaesemann Subject: Re: Problem -Postgre sql Date: Wed, 19 Oct 2005 14:41:25 +0900 To: "Vikas J" X-Mailer: Apple Mail (2.734) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.069 required=5 tests=[AWL=-0.763, RCVD_IN_BL_SPAMCOP_NET=1.832] X-Spam-Level: * X-Archive-Number: 200510/209 X-Sequence-Number: 23062 [Please do not email me directly. Please post to the list so others may help and benefit from the discussion.] On Oct 19, 2005, at 14:30 , Vikas J wrote: > IsNull in sql server has syntax like isnull(column,substitute) > if "column" is null it shows value of "substitute". That can be > achieved > with CASE clause in postrgre but I want alternate function. If you look at the doc links I provided below, you will find that COALESCE does exactly this. > Can you tell me how to write function like MAX() that will work > directly on > colmuns. I want to create my own function that will not need table > name as > paramter. > it shld work similarly to max() function in postgre. [Again, it's PostgreSQL or Postgres. It is *not* spelled "postgre".] In my experience, the max() aggregate function does not require table names as parameters and work on columns directly. http://www.postgresql.org/docs/8.0/interactive/functions-aggregate.html I suggest you take some time to look at the docs. They're quite extensive and helpful. http://www.postgresql.org/docs/8.0/interactive/index.html Michael Glaesemann grzm myrealbox com >> I'm not quite sure what the ISNULL() function does in SQL Server, but >> it sounds like it might be similar to either COALESCE or the IS NULL >> expression. >> >> These pages might help you: >> >> COALESCE >> http://www.postgresql.org/docs/8.0/interactive/functions- >> conditional.html#AEN12056 >> >> IS NULL >> http://www.postgresql.org/docs/8.0/interactive/functions- >> comparison.html From chris@travelamericas.com Wed Oct 19 06:03:08 2005 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 297D7D85D4 for ; Wed, 19 Oct 2005 03:03:08 -0300 (ADT) 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 42306-03 for ; Wed, 19 Oct 2005 06:03:05 +0000 (GMT) Received: from mail.travelamericas.com (unknown [206.130.134.147]) by svr1.postgresql.org (Postfix) with SMTP id 65801D849C for ; Wed, 19 Oct 2005 03:03:05 -0300 (ADT) Received: (qmail 11634 invoked from network); 19 Oct 2005 06:03:06 -0000 Received: from unknown (HELO ?10.0.0.253?) (10.0.0.253) by verkiel.travelamericas.com with SMTP; 19 Oct 2005 06:03:06 -0000 Message-ID: <4355E199.2040904@travelamericas.com> Date: Tue, 18 Oct 2005 23:03:05 -0700 From: Chris Travers User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Michael Glaesemann Cc: Vikas J , postgresql sql list Subject: Re: Problem -Postgre sql References: <000c01c5ce34$61797c20$6f0aa8c0@codecindia.com> <00b101c5d46e$3cd6fa60$6f0aa8c0@codecindia.com> <8FB39706-1EFC-4D9F-ADBD-1311D4B08940@myrealbox.com> In-Reply-To: <8FB39706-1EFC-4D9F-ADBD-1311D4B08940@myrealbox.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.046 required=5 tests=[AWL=-0.004, FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200510/212 X-Sequence-Number: 23065 Correct me if I am wrong, but isn't COALESCE standard in this way? Best Wishes, Chris Travers Metatron Technology Consulting Michael Glaesemann wrote: > [Please do not email me directly. Please post to the list so others > may help and benefit from the discussion.] > > On Oct 19, 2005, at 14:30 , Vikas J wrote: > >> IsNull in sql server has syntax like isnull(column,substitute) >> if "column" is null it shows value of "substitute". That can be >> achieved >> with CASE clause in postrgre but I want alternate function. > > > If you look at the doc links I provided below, you will find that > COALESCE does exactly this. > >> Can you tell me how to write function like MAX() that will work >> directly on >> colmuns. I want to create my own function that will not need table >> name as >> paramter. >> it shld work similarly to max() function in postgre. > > > [Again, it's PostgreSQL or Postgres. It is *not* spelled "postgre".] > > In my experience, the max() aggregate function does not require table > names as parameters and work on columns directly. > http://www.postgresql.org/docs/8.0/interactive/functions-aggregate.html > > I suggest you take some time to look at the docs. They're quite > extensive and helpful. > http://www.postgresql.org/docs/8.0/interactive/index.html > > > Michael Glaesemann > grzm myrealbox com > > >>> I'm not quite sure what the ISNULL() function does in SQL Server, but >>> it sounds like it might be similar to either COALESCE or the IS NULL >>> expression. >>> >>> These pages might help you: >>> >>> COALESCE >>> http://www.postgresql.org/docs/8.0/interactive/functions- >>> conditional.html#AEN12056 >>> >>> IS NULL >>> http://www.postgresql.org/docs/8.0/interactive/functions- >>> comparison.html >> > > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Have you searched our list archives? > > http://archives.postgresql.org > > From contact2muraliin@yahoo.co.in Wed Oct 19 18:33:20 2005 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1351BDA589 for ; Wed, 19 Oct 2005 15:33:20 -0300 (ADT) 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 87151-07 for ; Wed, 19 Oct 2005 18:33:12 +0000 (GMT) Received: from web8608.mail.in.yahoo.com (web8608.mail.in.yahoo.com [202.43.219.83]) by svr1.postgresql.org (Postfix) with SMTP id 44652D6DAA for ; Wed, 19 Oct 2005 15:33:11 -0300 (ADT) Received: (qmail 92218 invoked by uid 60001); 19 Oct 2005 18:33:02 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.in; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=SbafFQ8erCTMJXLw3z5CpwEkq62Xvk2TbDKFlNSqQbcU0NVk6Vx8lYY9EgL2QSDGMOZX6XXff6ekkaMGIJ14Tzqn1KYQ1+p0V4LCR6tOFFWInkf+zb8IdWjNv20hH1YqnuBAfYoe3OrMyHd1zD6CuZZm2tTTtlQ37CNFL6ORl6g= ; Message-ID: <20051019183302.92216.qmail@web8608.mail.in.yahoo.com> Received: from [12.109.150.2] by web8608.mail.in.yahoo.com via HTTP; Wed, 19 Oct 2005 19:33:02 BST Date: Wed, 19 Oct 2005 19:33:02 +0100 (BST) From: Muralidharan Ramakrishnan Subject: Re: Problem -Postgre sql To: Vikas J , pgsql-sql@postgresql.org In-Reply-To: <000c01c5ce34$61797c20$6f0aa8c0@codecindia.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-548338270-1129746782=:91787" Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.415 required=5 tests=[AWL=-0.363, DNS_FROM_RFC_ABUSE=0.374, DNS_FROM_RFC_POST=1.376, HTML_60_70=0.027, HTML_MESSAGE=0.001] X-Spam-Level: * X-Archive-Number: 200510/223 X-Sequence-Number: 23076 --0-548338270-1129746782=:91787 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit COALESCE( , ) Vikas J wrote: Hi I want to know substitute function for sql server ISNULL() function in postgre Regards, Vikas Jadhav Codec Communication Pvt. Ltd. Swargate, Pune. Ph: 020-2422 1460/70 (Ext 37) Email: vikas.jadhav@codecindia.com --------------------------------- Yahoo! India Matrimony: Find your partner online. --0-548338270-1129746782=:91787 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
COALESCE( <variable> , <default value>)
 


Vikas J <vikas.jadhav@codecindia.com> wrote:
Hi
I want to know substitute function for sql server ISNULL() function in postgre
 
Regards,

Vikas Jadhav
Codec Communication Pvt. Ltd.
Swargate, Pune.
Ph: 020-2422 1460/70 (Ext 37)
Email: vikas.jadhav@codecindia.com


Yahoo! India Matrimony: Find your partner online. --0-548338270-1129746782=:91787--