Re: Searching Numbers
This WebDNA talk-list message is from 2004
It keeps the original formatting.
numero = 58667
interpreted = N
texte = With multiple space-delimited zip codes in one field, you can't type it as NUM or do an EQ match and expect it to find a single zip code within the field. CL an RN won't work either.You need to use a WA (word all) match, and specify the WORD as WW (whole word)...[search db=admin/stores/ stores.db&neidNumberdata=[blank]&waStoreZipCodeDatara=[url][zipstore][/ url]&StoreZipCodeword=WW]- brianOn Jun 28, 2004, at 7:01 AM, David Cate wrote:> Gary,>> Thanks and these are good suggestions. Let me understand this a little > more.>> The 5 digit zip codes in our database will are all different, your > example had two matching numbers. That may be irrelevant, but just > wanted to make sure. I was thinking that if a store had let's say 5 > different zip codes,> Store A - 37660 37645 37662 37660 37665 and another store had> Store B - 37668 37612 37601 37605 37665 and a search query [zipstores] > came across to search the StoreZipCode database as 37665 that the DNA > search query would return both Store A and Store B.>> That is not the case as a matter of fact, this search string is real > hinky. I have noticed that some search queries let's say 24251 will > not even return a Store that has that value (24251) in the > StoreZipCode database. Augh!!>> That 'close to' reference in DNA is one that I've never seen and might > be a good idea as a last resort. This hilly area of East Tennessee has > some fragmented zip codes and this is not the best solution as the > mountains break up Zip codes into a structure that makes it difficult > to use a range.>> I'm not sure I understand the range search that you describe and will > consider that a little more today as I continue to research a > solution.>> Thanks for the thoughts though. Always appreciated!!>> David>> On Jun 28, 2004, at 12:46 AM, Gary Krockover wrote:>>> If you're comparing a 5 digit zip code to values in the database that >> are stored as 12345 12345, then you wont get a match since they don't >> (fully) equal one another. I don't think a wo search is going to work >> as one of the "or" words has to match and again, the 5 digit zip >> isn't going to match the 5 digit space 5 digit value. Try it, but >> don't think it will work.>>>> You might look at trying:>> close to (numeric only). clZipCodedatarq=92069&clZipCodedata=10 finds >> all records whose ZipCode field is within 10 of 92069 (92059 - 92079)>>>> begins with (bw). If the 5 digit code always matches the first 5 >> digits that are stored in the db, this would work. If you might >> match on the 2nd set of digits, then this wont work.>>>> The best option, if possible, would be to break those 5 digit splits >> into two separate fields. You could then do a range search:>>>> rnStoreZipCodedatarq=[lowzip] [highzip]&StoreZipCodedatatype=num>>>> It would be pretty easy to write some WebDNA that would split those >> up for you in one swoop while writing to another database that you >> could then swap out for the one you have now. Look into using >> [listwords] to handle that for you.>>>> GK>>>>>> At 11:30 PM 6/27/2004, you wrote:>>> Thanks Gary, the spaces are email related.>>>>>> I tried the [url] tags around the search, but still come up with the>>> same problems. The 5 digit zip code doesn't seem to find the records.>>> We have entered the zip codes into one field thinking that the values>>> would behave as words.>>>>>> [search>>> db=admin/stores/ >>> stores.db&neidNumberdata=[blank]&eqStoreZipCodedatarq=[url][zipstore] >>> [/ url]&StoreZipCodetype=num]>>>>>> Should I consider a wo search like a keyword search instead of a data>>> lookup?>>>>>> David>>>-- Brian Fries, BrainScan Software -- http://www.brainscansoftware.com ---------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list
.To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
With multiple space-delimited zip codes in one field, you can't type it as NUM or do an EQ match and expect it to find a single zip code within the field. CL an RN won't work either.You need to use a WA (word all) match, and specify the WORD as WW (whole word)...[search db=admin/stores/ stores.db&neidNumberdata=[blank]&waStoreZipCodeDatara=[url][zipstore][/ url]&StoreZipCodeword=WW]- brianOn Jun 28, 2004, at 7:01 AM, David Cate wrote:> Gary,>> Thanks and these are good suggestions. Let me understand this a little > more.>> The 5 digit zip codes in our database will are all different, your > example had two matching numbers. That may be irrelevant, but just > wanted to make sure. I was thinking that if a store had let's say 5 > different zip codes,> Store A - 37660 37645 37662 37660 37665 and another store had> Store B - 37668 37612 37601 37605 37665 and a search query [zipstores] > came across to search the StoreZipCode database as 37665 that the DNA > search query would return both Store A and Store B.>> That is not the case as a matter of fact, this search string is real > hinky. I have noticed that some search queries let's say 24251 will > not even return a Store that has that value (24251) in the > StoreZipCode database. Augh!!>> That 'close to' reference in DNA is one that I've never seen and might > be a good idea as a last resort. This hilly area of East Tennessee has > some fragmented zip codes and this is not the best solution as the > mountains break up Zip codes into a structure that makes it difficult > to use a range.>> I'm not sure I understand the range search that you describe and will > consider that a little more today as I continue to research a > solution.>> Thanks for the thoughts though. Always appreciated!!>> David>> On Jun 28, 2004, at 12:46 AM, Gary Krockover wrote:>>> If you're comparing a 5 digit zip code to values in the database that >> are stored as 12345 12345, then you wont get a match since they don't >> (fully) equal one another. I don't think a wo search is going to work >> as one of the "or" words has to match and again, the 5 digit zip >> isn't going to match the 5 digit space 5 digit value. Try it, but >> don't think it will work.>>>> You might look at trying:>> close to (numeric only). clZipCodedatarq=92069&clZipCodedata=10 finds >> all records whose ZipCode field is within 10 of 92069 (92059 - 92079)>>>> begins with (bw). If the 5 digit code always matches the first 5 >> digits that are stored in the db, this would work. If you might >> match on the 2nd set of digits, then this wont work.>>>> The best option, if possible, would be to break those 5 digit splits >> into two separate fields. You could then do a range search:>>>> rnStoreZipCodedatarq=[lowzip] [highzip]&StoreZipCodedatatype=num>>>> It would be pretty easy to write some WebDNA that would split those >> up for you in one swoop while writing to another database that you >> could then swap out for the one you have now. Look into using >> [listwords] to handle that for you.>>>> GK>>>>>> At 11:30 PM 6/27/2004, you wrote:>>> Thanks Gary, the spaces are email related.>>>>>> I tried the [url] tags around the search, but still come up with the>>> same problems. The 5 digit zip code doesn't seem to find the records.>>> We have entered the zip codes into one field thinking that the values>>> would behave as words.>>>>>> [search>>> db=admin/stores/ >>> stores.db&neidNumberdata=[blank]&eqStoreZipCodedatarq=[url][zipstore] >>> [/ url]&StoreZipCodetype=num]>>>>>> Should I consider a wo search like a keyword search instead of a data>>> lookup?>>>>>> David>>>-- Brian Fries, BrainScan Software -- http://www.brainscansoftware.com ---------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Brian Fries
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
WebCat2b12 CGI Mac - [shownext] problem (1997)
Change in Host? (1999)
[WebDNA] Hmmm ... (2008)
Date problems (1997)
MacAuthorize Email Problem (1998)
Running 2 two WebCatalog.acgi's (1996)
RequiredFields template (1997)
Forms Search Questions (1997)
RE: URL too Long? (1997)
WebCatalog host... (2000)
Date format problems (1997)
expansion domain freak out (2003)
limit to listwords (2001)
RE: protect tag on NT (1997)
WebCat2: Formulas.db question (1997)
WebDNA and SSI (2004)
showif comparison begins w/ and contains (1997)
Search problems! (1999)
Deleting Multiple Database Records based on Checkbox (1998)
Credit card processing - UK (1997)