473,396 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

help finding bad record in query

Hi,

Using a soundex function that works with anything except an empty/null
string the following gives me an error part way through the results

select surname, soundex(surname)
from pd
where len(surname & "") > 0
and soundex(surname) = soundex("Smith")

The error is "data type mismatch in criteria expression"

The problem is, after this, all results turn to '#name?' and I can't find a
way of finding out what caused the error.

If I run the same query through a VBA module, iterating and debug.printing
the results I get the error 3071 'this expression is typed incorrectly, or
it is too complex to be evaluated...' and 'rst.movenext' is highlighted.

If I alter the query portion of the vba to a simple select surname query,
then move the soundex part to the iterative section (while not eof...) then
no error occurs..

Sorry if I haven't explained this greatly but I hope someone can shed light
on it!
Thanks,
Chris
Nov 12 '05 #1
2 2956
> select surname, soundex(surname)
from pd
where len(surname & "") > 0
and soundex(surname) = soundex("Smith")


If it works fine with anything but a null/empty string, then why not
do something like this:

SELECT surname, soundex(surname)
FROM pd
WHERE surname IS NOT NULL
AND soundex(surname)=soundex("Smith");

either that or create the query that removes the nulls first and then
base your Soundex query on that.
Nov 12 '05 #2
"Pieter Linden" <pi********@hotmail.com> wrote in message
news:bf**************************@posting.google.c om...
select surname, soundex(surname)
from pd
where len(surname & "") > 0
and soundex(surname) = soundex("Smith")


If it works fine with anything but a null/empty string, then why not
do something like this:

SELECT surname, soundex(surname)
FROM pd
WHERE surname IS NOT NULL
AND soundex(surname)=soundex("Smith");


Well that only checks if surname is not null, not that it's length is >0,
whereas the original query does both?

Thanks,
Chris
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Polar | last post by:
I am having troubles finding the parse error in this script. I've been checking for weeks. I am too new to the subject I guess. I am trying to show a readord and them have a form at the bottom...
2
by: Paul | last post by:
Hi, I'm developing a CRM (Customer Relationship Management) system in MS Access. I have 2 tables. The first is a customer master file, the second is an activity file. A key function of the...
18
by: Jeremy Weiss | last post by:
I'm trying to build a database that will handle the monthly billing needs of a small company. I'm charting everything out and here's what I see: table for customers sub table to track payments...
9
by: Dom Boyce | last post by:
Hi First up, I am using MS Access 2002. I have a database which records analyst rating changes for a list of companies on a daily basis. Unfortunately, the database has been set up (by my...
2
by: Jamie | last post by:
Hello, Please can you help me. The Booking Detail table shows each leg of a journey. BookingRef 1 is a booking for an adult and a child to fly from London to Paris and return. BookingRef 2 is...
8
by: Steph | last post by:
Hi. I'm very new to MS Access and have been presented with an Access database of contacts by my employer. I am trying to redesign the main form of the database so that a button entitled...
17
by: Liam.M | last post by:
Hey guys, Forgive me if my question my be alittle silly, but I would very much appreciate and assistance that could be given! My situation is as follows: I have created a Button, and set...
3
by: shorti | last post by:
db2 v 8.2 on AIX 5.3 I will try to explain as brief as I can what it is I need. I am building a function that will be called multiple times where I will need to return x amount of records each...
6
by: Risk80 | last post by:
Im trying to create a database for a visitor logging system. Basically, if the visitor has never visited before, he or she must be entered into the database and "signed in". All of the visitor...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.