| From: | steagus(at)S1PA3M2FIL4TE9Ryahoo(dot)com (Steagus) |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | SQL Where LIKE - Range it! |
| Date: | 2001-04-26 20:16:16 |
| Message-ID: | 3ae881af.275381347@news |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
H-
I've found the docs on how to select a list of rows from a table were
all the records have a last name starting with 'W%'.
select * from table where last_name LIKE 'W%'
What I'd like to do is pull a list of records where there is a range
of last names; say from A - F.
select * from table where last_name LIKE 'A%' AND last_name LIKE 'F%'
- for example.
The above code I've tried for this doesn't seem to work as I'd expect
it too?
I've even done
select * from table where last_name LIKE 'A%' AND LIKE 'F%'
Can anyone provide some details or insights on how to accomplish this?
Thanks. Much appreciated.
-Steagus
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Joel Burton | 2001-04-26 20:19:27 | Re: Re: Re: Need for newbie friendly docs (was Newbie struggling...) |
| Previous Message | Marko Kreen | 2001-04-26 20:03:09 | status after 7.1 and pgcrypto update / crypt(table.field) ? |