Re:
James Oden <joden@lee.k12.nc.us>
From: James Olin Oden <joden@lee.k12.nc.us>
To: Doug Smith <doug@the-bridge.net>, "pgsql-general@postgreSQL.org" <pgsql-general@postgreSQL.org>
Date: 1998-10-19T14:41:46Z
Lists: pgsql-general
> Why is that I can only cat two variables in a select statement.ex. > select lastname||' '||firstname||' '||address > Delivers an parseing error at "||". When tryingex. select > lastnamae||firstnameIt works fine.What's up? > > Doug... Hi Doug, The || operator operates more like a functiion than an operator. What I mean by that is that, as you have surmised, it takes two and only two arguments. This does not mean that you cannot concatenate more than two strings...you just need to use parenthesis in the proper way. Your query would become: select ((((lastname||' ')||firstname)||' ')||address Of course you would need the rest of your query (I assume that was just the half that was giving you trouble). Hope this helps...james