phpgroupware-developers
[Top][All Lists]
Advanced

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

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


From: Edgar Luna
Subject: [Phpgroupware-developers] Contact function for SQL (howto in mssql)
Date: Thu, 11 Sep 2003 21:08:38 -0500
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

Hi all specially signurde,

Now that I did the sql classes for phpGroupWare (that generate the
right sql for each database), people on irc channel have found a
useful function that could be added.

This is a concat function that allows concatenate strings to NULL, and
the result be a the string. Afaik, and based on web research, the
standard says that trying to concatenate something to NULL, the result
must be NULL. But we found that will be very useful (apart of support
the standard concatenate), have the other functionality.

Now, for pgsql I know (from Brian Johnson), that I could do:

SELECT COALESCE(last_name,'') || COALESCE(org_name,'') || ... as name ...

and I search for something in mysql and found:
SELECT CONCAT(IFNULL(last_name,''), IFNULL(org_name,''), ...) as name ...

so the only one missing here is the mssql way. Thats what I asked to
you help me, I haven't access to this database to try. So if you could
help me, we could provide this to phpGroupWare developers.

Best regards

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

Attachment: pgpQDUCXgoIUc.pgp
Description: PGP signature


reply via email to

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