pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Re: Regular Expressions [progress]
2+ messages / 2 participants
[nested] [flat]

* Re: Regular Expressions [progress]
@ 2007-03-28 12:25  ezequias@fastcon.com.br
  0 siblings, 1 reply; 2+ messages in thread

From: ezequias@fastcon.com.br @ 2007-03-28 12:25 UTC (permalink / raw)
  To: Richard Broersma Jr <rabroersma@yahoo.com>; pgsql-sql

Richards and List,

Now I find out the 'similar to' statement where I can do such search, but I 
must still parse all substrings.

Here is my stage:

Select * from myAddressTable where address similar to ('%(ELMO|ST.|258)%')

But I still need to Separete all strings.

Could someone help me in this crusade ?

Regards
Ezequias


Em Tue, 27 Mar 2007 15:16:10 -0700 (PDT)
  Richard Broersma Jr <rabroersma@yahoo.com> escreveu:
>> Could you give me a hand ?
>> 
>> I have a ZipCode table and my address table
>> 
>> I just would like to find out all matches that my zipcode table has where my 
>> address table appears like this:
>> 
>> Elmo Street, 30
>> 
>> I would like my SQL find out all matches we can find 'Elmo', 'Street'.
>> 
>
>select zipcode
>from zipzodetable
>where address ~ 'Elmo'
>and address ~ 'Street';
>
>If the query is too slow I expect that installing the tsearch2 contrib module 
>and using the
>tsearch2 type queries would give you want you wanted but in a fraction of the 
>time.
>
>Regards,
>Richard Broersma Jr.
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 6: explain analyze is your friend

--
Ezequias Rodrigues da Rocha



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Regular Expressions [progress]
@ 2007-03-28 14:10  Richard Broersma Jr <rabroersma@yahoo.com>
  parent: ezequias@fastcon.com.br
  0 siblings, 0 replies; 2+ messages in thread

From: Richard Broersma Jr @ 2007-03-28 14:10 UTC (permalink / raw)
  To: ezequias@fastcon.com.br; pgsql-sql


> Select * from myAddressTable where address similar to ('%(ELMO|ST.|258)%')
> 
> But I still need to Separete all strings.

What is it that you are trying to achieve? What string would you like to seperate?
Regards,
Richard Broersma Jr.




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2007-03-28 14:10 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-03-28 12:25 Re: Regular Expressions [progress] ezequias@fastcon.com.br
2007-03-28 14:10 ` Richard Broersma Jr <rabroersma@yahoo.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox