Re: What err ???

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: Robson Martins <robson-martins(at)bol(dot)com(dot)br>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: What err ???
Date: 2002-06-07 16:02:49
Message-ID: 1023465770.26291.5859.camel@linda
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)Elphick(at)lfix(dot)co(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tim Ellis 2002-06-07 17:13:08 Re: What err ???
Previous Message Nick Fankhauser 2002-06-07 15:49:26 Re: What err ???