pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Elphick <olly@lfix.co.uk>
To: Robson Martins <robson-martins@bol.com.br>
Cc: pgsql-admin@postgresql.org
Subject: Re: What err ???
Date: 07 Jun 2002 17:02:49 +0100
Message-ID: <1023465770.26291.5859.camel@linda> (raw)
In-Reply-To: <001701c20e11$b6ff1b00$3a3c620a@catnet.com.br>
References: <001701c20e11$b6ff1b00$3a3c620a@catnet.com.br>

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 

Attachments:

  signature.asc (application/pgp-signature, 188B) download

view thread (11+ messages)  latest in thread

Message-ID: <1023465770.26291.5859.camel@linda>
Permalink:  ../1023465770.26291.5859.camel@linda/
Also on:    postgresql.org/message-id/1023465770.26291.5859.camel@linda

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: olly@lfix.co.uk, robson-martins@bol.com.br
  Subject: Re: What err ???
  In-Reply-To: <1023465770.26291.5859.camel@linda>
  References: <001701c20e11$b6ff1b00$3a3c620a@catnet.com.br> <1023465770.26291.5859.camel@linda>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox