[prev in list] [next in list] [prev in thread] [next in thread]
List: postgresql-sql
Subject: Re: [SQL] String concat operator???
From: Tom Lane <tgl () sss ! pgh ! pa ! us>
Date: 1999-06-30 14:18:06
[Download RAW message or body]
webmaster <webmaster@tony.cz> writes:
> update temp_kat set id_look = substr(ident,1,6) || '-' || substr(ident,7,7)
> where from_kat='P';
> Both id_look and ident are varchars.. So what's wrong with || operator? There
> is an error parsing the querry near || ...
In 6.4.* you have to parenthesize the above because Postgres doesn't
assume that the operator || is associative:
update temp_kat set id_look = (substr(ident,1,6) || '-') || substr(ident,7,7)
where from_kat='P';
6.5 takes the query without parentheses...
regards, tom lane
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic