RE: [SQL] using matches on int4

From: "Jackson, DeJuan" <djackson(at)cpsgroup(dot)com>
To: Gregory Holston <holston(at)itd(dot)nrl(dot)navy(dot)mil>, "Jackson, DeJuan" <djackson(at)cpsgroup(dot)com>
Cc: pgsql-sql(at)hub(dot)org
Subject: RE: [SQL] using matches on int4
Date: 1999-02-04 18:02:39
Message-ID: F10BB1FAF801D111829B0060971D839F6445CB@cpsmail
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

if you want to match all id's that start with 2 try [you might also what
to create a functional index on id as text(id)]:
select * from users where id::text ~~ (2::text || '%');
or
select * from users where id::text ~ ('^' || 2::text);
if you are trying to get exactly 200 use:
select * from users where id=200;

-DEJ

> -----Original Message-----
> On Thu, 4 Feb 1999, Jackson, DeJuan wrote:
>
> > What kind of matching are you trying to do?
> > Most likely you don't really need to create an operator.
>
> I was trying to find all people with ids of 200.
>
> -Greg
>

Browse pgsql-sql by date

  From Date Subject
Next Message George Moga 1999-02-04 18:08:21 Re: [SQL] using matches on int4
Previous Message Gregory Holston 1999-02-04 17:49:42 RE: [SQL] using matches on int4