From: | karl(at)tecc(dot)co(dot)uk (Karl Orbell) |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: position(text,text) function |
Date: | 2001-07-24 13:53:57 |
Message-ID: | slrn9lqvfp.3q5.karl@azrael.tecc.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Many thanks for all of the assistance on this question.
I can't say I've ever seen the "a in b" syntax in postgres, but
you live and learn. ;-)
Thanks again.
Karl.
In article <slrn9loctm(dot)qsr(dot)karl(at)azrael(dot)tecc(dot)co(dot)uk>, Karl Orbell wrote:
> I'm having trouble using the position function, it's a simple built-in function.
>
> It returns the index of a substring within a main string.
>
> But, I just can't get it to work, it always gives this silly parser error.
> I've tried it in a variety of ways with variables instead of constants casting
> to text and using it in other contexts, (ie. in functions, not just in a
> select). What am I doing wrong? Is this not the correct syntax for a two
> argument function?
>
> test=# select position('hello','el');
> ERROR: parser: parse error at or near ","
>
>
> Karl Orbell.
>
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Huxton | 2001-07-24 14:23:17 | Re: How to get the server version?? |
Previous Message | Roberto João Lopes Garcia | 2001-07-24 13:50:50 | How to get the server version?? |