pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedProblem -Postgre sql
6+ messages / 5 participants
[nested] [flat]
* Problem -Postgre sql
@ 2005-10-11 07:20 Vikas J <vikas.jadhav@codecindia.com>
2005-10-18 23:44 ` Re: Problem -Postgre sql Michael Glaesemann <grzm@myrealbox.com>
2005-10-18 23:51 ` Re: Problem -Postgre sql Michael Fuhr <mike@fuhr.org>
2005-10-19 18:33 ` Re: Problem -Postgre sql Muralidharan Ramakrishnan <contact2muraliin@yahoo.co.in>
0 siblings, 3 replies; 6+ messages in thread
From: Vikas J @ 2005-10-11 07:20 UTC (permalink / raw)
To: pgsql-sql
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
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Problem -Postgre sql
2005-10-11 07:20 Problem -Postgre sql Vikas J <vikas.jadhav@codecindia.com>
@ 2005-10-18 23:44 ` Michael Glaesemann <grzm@myrealbox.com>
2005-10-19 05:41 ` Re: Problem -Postgre sql Michael Glaesemann <grzm@myrealbox.com>
2 siblings, 1 reply; 6+ messages in thread
From: Michael Glaesemann @ 2005-10-18 23:44 UTC (permalink / raw)
To: Vikas J <vikas.jadhav@codecindia.com>; +Cc: pgsql-sql
[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
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Problem -Postgre sql
2005-10-11 07:20 Problem -Postgre sql Vikas J <vikas.jadhav@codecindia.com>
2005-10-18 23:44 ` Re: Problem -Postgre sql Michael Glaesemann <grzm@myrealbox.com>
@ 2005-10-19 05:41 ` Michael Glaesemann <grzm@myrealbox.com>
2005-10-19 06:03 ` Re: Problem -Postgre sql Chris Travers <chris@travelamericas.com>
0 siblings, 1 reply; 6+ messages in thread
From: Michael Glaesemann @ 2005-10-19 05:41 UTC (permalink / raw)
To: Vikas J <vikas.jadhav@codecindia.com>; +Cc: pgsql-sql
[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
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Problem -Postgre sql
2005-10-11 07:20 Problem -Postgre sql Vikas J <vikas.jadhav@codecindia.com>
2005-10-18 23:44 ` Re: Problem -Postgre sql Michael Glaesemann <grzm@myrealbox.com>
2005-10-19 05:41 ` Re: Problem -Postgre sql Michael Glaesemann <grzm@myrealbox.com>
@ 2005-10-19 06:03 ` Chris Travers <chris@travelamericas.com>
0 siblings, 0 replies; 6+ messages in thread
From: Chris Travers @ 2005-10-19 06:03 UTC (permalink / raw)
To: Michael Glaesemann <grzm@myrealbox.com>; +Cc: Vikas J <vikas.jadhav@codecindia.com>; pgsql-sql
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
>
>
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Problem -Postgre sql
2005-10-11 07:20 Problem -Postgre sql Vikas J <vikas.jadhav@codecindia.com>
@ 2005-10-18 23:51 ` Michael Fuhr <mike@fuhr.org>
2 siblings, 0 replies; 6+ messages in thread
From: Michael Fuhr @ 2005-10-18 23:51 UTC (permalink / raw)
To: Vikas J <vikas.jadhav@codecindia.com>; +Cc: pgsql-sql
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
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Problem -Postgre sql
2005-10-11 07:20 Problem -Postgre sql Vikas J <vikas.jadhav@codecindia.com>
@ 2005-10-19 18:33 ` Muralidharan Ramakrishnan <contact2muraliin@yahoo.co.in>
2 siblings, 0 replies; 6+ messages in thread
From: Muralidharan Ramakrishnan @ 2005-10-19 18:33 UTC (permalink / raw)
To: Vikas J <vikas.jadhav@codecindia.com>; pgsql-sql
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.
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2005-10-19 18:33 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-10-11 07:20 Problem -Postgre sql Vikas J <vikas.jadhav@codecindia.com>
2005-10-18 23:44 ` Michael Glaesemann <grzm@myrealbox.com>
2005-10-19 05:41 ` Michael Glaesemann <grzm@myrealbox.com>
2005-10-19 06:03 ` Chris Travers <chris@travelamericas.com>
2005-10-18 23:51 ` Michael Fuhr <mike@fuhr.org>
2005-10-19 18:33 ` Muralidharan Ramakrishnan <contact2muraliin@yahoo.co.in>
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