| From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
|---|---|
| To: | Peter Nixon <listuser(at)peternixon(dot)net> |
| Cc: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: left() in postgres |
| Date: | 2002-10-25 17:26:01 |
| Message-ID: | 20021025102422.B37463-100000@megazone23.bigpanda.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Fri, 25 Oct 2002, Peter Nixon wrote:
> I guess I don't understand how to use it properly. can anyone give me some
> more help. When I fire off the following query (at a database of radius
> records)
>
>
> SELECT substring('CalledStationId' from 2 for 3) FROM calls WHERE
I think you'd want something like:
substring(CalledStationId from 1 for 3)
Putting it in single quotes makes it a literal, you were asking for
positions 2-4 in the literal string 'CalledStationId' => 'all'.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | PD Miller | 2002-10-25 17:26:58 | Re: left() in postgres |
| Previous Message | Bruce Momjian | 2002-10-25 17:25:20 | Re: left() in postgres |