Suppose I receive boxes and store them in a room. Each box can contain items that are either shaped as cubes or spheres and I have to allow for the addition of more shapes in the future, but only one shape can be in each box. Each box contains a random number of shapes and two boxes may, or may not, contain the same number of shapes as another.Cubes can be either Red or Green, Spheres can be either Blue or Yellow.
I wish to set, and have the ability to change, how many cubes and how many spheres, on a percentage basis, I wish to have (e.g., 60% Cubes and 40% spheres).I also wish to set, and have the ability to change, what percentage of cubes I want to be Red and Green and which percentage of Spheres I wish to be Blue and Yellow (e.g., Cubes -Red 70%, Yellow 30% )
e.g. -- I have several boxes totaling:
Cubes Red 30 Green 40
Spheres Blue 10 Yellow 20
My goal is to produce three reports.The first report would provide the Target and Actual number of Cubes and Spheres expressed as a Value and %. The #'s would simply be calculated from my desired % . So, if I wanted to have 60% cubes and I had 100 Shapes, my target # would be 60. If I had 200 Shapes it would be 120. (i.e., The actual number of shapes I have is simply a factor of how many I receive and I have no control over this.)
The First Report would look like this
Target % - Actual % - Target # - Actual #
Cubes 60% 70% 60 70 Spheres 40% 30% 40 30
The second and third reports would be the same format but would break down cubes into red and green and spheres into blue and yellow.I can accomplish the Report that breaks down the shapes but I am running into problems with the next level as I need the total number of shapes and the the total number of only Cubes or Spheres to insert into the expressions.
I've got a table with football players, each player has a name, id and a value. The value gets updated everytime the player has played a match.
I don't have a rank field, and lets assume it's not possible to add it.
I'd like to get, not the "top" players but the players from, say rank 10 to rank 20. What I do now, is I get all the players (ordered by their value) and then loop thru the resultset.
Code:strSQL = "SELECT * FROM player ORDER BY player.score DESC;"rsPowerbabe.Open strSQL, adoConFor i = from_rank To to_rank Response.Write (rsFootballPlayers("name")) Response.Write (",") rsFootballPlayers.MoveNextNext
I think it would be more effective, if I could let access do the hard work..
I am developing database for my school. I am done with everything except the examination aspect where i need to indicate students position in every subject beside their overall position according to the sum of all the subject scores. How to indicate student position in subjects.
I am facing the difficulty to solve the calculation of my Employees payment table in query, employees having three type of payments 1. Leave 2. Air ticket 3. EOSB so I have created three different queries named Airticket_Accruals, Leave_Accruals, EOSB_Accruals for these tables.
The problem is I need to include how many payments have been done to every employee in total to my every individual query (airticket,leave & EOSB) than I will less the accrual that will give me the balance I need to pay them.Field for Payment table is as follows and it has relation with Employees table with Emp_ID field.
I have set up two queries to generate a rank order based volume generated. The query does what I want for the most part in that if two parties have the same volume, they have a common rank (this is what I want to have happen). The problem comes that at various points throughout the data set, some of the rank sequence will be skipped...example, rank 265 to 267 (skips 266) and rank 786 to 790 (skips 787, 788, 789).
How can I close the gaps?
Here are the two queries...
Query 1 SELECT VolRnkALL.group_code, Sum(VolRnkALL.avg_group_volume) AS SumOfAvg_Group_Volume FROM VolRnkALL GROUP BY VolRnkALL.group_code ORDER BY Sum(VolRnkALL.avg_group_volume) DESC;
Query 2 SELECT qry_SetRankSTEP1.group_code, qry_SetRankSTEP1.SumOfAvg_Group_Volume AS Expr1, (SELECT Count(*) FROM qry_SetRankSTEP1 t1
WHERE t1.SumOFAvg_group_volume >= qry_SetRankSTEP1.SumOFAvg_group_volume) AS Rank FROM qry_SetRankSTEP1;
I have a query which brings back the following columns:
YEAR; PERIOD; STORE; PRODUCT; GP.
The table it is referring to is called 05_FULL_TABLE and I have changed the Alias for this table within my query to 05_FULL_TABLE1.
I'm trying to add a field which will rank the products by GP (Highest GP=1), within each group i.e. the rank starts from 1 again every time you hit a new year, period, or Store.
I've taken a suggested method from Microsft Support: http://support.microsoft.com/kb/208946 Seniority: (Select Count(*) from Employees Where [HireDate] < _ [Emp1].[HireDate];)
and changed it to: RANK: (Select Count(*) from 05_FULL_TABLE Where ([SumOfGP] < [05_FULL_TABLE1].[SumOfGP] AND [STORE_FKEY] = [05_FULL_TABLE1].[STORE_FKEY] AND [YEAR] = [05_FULL_TABLE1].[YEAR] AND [PERIOD] = [05_FULL_TABLE1].[PERIOD]) +1)
It is adding a rank, but it is not starting the rank again at any of the changes in store etc (which are all sorted Ascending in the query result), so I guess my "WHERE" clause isn't right. Can anyone suggest where I've gone wrong?
I have a table which has got the following fields: Name and Points
I want to create a third fieldw with the name of rank which should give automatic results of rank that is the one with the maximum points should have '1' written in his rank column. Similarly, all rank fields should be filled accordingly. I used the help, it said i should apply the syntax. I do not know how and where to apply that syntax Your help is appreciated [HassaaN]
I used to do this in oracle using RANK function. I do not know how to do this in MSACCESS
SELECT Tax_ID, Tax_Name, Start_Date, Tax_Percent, RANK() OVER (PARTITION BY Tax_Name ORDER BY Start_Date desc) as Date_rank FROM TaxType where start_date<=to_date(10/01/2010, 'mm/dd/yyyy')
I want to know if it is possible to get an output that adds a ranks the CompanyIds by average cost per each policy #.how companyID24 ranks, and I have the query set up where it only outputs Policy#'s that company 24 is ranked in (has sold product in).
I have a competition ranking contestants. A contestant can compete multiple times, each time with a unique registration number.
I am trying to sort by score to rank the contestants, however the contestants can only receive one rank - their highest score (not a sum of their scores, only one score). ? ?
Example: Registration Name Score 2345 Sally 247 3456 George 230 4672 Sally 255
What I want to see: 4672 Sally 255 3456 George 230
I'm very new to Access, having used it for the first time today :)
I've got a database to write for a media database as a learning example and I've run into my first real problem...
I've got a table for users and I've got to allow users to be able to own one or more media types, e.g. CD, DVD, video, record, etc. Of these types, there are sub-categories for most of them. For example, a DVD may be a horror film, action film or music video, and a CD may be hip-hop, rock or blues, etc.
I thought I could have a reference data table containing a category ID and category value, together with a reference data category table which simply listed the categories. This would work fine if a user could only have one type of media but of course they can have several. So, I thought about having a "composite category" instead which would contain a category, whether it contained a sub-category and a sub-category ID. I'm trying to get my head round this and wondered if this must surely be a fairly common issue to solve. Does anyone know of any pointers or any examples I could do with looking at?
Okay here is my silly little issue, my boss decided to add sub categories, just when I get the database set-up. Table 1 Category Category_ID Category_Name
Table 2 Sub_Category SUb_Category_Name
Table 3 Contacts Company Contact Adress Ect Ect
I would like to be able to have each contact grouped by category, then sub category..but I am not sure how to get the relationship to work.
I am implementing a new database (Access 2000) for my company.
It contains contact details of a subscription base.
Four tables are present MEMBER, ORGANISATION, EVENTS and CATEGORY.
My problem is; people attend events, and i want to record this in the database. Each event has an event ID field, and an event description field.
When recording the events which people attend, i could just use the event ID field, but problem is that people can obviously attend more than one event..
Also;
People belong to a certain category
Again i have a category ID field, but people can belong to more than one category.
I am working on a database to list all the inkjet cartridges we sell. Within the printer table, I want to list which category they are on our website. For example, Epson C20 Printer would be in Ink & Toner > Epson > Inkjet > Stylus C & CX Series.
I what some way to enter these in a number of fields, say Cat1, Cat2 etc. I havent a cluw what would be the best way to do this? Has anyone got any ideas? I am thinking about some kind of drill down but wouldnt know where to start on this. Any help would be gratefully received?
I'm wondering how to design an Access database with the same type of structure as "Yahoo Shopping!". The Yahoo site allows search for women's clothing or men's clothing or all clothing...please explain how the relationships are structured.
Is it just one category table with queries that display results of a search of multiple categories? How do I structure it in Access queries and forms?
I've built a contacts database which consists of one table containing contacts and services provided and a table with a list of categories, each has a PK autonumber id field. My problem is that individual contacts could fall into multiple categories, could somebody tell me how to do this.
- Category (A, B, C) - Family (A1, A2, A3, B1, B2, etc) - Item - Sales
I'm looking for a way to get the top 10 items in each category + family based on sales (ie: top 10 in A-A1, then A-A2, then A-A3, etc). When I try using the top function, it doesn't treat each category + family combination as unique. Any ideas?
Got a problem here with Access 2003: got 36 categories (example: volume from 0-0.1=category 1 vol from 0.1-0.2=category 2 etc) and a whole bunch of records (in a table) stating volume per record (0.111, 0.23456 etc). For each record I need to know which category it is. Now in order to prevent me from writing 36 update queries for each category (if vol>0 and <0.1 then category = 1 etc) there must b a smarter/faster way to do this. What is it?
I have a form for recording site details and have been trying to autofill three of the four categories.
What I have is a Site Index Table that contains the site ID, Name, Description and Type. I want the results to be recorded in an Affect Table that will also contain text data associated with these fields that I will enter in manually.
I then have a form with the four fields; the site ID and Type are both bound to the Affect Table that records all the data associated with each site. The Name and Descritpion source their information from a seperate query of the Site Index Table.
So what I want to do is to select the site ID on the form from a combo box I've created, and once selected it will automatically fill in the relevant text data into the Name, description and type categories on the form. I've been trying scripts with the DLookup function but have continued to encounter errors. If anyone can help PLEASE help me as i'm a novice when it comes to Access
I need to create a database of the info of a few hundred companies. Each company (food producers) specializes in various product categories, not just one. This is my problem/question: each company entry should then have a possibility to have as many product categories as needed. How can I do this without using "free text" fields? The website user should obviously also be able to search the db - by clicking checkboxes with the categories maybe?
(+Also: When the admin user needs to add the info of a new company (with, say, 9 product types) into the database, what kind of an SQL clause I need to INSERT INTO the db? For example if the product categories where laid out as checkboxes, and the user would just click the ones he wants.)
I would like to separate my list box in two categories.Indeed it is composed by 2 types of criteria but arranged in the same List box (I can't create another List box, it's forbidden).how can I proceed?I've thought to insert a dash but it has to appear all the time and I don't know if it's possible to do that.
I've also thought to enter a title IN the list box above each category but it has to appear all the time too..when I click on one item in the List box it becomes highlight.May be code the 2 titles I could add for being always selected (highlight).I don't want to have to select the 2 titles every time!!!