Re: What err ??? - Mailing list pgsql-admin

From Oliver Elphick
Subject Re: What err ???
Date
Msg-id 1023465770.26291.5859.camel@linda
Whole thread Raw
In response to What err ???  ("Robson Martins" <robson-martins@bol.com.br>)
List pgsql-admin
On Thu, 2002-06-06 at 21:43, Robson Martins wrote:
> What err ???
>
> SELECT RazaoSocial + ' - ' + Iif(Bairro Is Null,'',Bairro + ' ') + CGCCli As Coluna FROM Clientes WHERE RazaoSocial
Like'%A%' 
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

You should probably be using COALESCE() here.

The string concatenation operator is not + but ||

All those capital letters will be folded to lower-case.  If you have
actually created things in the database whose names contain capitals,
you will need to enclose those names in double-quotes.

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C

     "There is a way that seems right to a man, but in the
      end it leads to death."
                                        Proverbs 16:25

Attachment

pgsql-admin by date:

Previous
From: Masaru Sugawara
Date:
Subject: Re: What err ???
Next
From: "Nick Fankhauser"
Date:
Subject: Re: What err ???