Re: How to write in Postgres

From: Alban Hertroys <haramrae(at)gmail(dot)com>
To: mgould(at)isstrucksoftware(dot)net
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to write in Postgres
Date: 2012-02-07 14:45:06
Message-ID: CAF-3MvOAb0MPZsPa+=BGGY9+ysgDb2re66-iJs6i3gv5kPtqPw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 7 February 2012 15:03, <mgould(at)isstrucksoftware(dot)net> wrote:

> How do I convert this to PostGres. I'm getting a error
> ERROR: syntax error at or near "("
> LINE 23: set chr = substr(lfeid,idx,1);
>

Assuming you are writing this as pl/pgsql code, the way you do your
variable assignments is wrong on two accounts. Find some time to read the
chapter on pl/pgsql if possible ;)

Anyway, that line should read:
chr := substr(lfeid,idx,1);

--
If you can't see the forest for the trees,
Cut the trees and you'll see there is no forest.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2012-02-07 14:49:01 Re: default database selector
Previous Message mgould 2012-02-07 14:03:37 How to write in Postgres