473,508 Members | 2,460 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Should I split this table?

1 New Member
I am using Access 2000.

Currently, I have the following table:

tblPointsChart
PointsNum_pk
EntryCountMin
EntryCountMax
PlacementNum
Points


It is used to assign points based on:

tblShowClassEntry
ShowClassNum_fk
EntryNum_fk
PlacementNum_fk

and qryEntriesPerClass that returns the number of entries in a class.

My question is should I keep tblPointsChart as one table? tblPointsChart does not link easily with qryEntriesPerClass and tblShowClassEntry.

I have used the following code to get the results I need:
Expand|Select|Wrap|Line Numbers
  1. SELECT tblShowClass.ShowClassNum_pk, tblShowClassEntry.EntryNum_fk, tblShowClassEntry.PlacingNum_fk, qryEntriesPerClass.CountOfEntryNum_fk, tblPointsChart.Points
  2. FROM (tblPlacement INNER JOIN (tblPointsChart INNER JOIN (qryEntriesPerClass INNER JOIN tblShowClass ON qryEntriesPerClass.ShowClassNum_fk = tblShowClass.ShowClassNum_pk) 
  3. ON ( qryEntriesPerClass.CountOfEntryNum_fk between tblPointsChart.EntryCountMin  and tblPointsChart.EntryCountMax))
  4. ON tblPlacement.PlacementNum_pk = tblPointsChart.PlacementNum_fk) INNER JOIN (tblEntry INNER JOIN tblShowClassEntry ON tblEntry.EntryNum_pk = tblShowClassEntry.EntryNum_fk) ON (tblShowClass.ShowClassNum_pk = tblShowClassEntry.ShowClassNum_fk) AND (tblPlacement.PlacementNum_pk = tblShowClassEntry.PlacingNum_fk)
  5. WHERE (((qryEntriesPerClass.CountOfEntryNum_fk) Between [tblPointsChart].[EntryCountMin] And [EntryCountMax]))
  6. ORDER BY tblShowClass.ShowClassNum_pk, tblShowClassEntry.PlacingNum_fk;
  7.  


I am just not sure how to change tblPointsChart to make this work more smoothly. Any suggestions would be greatly appreciated.
Apr 2 '08 #1
1 1136
Stewart Ross
2,545 Recognized Expert Moderator Specialist
Hi. This is one occasion when you don't need to join the table at all. It is effectively a lookup table, and in this case you lookup the number of points to assign based on the entries per class count being between the specified minimum and maximum values. The WHERE clause of your SQL does the selection of a specific row (as there can only be one match if the table is set up correctly) regardless of the join. As you have found, joining the table on an artificial primary key value simply makes the query more complex.

There is an example of the use of an unjoined lookup table in this thread, complete with a simple zipped database with the table and a few queries.

-Stewart
Apr 2 '08 #2

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

Similar topics

16
2405
by: Paul Prescod | last post by:
I skimmed the tutorial and something alarmed me. "Strings are a powerful data type in Prothon. Unlike many languages, they can be of unlimited size (constrained only by memory size) and can hold...
5
12213
by: Andy Mee | last post by:
Hello one and all, I'm developing an Asp.NET system to take a CSV file uploaded via the web, parse it, and insert the values into an SQL database. My sticking point comes when I try to split()...
7
11927
by: Warren Wright | last post by:
Hello, We maintain a 175 million record database table for our customer. This is an extract of some data collected for them by a third party vendor, who sends us regular updates to that data...
3
3090
by: twdo | last post by:
Let me see if I can explain my situation clearly. I have a table with the columns: answer_id, question_id, member_id, answer - answer_id is the primary key for the table. - question_id...
5
42013
by: Willem | last post by:
Hello I am quite hopeless and of course a newbe. The situation: Sql2k / query I would like it ot break down the following string: 2004 Inventory:Ex.Plant Farm1:1st Cut:Premium:0094
47
4482
by: ship | last post by:
Hi We need some advice: We are thinking of upgrading our Access database from Access 2000 to Access 2004. How stable is MS Office 2003? (particularly Access 2003). We are just a small...
2
4677
by: ThurstonHowl | last post by:
Hello, my task is the following: Input are tables with fields containing strings where the strings are actually delimited lists. For example, one field could contain 'AB|CD|EF|GH' I've...
2
3414
by: Nalaka | last post by:
Hi, How come, there is no "split cell" functionality in vs2005? Makes life a little difficult without this. Nalaka
2
2824
bugboy
by: bugboy | last post by:
Does the total number of rows in a table determine the amount of resources required for a query?.. or is it primarily determined by the number of rows used by the query? ..Does an INDEX mean it...
2
1085
by: ft310 | last post by:
Te whole point is to provide the User a disclaimer and it they except to continue on with the original (?) format. The 'calling' web page generates something like "http://rhodeisland-...
0
7223
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,...
0
7114
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
7321
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7377
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...
1
7034
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
5623
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,...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3191
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...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.