Re: [GENERAL] CONCAT returns null

2016-02-28 Thread Andreas Kretschmer
Adrian Klaver wrote: >> >> NULL concat with a value returns NULL. You can avoid that using >> COALESCE(value, ''), that returns the value, or, if the value NULL, ''. > > > http://www.postgresql.org/docs/9.5/interactive/functions-string.html > " > concat(str "any" [, str "any" [, ...] ]) text

Re: [GENERAL] CONCAT returns null

2016-02-28 Thread Adrian Klaver
On 02/28/2016 02:30 AM, Andreas Kretschmer wrote: Sterpu Victor wrote: Hello I have this concat: CONCAT(f.nrfo, '/', TO_CHAR(fd1.validfrom, '-MM-DD'), f2.nrfo, TO_CHAR (fd7.validfrom, '-MM-DD'), DATE(fd5.validto)-DATE(fd1.validfrom)) that works fine but when I change to this(I added a

Re: [GENERAL] CONCAT returns null

2016-02-28 Thread Sterpu Victor
The problem was from PG Admin that is not displaing cells with a high amount of data. In the application the query is working well. -- Original Message -- From: "Sterpu Victor" To: "PostgreSQL General" Sent: 28/2/2016 12:02:47 PM Subject: [GENERAL] CONCAT returns

Re: [GENERAL] CONCAT returns null

2016-02-28 Thread Charles Clavadetscher
Hello > -Original Message- > From: pgsql-general-ow...@postgresql.org > [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Andreas Kretschmer > Sent: Sonntag, 28. Februar 2016 11:30 > To: pgsql-general@postgresql.org > Subject: Re: [GENERAL] CONCAT returns null

Re: [GENERAL] CONCAT returns null

2016-02-28 Thread Andreas Kretschmer
Sterpu Victor wrote: > Hello > > I have this concat: > CONCAT(f.nrfo, '/', TO_CHAR(fd1.validfrom, '-MM-DD'), f2.nrfo, TO_CHAR > (fd7.validfrom, '-MM-DD'), DATE(fd5.validto)-DATE(fd1.validfrom)) > that works fine but when I change to this(I added a ' with '): > ARRAY_AGG(CONCAT(f.nrfo,

Re: [GENERAL] CONCAT returns null

2016-02-28 Thread Charles Clavadetscher
Hello again > -Original Message- > From: pgsql-general-ow...@postgresql.org > [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Charles > Clavadetscher > Sent: Sonntag, 28. Februar 2016 11:24 > To: 'Sterpu Victor' ; 'PostgreSQL General' >

Re: [GENERAL] CONCAT returns null

2016-02-28 Thread Charles Clavadetscher
Hello Just a short question to that. > CONCAT(f.nrfo, '/', TO_CHAR(fd1.validfrom, '-MM-DD'), f2.nrfo, > TO_CHAR(fd7.validfrom, '-MM-DD'), > DATE(fd5.validto)-DATE(fd1.validfrom)) > that works fine but when I change to this(I added a ' with '): > ARRAY_AGG(CONCAT(f.nrfo, '/', TO_CHAR(fd1.

[GENERAL] CONCAT returns null

2016-02-28 Thread Sterpu Victor
Hello I have this concat: CONCAT(f.nrfo, '/', TO_CHAR(fd1.validfrom, '-MM-DD'), f2.nrfo, TO_CHAR(fd7.validfrom, '-MM-DD'), DATE(fd5.validto)-DATE(fd1.validfrom)) that works fine but when I change to this(I added a ' with '): ARRAY_AGG(CONCAT(f.nrfo, '/', TO_CHAR(fd1.validfrom, '-MM