Re: Pattern Matching

2004-08-11 Thread Harald Fuchs
In article <[EMAIL PROTECTED]>, "Jason Glicken" <[EMAIL PROTECTED]> writes: > I have 2 tables set up in MySQL, one with a dialed number field and > duration, the other with a list of country codes, there names, and the > rates. I am trying to match the dialed number with country code. My > probl

Pattern Matching

2004-08-10 Thread Jason Glicken
I have 2 tables set up in MySQL, one with a dialed number field and duration, the other with a list of country codes, there names, and the rates. I am trying to match the dialed number with country code. My problem is I cannot get the results based on the longest possible match? I am not even sur

Re: pattern matching - but in reverse

2004-07-03 Thread Michael Dykman
I take it this is the back end for a web application of some kind. removing the dashes before the insert with the procedural language should be trivial. What language is on the front end of this? Creating a regular expression which would match dashed or non-dashed number would not be that hard

Re: pattern matching - but in reverse

2004-06-20 Thread Bob Ramsey
Whoops. I was thinking about how I have my isbn table stored. ;) I prefer to remove all formatting from numbers like this(isbn, phone numbers, social security numbers, etc) before storing them. Anyway, here's something that should work. I'm not sure if it is the most efficient way to do thi

Re: pattern matching - but in reverse

2004-06-20 Thread Luke Majewski
Hi Bob, I think this might be in the wrong direction - my isbn is saved with the dashes, so I would need it to look like: select * from test where REPLACE('myvalue','-','') = '12'; which I'm not sure will work. When I get on my machine I'll give some variations of this a try, thanks for the qui

Re: pattern matching - but in reverse

2004-06-20 Thread Bob Ramsey
Oh, I think I know this one. Copied from my console: mysql> select * from test; ++-+ | id | myvalue | ++-+ | 1 | 12 | | 2 | 15 | | 3 | 3 | | 4 | 10 | | 5 | 10 | | 6 | 10 | ++-+ 6 rows in set (0.04 sec) mysql> select * from tes

pattern matching - but in reverse

2004-06-20 Thread Luke Majewski
Hi everyone, ok, so I know how to use RLIKE to match regular expressions. However, let's say I have an isbn number of: 0-06-430022-6 saved in the database but someone wants to search for it by entering: 0064300226 or even 006-430-0226 So the search query needs to have its dashes removed

Re: Fulltext vs Pattern Matching?-Solved

2003-10-15 Thread Michael Hendry
Roger: Thank you for your reply, it is right on the money. I will try pattern matching first and see how that works. I don't mind the extra programming, and I don't expect our user base to grow significantly. Thanks again Mike -- MySQL General Mailing List For list arch

Re: Fulltext vs Pattern Matching?

2003-10-15 Thread Roger Baklund
* Mike > I want to provide free text searching on my database across > numerous fields. The question is, is it better to use a freetext > field, or pattern matching and or-ing the fields I want to search. > > What scares me off of Freetext is that I only have about 40 > records,

RE: Fulltext vs Pattern Matching?

2003-10-15 Thread Dathan Vance Pattishall
bject: Fulltext vs Pattern Matching? --> -->Hello: --> -->I want to provide free text searching on my database across numerous -->fields. -->The question is, is it better to use a freetext field, or pattern -->matching and -->or-ing the fields I want to search. Or-ing across

Fulltext vs Pattern Matching?

2003-10-15 Thread michael.hendry
Hello: I want to provide free text searching on my database across numerous fields. The question is, is it better to use a freetext field, or pattern matching and or-ing the fields I want to search. What scares me off of Freetext is that I only have about 40 records, they all relate to a

Re: Another pattern matching question

2002-08-10 Thread DL Neil
Obiajulu, Please refer to previous response and the as yet unanswered question within. > I have the following values in my db table: > Id. regdate > 001040-1467 > 011910-2002 > 021700-1789 > 031550-2002 > 041600-1700 > 051900-2000 > .

Another pattern matching question

2002-08-09 Thread Obiajulu Odu
Hello, I have the following values in my db table: Id. regdate 001040-1467 011910-2002 021700-1789 031550-2002 041600-1700 051900-2000 ... How can I use mysql RegEx to the query parameter: 1445-1600: That is to extract those values t

Pattern matching - regexp

2002-08-04 Thread Obiajulu Odu
Hello, How is REGEXP used? I have looked at the manual. If I have the following values in my db table: Id. regdate 00ca. 1900 011910 02ca. 1700-tallet 031550-tallet 041600-1700 ... and the query parameters: 190, 155, 170, I want the result of

Pattern matching query

2002-07-31 Thread Obiajulu Odu
to use standard mysql pattern matching to do the query. A query parameter can be 1400-2000 and the search result will be: ca. 1900 1900 1900-tallet 1950-tallet 1500-1600 When the query parameter is 1900-1949, the result will be: ca. 1900 1900 1900-tallet When the query parameter is 1950 - 2000

Re: Is Pattern Matching possible with MySQL?

2002-05-23 Thread Egor Egorov
Chan, Thursday, May 23, 2002, 10:36:04 AM, you wrote: >> I have a table with 2 fields, of char type. >> >> One field contains a 'ID number'. >> Another field 'Aliases' contains a list of comma-delimited values. (eg >> aaa,bbb,ccc) >> >> Is it possible using MySQL functions to return the 'IDnumb

Is Pattern Matching possible with MySQL?

2002-05-23 Thread Chan WieVia ICM N MC MI E3 Extern
> Hi, > > I have a table with 2 fields, of char type. > > One field contains a 'ID number'. > Another field 'Aliases' contains a list of comma-delimited values. (eg > aaa,bbb,ccc) > > Is it possible using MySQL functions to return the 'IDnumber' when the > string "aaa" exists in 'Aliases' ?

SQL Pattern Matching & Script

2002-05-12 Thread impala
> >Thanks for answering > >"search character by character" 11 May 2002 > >Making use of a HTML textfield which sends text to > >variable 'varLastName'. > >How do I concatenate the variable > part('varLastName') > >with > >the % part is it something like: > > > >SELECT LASTNAME, FIRSTNAME, > >DEP

Re: SQL Pattern Matching

2002-05-11 Thread Paul DuBois
At 13:43 -0700 5/11/02, impala wrote: >Thanks for answering >"search character by character" 11 May 2002 > >Making use of a HTML textfield which sends text to >variable 'varLastName'. >How do I concatenate the variable part('varLastName') >with >the % part is it something like: > >SELECT LASTNAME,

SQL Pattern Matching

2002-05-11 Thread impala
Thanks for answering "search character by character" 11 May 2002 Making use of a HTML textfield which sends text to variable 'varLastName'. How do I concatenate the variable part('varLastName') with the % part is it something like: SELECT LASTNAME, FIRSTNAME, DEPARTMENT FROM EMPLOYEES WHERE LAS

Re: search pattern matching

2002-04-12 Thread Joel Rees
Scott > O.K. dumb question. A bigger string can't be contained in a smaller one. > But how can I make it so someone searching "dogs" can pull up an item that > contains dog? My first instinct was to tell you to use perl and a dictionary of common terms. But I remembered there is the LIKE functi

Re: search pattern matching

2002-04-11 Thread Lucas Marinho Saud
HI CRAIG, i'ts possible to use this query with multiple search terms? query: "select * from TABLENAME where if(right(SEARCHFIELD,1)='s',left(SEARCHFIELD,lenth(SEARCHFIELD)-1),SEARCHFIE LD) like '%SEARCHTEXT%' " i.e: one user search for: "passaros jogos campos" [in portugueze] the app is writt

Re: search pattern matching

2002-04-10 Thread Craig Ostrander
I don't believe you could do that with a single SQL statement. The best way would be to build intelligence into an application that would look at the search term, determine if it is a plural by looking up it some sort of dictionary, and then use the singular in the form %singularsearchterm%.

Re: search pattern matching

2002-04-10 Thread Scott
O.K. dumb question. A bigger string can't be contained in a smaller one. But how can I make it so someone searching "dogs" can pull up an item that contains dog? Thanks, SW On Wednesday 10 April 2002 17:58, you wrote: > In "MySQL" it says that adding the following to a where clause: > like "%$s

Re: search pattern matching

2002-04-10 Thread Jason Burfield
You are searching for the word "dogs"...that word is not contained in the word 'dog' or the phrase 'dog house.' If you searched for '%dog%' you would get both of those results. The wildcard character allows any other character in it's place...hence '%dog%' finds 'mydog', 'mydogs', etc, etc...it

search pattern matching

2002-04-10 Thread Scott
In "MySQL" it says that adding the following to a where clause: like "%$somestring%"; should select matches that contain $somestring in them anywhere. However when I use it I find that if e.g. I have an entry "dog" in the database, if I search for "dogs", it doesn't come up. Also if I search

Re: pattern matching (in text field)

2002-03-24 Thread Paul DuBois
At 17:02 + 3/24/02, julian haffegee wrote: >Hi all, > >I currently have > >$result = mysql_query ("SELECT title_id, title FROM documents_tbl, url_tbl >WHERE (documents_tbl.title_id = url_tbl.url_id) AND keywords LIKE '%$temp%' >AND title_id != '$myrow[title_id]'"); > >this works to an extent,

pattern matching (in text field)

2002-03-24 Thread julian haffegee
Hi all, I currently have $result = mysql_query ("SELECT title_id, title FROM documents_tbl, url_tbl WHERE (documents_tbl.title_id = url_tbl.url_id) AND keywords LIKE '%$temp%' AND title_id != '$myrow[title_id]'"); this works to an extent, but 'keywords' is a text field and if $temp is for exam

RE: Pattern Matching Problem

2002-01-29 Thread Bret Ewin
ssion matching on each row? You could add two more columns, days_mwf and days_th, to speed up the common queries. Bret -Original Message- From: Matthew Walker [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 29, 2002 3:46 PM To: Douglas Brantz; [EMAIL PROTECTED] Subject: RE: Pattern Mat

RE: Pattern Matching Problem Solved

2002-01-29 Thread Douglas Brantz
CTED]] Sent: Tuesday, January 29, 2002 3:46 PM To: Douglas Brantz; [EMAIL PROTECTED] Subject: RE: Pattern Matching Problem SELECT schdays FROM courses WHERE (schdays LIKE "M") OR (schdays LIKE "W") OR (schdays LIKE "F") Matthew Walker Ecommerce Project Manager Mountain

RE: Please Help with Pattern Matching

2002-01-29 Thread Roger Karnouk
Try this: select schdays from courses where schdays Regexp"[MWF]"; -Original Message- From: Douglas Brantz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 29, 2002 2:59 PM To: [EMAIL PROTECTED] Subject: Please Help with Pattern Matching I have a big problem with patter

Pattern Matching Solved

2002-01-29 Thread Douglas Brantz
alachian State University Boone, NC 28608 828-262-6549 (office) 828-262-6312 (fax) -Original Message- From: Gurhan Ozen [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 29, 2002 3:24 PM To: Douglas Brantz; [EMAIL PROTECTED] Subject: RE: Please Help with Pattern Matching Doug, MySql is

RE: Pattern Matching Problem

2002-01-29 Thread Matthew Walker
2 1:15 PM To: [EMAIL PROTECTED] Subject: Pattern Matching Problem Hello, I have a big problem! I need to match all patterns in schdays from a variable schdays and if schdays = mwf it only turns up mwf and not all entries containing M, W or F. Is there a way to do this? mysql> select schday

Re: Pattern Matching Problem

2002-01-29 Thread Paul DuBois
At 15:15 -0500 1/29/02, Douglas Brantz wrote: >Hello, > >I have a big problem! I need to match all patterns in schdays from a >variable schdays and if schdays = mwf it only turns up mwf and not all >entries containing M, W or F. Is there a way to do this? Yes, but you can't do it with LIKE excep

Re: Please Help with Pattern Matching

2002-01-29 Thread Dan Nelson
In the last episode (Jan 29), Douglas Brantz said: > I have a big problem with pattern matching; > Why does the first example work like this I need to find everything with > MWF in it and I only get the 1 entry? Is there a way I can make this > work. > > mysql> select schda

RE: Please Help with Pattern Matching

2002-01-29 Thread Gurhan Ozen
chdays LIKE "%M%" OR LIKE "%W%" OR LIKE "%F%"; This will return every row that has either M or W or F in the schdays field. Gurhan -Original Message- From: Douglas Brantz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 29, 2002 2:59 PM To: [EMAIL PROTECT

Re: Pattern Matching Problem

2002-01-29 Thread Christopher Thompson
and pattern match each one?? It >should be easier. I'd do this by doing a pattern match on %M% and then joining it with a pattern match on %W% and then joining it with a pattern match on %F%. I forget which type of join you want, it's the one that is logical-

Re: Please Help with Pattern Matching

2002-01-29 Thread Paul DuBois
At 14:59 -0500 1/29/02, Douglas Brantz wrote: >I have a big problem with pattern matching; >Why does the first example work like this I need to find everything with >MWF in it and I only get the 1 entry? Is there a way I can make this >work. It's unclear what you're expe

Pattern Matching Problem

2002-01-29 Thread Douglas Brantz
Hello, I have a big problem! I need to match all patterns in schdays from a variable schdays and if schdays = mwf it only turns up mwf and not all entries containing M, W or F. Is there a way to do this? mysql> select schdays from courses where schdays LIKE "%MWF%"; +-+ | schdays | +-

Please Help with Pattern Matching

2002-01-29 Thread Douglas Brantz
I have a big problem with pattern matching; Why does the first example work like this I need to find everything with MWF in it and I only get the 1 entry? Is there a way I can make this work. mysql> select schdays from courses where schdays LIKE "%MWF%"; +---

RE: Pattern matching queries

2001-08-12 Thread Joe Sheble \(Wizaerd\)
Then yes, it should be returned. > -Original Message- > > On Sun, Aug 12, 2001 at 11:43:31PM -0700, Joe Sheble (Wizaerd) wrote: > > an example would be: > > > > this is some text that would fall within the text field (somefield): > > > > "if you want to see some nice images, check out

Re: Pattern matching queries

2001-08-12 Thread Jeremy Zawodny
On Sun, Aug 12, 2001 at 11:43:31PM -0700, Joe Sheble (Wizaerd) wrote: > an example would be: > > this is some text that would fall within the text field (somefield): > > "if you want to see some nice images, check out href="http://www.photoshopuser.com>this website" > > and the query would be:

RE: Pattern matching queries

2001-08-12 Thread Joe Sheble \(Wizaerd\)
an example would be: this is some text that would fall within the text field (somefield): "if you want to see some nice images, check out http://www.photoshopuser.com>this website" and the query would be: WHERE somefield like '%photoshop%' the above record should not be returned. > -Orig

Re: Pattern matching queries

2001-08-12 Thread Jeremy Zawodny
On Sat, Aug 11, 2001 at 10:54:58PM -0700, Joe Sheble (Wizaerd) wrote: > > I have a text field that contains some plain text intermingled with > html tags. In querying the database, if the keyword I'm searching > for falls within the plain text, that record should be returned. > However, if the ke

Re: Pattern matching queries

2001-08-12 Thread oltra jean-michel
> (REGEXP). > > I have a text field that contains some plain text intermingled with html > tags. In querying the database, if the keyword I'm searching for falls > within the plain text, that record should be returned. However, if the > keyword falls within an html tag, it should not be returned