Queries :: Designing A Query To Normalize Existing Database
Dec 6, 2013
I am attempting to normalize an existing database. I've created the table structures necessary and now I'm designing a query that will update the new field in my primary table: "LabelBaseProduct" with the primary key from my new table: "tblBaseProduct" where the old field from my primary table: "tblLabels.BaseProduct" equals the description field from my new table: "tblBaseProduct.BaseProductDesc".
A visual of my tables:
tblLabels (Main table)
- LabelID
- BaseProduct (old field with text data)
- LabelBaseProduct (new field, needs to be updated with PK from tblBaseProduct)
tblBaseProduct (new table)
- BaseProductID (PK and FK to tblLabels)
- BaseProductDesc (Field that should be matched to tblLabels.BaseProduct)
I tried to design a query using design view of the query design and this is what I have:
Code:
UPDATE tblLabels, tblBaseProduct
SET tblLabels.LabelBaseProduct = [baseProductID]
WHERE (((tblLabels.BaseProduct)=[tblBaseProduct].[BaseProductDesc]));
When I attemted to run the query it told me that it was going to updated over a million records. I only have just short of 2k records in my database.
View Replies
ADVERTISEMENT
Oct 25, 2014
I have to design 2 databases base on some data that was given by my instructor but I feel like I'm missing something on both specially the 2nd database. I have attached my work so far as well as the instructions and the existing data..
View 2 Replies
View Related
Nov 21, 2014
I am working from an existing database which is just two table. The main table has a massive amount of redundancy and duplication and needs splitting into, at first glance, 5 tables.
After I have run my various make table queries and added a Primary Key and FK field to the new tables how do I populate the FK with the Parent PK.
I thought I could simply add all the fields from the new table and then create an adhoc join in an update query to populate the PK to the FK. When I do this however I get "You are about to update 0 records"
I have tried the table analyzer but it doesn't give the correct options to split the table the way I need.
View 6 Replies
View Related
Nov 4, 2013
I am trying to add a new email field to my existing database of 900 employees. I have imported an excel worksheet of email addresses into a new table that has lastname, firstname, employee#, email. The primary key on the new table is email. The primary key on the employee table is employee#, and there is a new field titled email.
The email field in both tables are text fields. In running an append query, it either adds 900 to 27000 additional fields of email only or it says cannot complete because of key code violations. On the join properties I have clicked on #3 all records from source to only equal fields of destination.
View 12 Replies
View Related
Apr 30, 2013
Basically it's trying to take all the files in a given directory and add them into a existing database.
I have a database called Permit. the database has a field called "SEAL" and they will be creating an additional field "SCART" to hold the contents of the file that exist in the directory. Each image file, in directory, is named the same as a unique record in Permit.
example:
Permit-SC might have unique record 532442
An image file would be name 532442.
If the image file matches a record in Permit the image should be added to permit in a field called "SCART". At this point I'm not certain if I want a link or the actual image included in the record. since there's a possibility of including the permit file on the website it might be cleaner to have it included.
View 7 Replies
View Related
Aug 19, 2005
Could someone please give me some help with designing a database in access.
I know excel really well, and took a class on access, and have tried a few times to get started with access but always to no avail.
I have a company that installs real estate signs
1. we have about 200-300 agents (which represent about 10-15 offices)
2. 3 things can happen to 1 sign -
-1. installed the first time (charge)
-2. have a sold sign, for sale sign, or flyer box put on(charge)
-3. Finally removed(free, no charge)
-4. the date would have to be tracked on all of these occurences
3. We have about 10 products or things that can be put or hung on a sign.
I can set up the offices and the agents, and link them just fine. I can set up the products and do the work detail. The problem I have and cannot figure out is trying to bill or invoice this. Some agents are billed individually and some agents don't get billed, there office gets billed as a whole. Could someone please offer some insight on how maybe to go about this from the beginning.
Thanks for any help
Josh
View 3 Replies
View Related
Jul 17, 2007
Hi
I've been asked by someone at work to design a "no brainer" gui for an access database but I am a complete newbie with regards to this - sure I can do simple queries to filter the information I what in design view but this is something else.
How can I design a gui that can be clicked on or is executed when the mdb icon is clicked that will allow people to access from a drop down box the area they need information about and then have to option to either have the information exported to excell or in a summary report to be printed off. Should I use the form wizard or the report wizard - though none of them seem to do what I want.
I've set up the database from the excell spreadsheets they gave me containing activity figures per operational region. The regions are listed in the first column and I wanted a drop down box to list them.
We have 6,000 entries on the database. These cover 8 regions with some regions containing maybe 500+ entries. As mentioned the regions are listed in column one of the database.
When I select the regions column in a drop down box instead of getting just one entry per region, I get every single entry for example 500 for region 1, 200 for region 2 etc. In other words it is reading the rows not grouping them according to region which is what I want
How do I group them so Access only includes one entry per region on the drop down box and what is the best way to design the gui to give the results I am after?
Thanks
Andrew
View 3 Replies
View Related
Oct 1, 2004
Good day,
I am in the process of creating a database in Access.
I need some advice on designing the table structure.
I have 10,000 products.
There are 40 product types.
Some fields are the same for all products. (I.E. description, price).
Some fields are unique to the product type.
I am thinking this:
1. Have a table called products with all 10,000 products including description, price, producttypeID and productID.
2. Have a table with producttypeID and ProducttypeDescription.
3. Have 40 tables with ProductID and fields that are unique to that category of product.
Is this the right way to go about it?
Thanks in advance.
View 3 Replies
View Related
Jun 17, 2005
is there anyway to view records in an access database from an existing database? i have 3 databases that perform basically the same things, but are for different people...
i would like to create a database that can report all this information in one spot, instead of creating reports in every database. if this is not possible, i'll probably go the asp.net route, but this seems to be an easier way, if it is possible
what do u think?
*j
View 2 Replies
View Related
Sep 1, 2005
Hi guys, i need help with a sample database, and wondered if anyone could tell me the entities and how to calculate the prices etc. If anyone could attempt starting the database off for me it would be appreciated too!!
Here is the spec!!!
You are required to produce and document a design that meets the requirements of the McDuffs Burgers scenario:
The corporate office of McDuffs Burgers has asked you to design a database to help track its restaurants and managers. The database is to help the management show the total annual sales of each restaurant and the performance of each manager, as measured by the totals annual sales of all restaurants for that particular manager. Each restaurant is supervised by a single manager, but a manager is also responsible for several restaurants. The company stores typical personnel data (name, salary, and so on.) for each manager as well as basic data for each restaurant such as the telephone and address of each restaurant, its size in square metres, and total annual sales for the last fiscal year. The company would also like objective ways to measure the performance of a manager such as the total revenue for which they are responsible, the average annual revenue per restaurant, the average annual revenue per square foot, etc.
The database should also track the orders that are placed by individual restaurants to the corporate office for various food supplies. Each order is associated with a specific restaurant, and of course, a single restaurant will place multiple orders during the course of a year. The company uses a standard set of product numbers, product descriptions, and associated prices that applies to all restaurants. Each order can specify several products, and a single product may appear in several orders. The database should be capable of computing the total cost for each order.
Deliverables
1. Entity definition for each entity.
2. Entity Relationship Diagram, which must show entities, relationships and membership.
3. Relationship definition for each relationship.
4. Relations (This must include for each relation the primary and foreign keys).
5. Data Dictionary.
Furthermore:
You are required to implement the design (produced in the first part of the assessment - McDuffs Burgers - Database Design), by designing and creating queries, forms, reports and any supporting code. Revisions may be made to the design in the implementation process.
You should note the management of McDuffs Burgers has little experience of database systems and wish to be advised on the information the system can produce.
They require example reports demonstrating the capabilities of the system to:
- Aid the day to day operation of the business.
- Provide appropriate management information.
You must also implement an appropriate user interface to the database easy to use.
View 5 Replies
View Related
Nov 1, 2005
Hello,
Hoping some one could assist me? I am busy designing a database which I am going to put in access.
I have designed the tables and am now not sure how to link them. I was given an excell spreadsheet with headings and am now trying to make this into a database. Example : I was given Co-ordinator Name - Which I now split up into:
Co_First_Name
Co-Last_Name
Co_Initials
Co_Area_Code
Co_Tel_Number
Co_Mobile
Co_Email
Now there other fields like this , for example Regional Manager Name - which I have split up as above into a seperate table.
These fields all relate back to one Code - Called District
There are also a fields which needs to show the a fee required the fee paid and fee outstanding/balance .
The rest of the information required I can create check boxes for , I hope!
Anyway my question is how do a relate all these different tables together?
This is my mental block. And the check box tha information - is it stored a another table? I hope I am explaining my self correctly and I hope some one can make sense of my question
View 4 Replies
View Related
Feb 14, 2012
I want to design a database for an educational instution environment. My problem is knowing what tables to create and how to link them. I know for example that an instructor can teach more than 1 course and a course can be taught by more than 1 Instructor. This makes it a many to many relationship which is not remommended. I know that there has to be another table to bridge these 2 tables. I want to know what is a suitable name for this 3rd table and what example fields it should contain besides the the Keys form table 1 and 2?
Now here is the over all problem:some instructors teaches more than 1 subjectsome subjects are taught by more than 1 Instructorsome Classes are taught by more than 1 instructorsome instructors teach more than1 classSome classes do more than 1 subjectSome subjects are done by more than 1 ClassSome classes are done at more than 1 locationThis is what is needed:
To be able to enter student grades and attendances by classThe marks sheet should be entered in a subform displaying the full student names list for a particular class at a time.
2. To be able to display the marks and attendance of students as a class list.
View 1 Replies
View Related
Nov 15, 2013
Just wondering if I'm missing an SQL trick for normalizing this data I inherited from an Excel spreadsheet.
Current data:
Code:
Case | Insp1 | Insp2 | Insp3 | Insp4 | Insp5 | Rnsp1 | Rnsp2 | Rnsp3 | Rnsp4 | Rnsp5
---------------------------------------------------------------------------------
1234 WEEDS TRASH CAR <null> <null> WEEDS CAR <null> <null> <null>
1235 TRASH <null> <null> <null> <null> TRASH <null> <null> <null> <null>
Normalized table:
Code:
Case | Violation | InspectionType
-----------------------------------
1234 WEEDS Initial
1234 TRASH Initial
1234 CAR Initial
1234 WEEDS Reinspect
1234 CAR Reinspect
1235 TRASH Initial
1235 TRASH Reinspect
Right now I'm having to do it with ten different queries (each with its own query behind it to massage the original data), one for each Excel field, and checking for blank entries before appending. And there's going to be about 50 Excel tabs to gather up... anything I'm missing besides the basic slog?
View 2 Replies
View Related
Feb 2, 2006
As a basic user of Access I believe I have identified a use for the program for the purposes of a reporting task which I am charged with at the moment. We undertake the weekly tracking of proposals, which involves in brief, the action required for the bigger proposals, the teams involved in writing the proposals and follow up information as well as registration of wins and losses etc.
At the moment we use Excel but I am finding it extremely labour intensive with entries having to be removed and captured by only one person on a weekly basis and when you are talking about 40 to 50 new proposals registered nationally in a week and about 100 updates on existing jobs it becomes a perpetual case of chasing your tail.
Am I right in thinking that if we were to design a simple, effective database with a form design that all our research directors could use with ease, and we could merely run reports off each week that this would not produce a far quicker reaction time when it comes to pooling international resources but also far more effective reporting system with which to produce our management summaries?
I am aware that this will probably require quite a bit of consultation on design but before I go shouting the merits of Access to any of my superiors I wanted to make sure I could be confident of Access's capabilities first?
Can anyone advise? point me in the right direction?
Many thanks!
Lisa H.:confused:
View 2 Replies
View Related
Dec 16, 2005
I want to make my Intro of Database. When I open it. Just like you open NorthWind(Sample) database.
How to Remove the Title WIndow of Form.With all sides just like in NorthWind.
also removed the Record Navigation (|< < 1 > >| >*). I saw every option in Form Properties but didnt find.
Please Let me help in this Regard.
My second Question If I only want to remove Record Navigation only.But Title window displays.
May be from first question I can also get my answer.
Thankful in this regard.
View 5 Replies
View Related
Jun 20, 2013
I'm trying to build a query that will normalize some graphical data along the x-axis. To do this I need all the peaks to be at the same point. I'll just talk in generic terms of FieldX and FieldY for the X and Y variables (resp)
In my mind the steps require me to
1) Determine FieldX at Max(FieldY)
2) Determine difference between FieldX and arbitrary normalization point (probably 100k)
3) Shift FieldX at all points to put Max(FieldY) over 100k (its a log scale so I'll be dividing)
Steps 2 and 3 are easy, but step 1 is giving me grief.
Ok, so I know how to find Max(FieldY), easy enough. Now how do I find FieldX? My first thought is a complex series of subqueries. At some point in the past, where I was smarter than I am today, I created a query that would do numerical integration. Looking back at the query I can't understand it, but I think the principle will be similar.
View 1 Replies
View Related
Nov 18, 2007
I am student, in high school, and I have to make a stock database, for ITGS, so as to receive my IB diploma.
I have created forms so as to enter stock information, and customer information, but I have no idea, as to how to connect them, so as to create an order summery and invoice. I started by creating 2 tables, one for the books, and one for the customers. I then made 2 other tables, one being an order table, and the other the linking table between the order and the books (see relation.jpg). I created a form so as to input information, but I can’t seem to get it to work, (see form.jpg)
Ideally, I would like the end-user, to select the customer's name, from a drop down list, and then for the rest of the customer information to update automatically, then, for the end-user to select a date, and finally the end-user to select books from the stock. Once the end-user has finalized the selection, they would ideally press a button, which would automatically print out an order summary/invoice (Maybe a report?)And that would also automatically reduce the quantity of the books in stock by one.
I have no idea as to how to do this and I would really need someone’s help, seeing as I have less than a week to hand this in by (The deadline is Monday 16th November 2007)
Here are the images
form.jpg - http://img30.picoodle.com/img/img30/5/11/18/f_formm_78d6ea7.jpg
relation.jpg -
http://img03.picoodle.com/img/img03/5/11/18/f_relationm_6280f62.jpg
Thanking you in advanced
CJ M
View 1 Replies
View Related
Oct 25, 2007
I have been tasked with producing a Service Catalogue - essentially, a list of services offered by IT to our business customers.
The Catalogue is a repository of information related to the service - such as, Service Info, Business Info, Server names and location, DB info, Batch and Online times, Network Info (and the list goes on).
Obviously, these are high-level categories. Within each of these (for example. Business Info) there is more granular info such as, Business Owner, Supported Business Area (there can be more than one) and Business Criticality.
Given the data and the fact that some category items may have one or many values for any given field (DB names for example), is this something worthy of a DB?
I have tossed this around in my head and I can't get away from the notion that I will require multiple tables with untold fields (yikes - scary thought!)
I have attached a rough DB but before I put any more time and effort into it, I want to know if I am on the right track.
View 3 Replies
View Related
Aug 9, 2005
Hi,
I am in need of help to sort out some records. I have tow existing queries I would like to combine and get one final set of records out of. They go like this:
Query 1. (unique #)
Lot Protocol Sample # 1 mth 2 mth 3 mth
X ABC 1 x x (check boxes)
Y ACD 2 x x
Query 2. (unique #)
Lot Protocol Sample # 1 mth 2 mth 3 mth
X ABC 1 8/8/05 9/8/05 10/8/05 (query performs
Y ACD 2 8/8/05 9/8/05 10/8/05 calculations)
What I am looking to retrive through the third query is this:
Query 3. (unique #)
Lot Protocol Sample # 1 mth 2 mth 3 mth
X ABC 1 8/8/05 9/8/05
Y ACD 2 8/8/05 10/8/05
Where the third query only shows the calculated dates when the check box is true. I have tried to go through the expression builder, but to no avail. I either get all records, like query 2 or I get nothing reported. I am not sure how to limit the records based on the check boxes.
Thanks,
CB
View 1 Replies
View Related
Apr 14, 2015
I have a table linked to SQL Server 2014. As SQL Server 2014 does not support calculated fields I created a query to use formulas. Now I want to write formulas on the existing fields ( TotalMarks ) of table Not to create new fields.
View 1 Replies
View Related
Jun 15, 2006
I am using a table a user created which is like:
Member ID (key field)
Visit Date
Dept 1
Expense Code1 (combo box E through I)
Dept 2
Expense Code2
This goes on through Department 20.
Now they want to know how many E's for one month. I am stumped on how to normalize this or if it is even possible! I thought maybe there is a way to search the table as if it were a spreadsheet doing a "countif" function??
Any replies much appreciated!
View 1 Replies
View Related
Oct 23, 2013
I have a database used to manage teaching assignments (which kid is assigned to which teacher so to speak). I have this relationship defined through three tables, a teacher table, a student table, both with unique ID's. The third table is used to define the assignment. Also, the kid table has an extra GroupID. The group ID is what is used to define. So in the definition table, Teacher 1 is assigned to Group 1, and so on (though their may be 20 kids in group 1). When a new teacher is added to the teacher table, I need it to add it to the corresponding field in the definition table. The groupID is in the table as an Autonumber so that will populate automatically.
I need to appendTeacherID to tblassignment (TeacherassignmentID) and have only one occurrence of the TeacherID. So, if I have teachers 1-8 listed, each assigned to a group# in the tblassignment, and I add Teacher 9, I need it to add Teacher 9's unique ID to the TeacherassignmentID field without adding 1-8 again. I can't figure out how to "check" for ID's 1-9 and add only those I've added to the teacher list that aren't already assigned to a group.
I've tried a few different SQL queries append/select queries but nothing seems to do what I need it to do....
View 1 Replies
View Related
Mar 15, 2006
Hi All,
my first post here, and hope that someone may be able to help.
I am setting up an access db for a bowling tournament and need some help with it if possible.
tables are planned, roughly as follows (some fields removed for clarity)
tblBowlers
BowlerID
Name
Association Number
tblSquads
SquadID
Name
Date
tblEntries
ID
BowlerID
SquadID
Game1
Game2
Game3
All bowlers will be entered into the tblBowlers table and all squads entered into the tblSquads table. Then each time a bowler plays (they can play more than once) there entry will be put into the tblEntries table.
I need a query that will give me each bowlers best 3 entries. So If Joe Bowler plays 4 times and bowls 168, 143, 207 - 208, 197, 214 - 169, 190, 199 - 201, 198, 245. I would need a query to list the best 3 of Joe's entries along with the best 3 of all other bowlers (sorted in ascending order, best bowler at top)
Any help would be really appreciated. I can do this in Excel, but I really dont want to :eek: LOL
Thanks
AJ
View 14 Replies
View Related
Jul 30, 2007
I have 2 tables which store information. One is a main table, and the other is an archive table. They store exactly the same information - i.e. the structure is the same. There is a checkbox in the main table and when users are done with an item they check that and it is moved to the archive table.
I need to generate a query which will treat those two tables as one table.
For example I need reporting by date for how many items received. I can do this for each table sperately but not together, at least not how I want to.
I need the results of the query to have the date in one column and category in another column and count of how many items in another column. But for both tables at once.
Is this possible? Am I being clear enough? TIA!
View 3 Replies
View Related
Jun 29, 2005
im creating a form in design view but the icon to show the fields from the table that i want the fields to come from isnt being displayed; how do i get it to show?
View 2 Replies
View Related
Jan 17, 2007
Hello
I have a database which i am constantly updating and improving. I have a few friends who use the database in a current form. If i made an update say to a form or to some of the coding to make the DB more efficent, how can i update the dBs my friends are using without damaging or changing the existing data, or migrating it to the new design.
I.e going from version 1 to version 1.1
Any advise would be great?
View 5 Replies
View Related