Re: position(text,text) function
От | Dorin Grunberg |
---|---|
Тема | Re: position(text,text) function |
Дата | |
Msg-id | 4.3.2.7.2.20010723135813.00b50630@pophost обсуждение исходный текст |
Ответ на | position(text,text) function (karl@tecc.co.uk (Karl Orbell)) |
Список | pgsql-sql |
<font size="3">The correct way would be:<br /><br /> select position('el' in 'Hello');<br /><br /> Dorin<br /><br /> At 02:27PM 7/23/01 +0000, Karl Orbell wrote:<br /><blockquote cite="cite" type="cite">I'm having trouble using the positionfunction, it's a simple built-in function.<br /><br /> It returns the index of a substring within a main string.<br/><br /> But, I just can't get it to work, it always gives this silly parser error.<br /> I've tried it in a varietyof ways with variables instead of constants casting <br /> to text and using it in other contexts, (ie. in functions,not just in a <br /> select). What am I doing wrong? Is this not the correct syntax for a two <br /> argumentfunction?<br /><br /> test=# select position('hello','el');<br /> ERROR: parser: parse error at or near ","<br /><br/><br /> Karl Orbell.<br /><br /><br /> ---------------------------(end of broadcast)---------------------------<br/> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org</blockquote></font><br/>
В списке pgsql-sql по дате отправления: