Results 1 to 5 of 5

Thread: ...IN...problems

  1. #1
    the prodigal son Guest

    Default ...IN...problems

    I have a problem with the IN function with a spell checking routine I am making<BR><BR>the following sql query is auto-generated to compare sentance words against an existing database dictionary<BR><BR>&#039___________________________ _______________________________<BR>SELECT FU_Word FROM FU_Dictionary WHERE FU_Word IN (&#039am&#039,&#039what&#039,&#039having&#039,&#03 9good&#039,&#039what&#039,&#039about&#039,&#039you &#039,&#039my&#039,&#039sun&#039,&#039shine&#039); <BR>&#039_________________________________________ _________________<BR><BR><BR><BR>the following lines REMOVE (blank out) words that ARE in the Dictionary database based upon the query above<BR><BR>&#039________________________________ __________________________<BR><BR>while not rs.eof <BR> FU_ValidWord = rs("FU_WORD")<BR> dic(FU_ValidWord) = "" <BR> rs.movenext <BR>wend <BR><BR>&#039_____________________________________ _____________________<BR><BR><BR><BR>now the problem I have is that the IN FUNCTION is not removing ALL the valid words. I know this for a fact as I have a made a separate rountine to look up individual words and those that should be blanked out and listed in the DB are not!!! weird!<BR><BR>any suggestions as to why the IN function is not working in this case ?<BR><BR>is it a case sensitivity issue which i&#039ve never had a problem with in an access database. I&#039m puzzled. the words are in the DB but the IN function isn&#039t picking them up .<BR><BR>thanks in advance<BR><BR>

  2. #2
    peterjl@austec.net.au Guest

    Default Please explain what you are trying to do.

    Bit hard to understand just what you are trying to do, from your snippets.<BR><BR>Why don&#039t you delete the words instead of blanking them out?

  3. #3
    the prodigal son Guest

    Default RE: Please explain what you are trying to do.

    is it really that hard to understand ?<BR>it&#039s a spell checker as already mentioned.<BR><BR>essentially comparing words in a sentance with those in a database.<BR><BR>each word is taken from the sentance and compared against its existance in the dictionary database using the IN function. The problem appears to be that the IN function is return incorrect results...finding only some of the words and not ALL. All the words do exist and have been verified using a separate lookup script. Such a lookup script would be very slow to generate for each word in a sentance therefore the IN function is used to return all results.<BR>deleting or blanking is the same thing as a dictionary object is used to store the sql results.<BR><BR>the problem is why the sql IN function is not picking up all the appropriate DB rows ?

  4. #4
    Join Date
    Dec 1969

    Default Trusting you that the words are there...

    Well, it certainly COULD be a case sensitivity issue. Have you tested for that?<BR><BR>Purposely look for the same word in both all upper case and all lower case, for example. And if one works but the other doesn&#039t...<BR><BR>How about<BR><BR>SELECT ... WHERE UCase(spelling) IN (&#039DOES&#039,&#039THIS&#039,&#039WORK&#039)<BR> <BR>Naturally, you would UCase the input string before you split it into words, for efficiency.<BR><BR>

  5. #5
    the prodigal son Guest

    Default RE: Trusting you that the words are there...

    it wasn&#039t a case sensitivity issue - I&#039ve never had one and that was guess work...or desperation.<BR><BR>In fact what gave the game away was your simple TITLE Bill!<BR>I double-checked both files:-<BR><BR>1) The file that does the spell check looked okay<BR>2) The file that does the single word lookups looked okay<BR><BR>BUT both files reference different databases!!!! what an idiot!<BR>I blame not sleeping for 36 hours on that one. It&#039s the simple ones that get you every time. :)<BR><BR>I made a backup of the database 1/2 way through compiling the dictionaries and referenced both the old one and new one from different files!<BR><BR>a simple connection problem!<BR><BR>case closed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts