phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Phpgroupware-developers] Contact function for SQL (howto in mssql)


From: Edgar Luna
Subject: Re: [Phpgroupware-developers] Contact function for SQL (howto in mssql)
Date: Sat, 13 Sep 2003 02:58:14 -0500
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

"Brian Johnson" <address@hidden> writes:

> Found out something today.  pgsql, mysql, and mssql all support the CASE 
> statement
> in sql

> It might be good to keep the code as standard as possible (even though we are 
> using
> the db specific concat functions, someday they might merge on one standard) 
> and use
> the CASE function instead of COALESCE() or ISNULL() or IFNULL()

> http://www.postgresql.org/docs/7.2/interactive/functions-conditional.html
> http://www.mysql.com/doc/en/Control_flow_functions.html
> http://dbforums.com/t907538.html
Ok, I'll read more on it, tomorrow.

> Example:
> SELECT a,
> CASE WHEN a IS NOT NULL THEN a
> ELSE ''
> END
>>FROM test;
Not sure if this is exactly the same for mssql.

Thanks a lot Brian

-- 
Edgar Antonio Luna Díaz - http://www.sogrp.com
Fingerprint: C008 5EAC 5272 AC8C 7589  4821 8B34 6166 8733 8310




reply via email to

[Prev in Thread] Current Thread [Next in Thread]