473,756 Members | 8,443 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

query is too complex, better way

26 New Member
Ok let me start from the start. I have a form that has question in it and the person chooses 0 1 2 -99 for each. The form then needs to add up the numbers for the sub categories in the form. For example question 1-8 deal with communication and can rang from 0 to 16 points. The problem that I'm running into is the -99 which is needed to denote that the question does not ably. So if one of the communication questions is NA then it will make the communication score negative which is not right. In order to get around this I used a query that has the criteria <>-99. But the problem was that it was removing the whole entry for that person and not just the -99 for that question. So to get around this I used the <>-99 for each question separately and then nested the query into one larger query. This should work but with over 40 nested queries I get the error "query is too complex". So, is there a better way to get the questions added up and to ignore -99? Or is the another null value that I could use instead of -99? Can I do something different in the query to skip -99? Should I just do the calculations in the form but Im not that good at VBA.
Sorry for the long post put this is starting to agitate me thank for the help
May 15 '08 #1
3 1496
FishVal
2,653 Recognized Expert Specialist
Hi, BUmed.

I've read your previous thread and would make a guess that your databased is not normalized. This is, in most cases the reason for inappropriately large number of tables/queries as well as their complicatedness and inefficiency.

Regards,
Fish
May 15 '08 #2
BUmed
26 New Member
This is true. I inherited this data base when I started this job. It is cumbersome and in inefficient. But we are switch to a new system in about 3mounths so I have to live with it for now. So any suggestion that could fill the whole for now.
May 15 '08 #3
NeoPa
32,572 Recognized Expert Moderator MVP
Try using Null as the N/A value.

That way you can simply total all matching records and the Null records will be ignored in the calculations.
May 16 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

11
2314
by: Steven Stern | last post by:
I'm stuck on a host that is still running MYSQL version 3. I need to flatten out a relationship to AND a set of criteria. In a nutshell User UserID UserEmail UserOther
0
1288
by: awarsd | last post by:
------=_NextPart_000_0007_01C34C8B.2CF5D7A0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I'm looking at some search engine where we can have up to 14-15 = categories and each categories have about 5-10 option (checkbox)
3
2354
by: Andrew Mayo | last post by:
There is something very strange going on here. Tested with ADO 2.7 and MSDE/2000. At first, things look quite sensible. You have a simple SQL query, let's say select * from mytab where col1 = 1234 Now, let's write a simple VB program to do this query back to an MSDE/2000 database on our local machine. Effectively, we'll
4
8974
by: Starbuck | last post by:
OK, first let me say that I am no DB person. But I have a user here who keeps getting this error whenever she does, whatever it is she does, with databases... A google search takes me to various forums where I am forced to sign up before I can read any answers. Interesting note here is that the guy in the office next
3
7879
by: Jonathan | last post by:
Hi all! For a match schedule I would like to find all possible combinations of teams playing home and away (without teams playing to themselves of course). I now the simple version works something like this: For a (very) simple table containing three rows like this: row 1: A
4
2021
by: ED | last post by:
I am attempting to to write a query that has a numerous nested IIf statements. The problem that I am having is that it is to long of a query to be built in design mode and when I build it in sql mode after a certain point it give me the error message that the expression is to complex. Below is the sql code that I am using (this works so far, anything added to the code will give me the to complex error message.) SELECT .WONUM, .,...
2
3671
by: Steve Richfield | last post by:
First, thanks Wayne Morgan, Cost Budde, and Saintor for all the help you've been in getting me through the field of hidden mines in Access. Most of the program now works, so hopefully I am nearing the end of my (immediate) questions. Since this is a bit of a high-level question, first a few words about what I am (trying to) do. This is an AI medical diagnostic program, that takes free-form natural language patient statements regarding...
2
1837
by: Ben de Vette | last post by:
Hi, I'm using the querybuilder when updating a record in a table (Access). However, I get a "Query is too complex" message. The Primary key is autonumbered. Why is it making such a complex update query string in stead of using the primary key? Thanks in advance,
10
2108
by: Robert | last post by:
I am an attorney in a non-profit organization and a self-taught programmer. I'm trying to create a client db that will allow me to search for potential conflicts of interest based either on Social Security # or on Last Name. I've created two different tables with the following fields in each table: ClientInfo Client# (primary key) First Name Middle Name Last Name
0
9462
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9287
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9886
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9722
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8723
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7259
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5155
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3369
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2677
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.