SQL Stuck Point

Oct 17, 2006

Hello all,

I am currently working on an sql query to find employees which handled more orders than average in a certain half year. For arguments sake the half year is august-dec1997. I will use two queries, one to calculate COUNT and one for the avg:

So far I have the COUNT query sorted:

SELECT Employees.EmployeeID, Count(Orders.EmployeeID) AS CountOfOrders
FROM Employees, Orders
WHERE (((Employees.EmployeeID)=[Orders].[EmployeeID]))
GROUP BY Employees.EmployeeID;

However, I am uncertain how to proceed from here and find the >AVG part of this query. Any help would be appreciated- thankyou :o


To add to this I think the next table should be like this:

SELECT qrycountOfOrders.EmployeeID, Employees.FirstName, Employees.LastName, qrycountOfOrders.CountOfOrders,
WHERE
FROM qrycountOfOrders, Employees
WHERE qrycountOfOrders.EmployeeID = Employees.EmployeeID;

But I am unsure where to put the >=AVG...

View Replies


ADVERTISEMENT

Fix End Point

Sep 21, 2007

:)Hello,

I have one Access table called plan_location where it contains the following columns: shape_id (number), seqnum (number), xcoord (number) and ycoord(number). The shape_id is a individual number for each planname, the seqnum is the number of points in the plan and the xcoord ycoord indicate the x,y location on the ground.

See example:

shape_idseqnumxcoordycoord
700609719.4294818231.424
701609745.694818251.119
702609755.9194818230.81
703609781.7674818243.946
704609822.6834818254.656
705609871.714818261.276
706609879.4324818226.623
707609814.9484818218.313
708609763.8424818198.827
709609730.0664818165.801
7010609698.2784818123.723
7011609668.3594818142.025
7012609714.9354818201.641
7013609729.6864818214.026
7014609720.4294818240.424

In the above example, although this is only one plan of thousands, the xcoord/ycoord value for seqnum=0 is not the same as the xcoord/ycoord value found in seqnum=14, thus this indicates an error.

I need to find a way to isolate those shape_id's with the beginning seqnum of 0 that is not the same as the highest seqnum of 14, in this case. The seqnum can range from 0 to any number, depending on the number of points.

If the seqnum of 0's xcoord/ ycoord values to NOT match the highest seqnum's xcoord/ycoord values, I need to find a way to insert the next highest seqnum and add the same xcoord/ycoord values found for seqnum = 0

How can this be done?

Thanks in advance..........CementCarver:confused:

Not sure how this is done..............

View 5 Replies View Related

Starting Point For Db.

Jul 27, 2005

Hi All.
This may be a bit of a strange one, but was wondering if anyone had any ideas.
I would like to create a db which is a bit like the directions bit of multimap.co.uk

As per the attached jpg, i would like a db so I can input a starting box and end box, and it would tell me the shortest distance, longest distance, route via boxes etc.

e.g
Box A as start and Box F as end. Shortest route is via Box D, longest route via boxes B and C etc.

The db would obviously not for measuring distances between boxes!!!....but thought this may explain it.

Does anyone have any ideas?

Thanks for taking the time to read this.

Frank.

View 5 Replies View Related

A Point In The Right Direction Plz.

Nov 14, 2006

Not sure what this covers so if someone could point me in the right direction, so I can get started.

I want to do a search of customers through a button on a form with names, and there you get a list of customer that match your criteria. When you click or double click on that customer you get sent to the main form with all the customer details on it.

thx
Damien

View 3 Replies View Related

Decimal Point

Dec 14, 2005

Hi

I have data numbers:

1500
60000
8900

How can I put a decimal point two from the right ie:

15.00
600.00
89.00

Thanks.........

View 2 Replies View Related

All Problems Point To This

Aug 3, 2006

My Access DB is built and works great. All problems that I have seem to revolve around the 2 tables that I link to Excel spreadsheets. The spreadsheets come from downloads. The problems are:

Can't format fields in a linked table. and the download comes unformatted.

Can't make DB Multi-User because the Linked Spreadsheets restrict access to more than one user at a time.

Is it possible (Practical) to build a macro that would access the spreadsheet on a regular basis and import it (Overwriting the previous data in the table) into Access?

I would really appreciate anyone that has a solution. I am ready to pull out the last 3 hairs I have on my head.

View 2 Replies View Related

Point Me In The Right Direction

Sep 1, 2006

Dont use access much but I have basic db dev. skills. That said, here's my dillema:

I have a front desk entry form fro service calls. There is a entry field for customerID. I would like to auto populate f_name, l_name etc... from just entering customerID. I know what I would do in an SQL situation, but how does that transfer over to access? Any help would be great. Thanks.

View 3 Replies View Related

Really Stuck

Aug 6, 2006

i have been trying to for the last several weeks create a database which holds information about companys e.g addresses etc on it. It also has a subform on it which runs a query and shows me the courses they run with a button beside it. This subform propertys is set to continues and so there is a button that appears beside each course. How can i get it so when i click on the botton beside that particualr course it will load up another form and display some more information holding the times and dates of this course.

View 11 Replies View Related

Stuck In This

Jun 15, 2007

I've been designing a db and entering data in the process. Now I'm almost done with this project and other people are interested in this db. Is there a way to empty all table records? Is there a command to have a blank db?
My db has almost 5,000 records :S and each record has another table with 5 linked records
so there are like 25,000 records to delete. I know there is a way and its to create another table with the same fields and importing the rest of the objects... but I want to make there is no other way.

Another Q is how to add security to my db how to "attach" the db to a hardware of a computer so if the db is installed on another computer it asks for a serial number...I have asked this before but no one had answer me this.
Thanks in advanced

View 7 Replies View Related

Stuck - Help Please

Jan 8, 2008

Hi

I want to use MS access to build a diary / appointment system, and a table for storing contact details.

I am struggling with the appointment system. I was going to try a table with the date and diffefent app times as fields. then put it into a form so that it looked like a diary page and i could just add names to the times., this would have ollowed be to scroll backwards and forwards through the dates with ease (as each day would be a new record)

The problem i have found is that this makes running quires on individuals difficult,i would like to see for example how many appointments a person has missed, the dates of there next appointments if they have pre booked ect.

any suggestions as how i should go about this?

View 6 Replies View Related

I'm Stuck And Need HELP!!

Apr 28, 2006

I'm trying to update a table based on a field in an unbound form

Here’s the code:
Private Sub Command38_Click()
Dim strPartNo As String
strPartNo = Me!fldPartNumber
Set dbs = CurrentDb()
Set rstBalUD = dbs.OpenRecordset("SELECT * from PartsInventory WHERE CO_PART_NO = [fldPartNumber]", 1)
rsBalud!SERVBAL = Me!fldNewServBal
rstBalUD.UPDATE

End Sub



Here’s the error:
Run-time error ‘3011’
The Mircosoft jet database engine could not find the object ‘SELECT *
from Partsinventory WHERE CO_PART_NO = [fldPartNumber]’.
Make sure the object exists and that you spell its name and path name
correctly.
Reply With Quote

View 2 Replies View Related

Very Stuck

Oct 7, 2007

I have a table that has the follwoing fields:

-student name
-pesent percentage
-compare value 1 (a number)
-compare value 2(a number)

now i want a query to display the following fields as an output

-Student name
-Compare value
-present percentage 1
-present percentage 2

so where "compare values" 1 and 2 are equal it will display 1 record in the query that will show both the values. in respective fields.

View 4 Replies View Related

New And Stuck

Mar 4, 2005

I have a form which includes two fields (amonst others) Town and STDCodes.
What I want to do is enter the Town from a drop down list and the STDCode is automaticly inserted in the STDCode field, the towns are all local about 20 in total. How can I do this please in simple easy steps.

Malcolm

View 2 Replies View Related

I Got Stuck

Mar 12, 2005

Hi all.

I'm creating a database for a work experience database for a school where each pupil has to be assigned to a company. The problem is that on the form "Final form" where it says Work ID I want it so that each pupil is assigned to that company and then I can create a reports.

For example I choose work ID 2 for one of the pupils and when I create a report it'll have the information of the student profiles with the companies they're supposed to go to.

Can anyone give me a hint or any guidance on how I can do that?

Thanks.

I haven't used Access for that long so I'm useless with all the technical terms, sorry.

View 1 Replies View Related

Pls Help Im Stuck

May 11, 2005

Right im really stuck on this, how do you get the date visit to update correctly, it requeries but some times shows data it shouldnt. it should corispond with the subform.

next thing is the text box that says 'name needs to display the notes from that visit in , ( that thats in the sub form far right box.


any help on this would be much appreciated
in the dtabase its form "CD2"

View 10 Replies View Related

Stuck...please Help

Sep 20, 2004

Ok so I have been working on this problem for two days, and I am stuck.
It's been a little while since I've used Acess, so please pardon this question.

A database has been built compiling thousands of records of information for shipments. Here is the main problem.
Imagine if you will, that a truck is sent from teh warehouse to a customer, with the customer's order(s). So in the
database, is a record for each order. The order is comprised of the Bill of lading for the truck, the customer's name, and information about that specific set of palettes. So for example a truck may be sent to a customer, and there are 3 types of products on the truck, or only 1 type. For each record, we have the cost of shipping that individual product, as well as the amount paid for the entire bill of lading.

We've creaetd a query to pull out all the trucks that were shipped with just one product. We've also created a query to pull the 'duplicate' records. The problem lies in manipulating this "duplicate" query.

Each record in this query has multiple entries for bill of lading field, the customer's name, amt paid, and cost amt. We want to create a query from the "duplicate query", that will return just ONE listing of each bill of lading, as a well as a total cost of shipping. so for example if
bill 704555, had 3 shipments on it at a cost of $50, $17, and $33, we want a query that will compile these 3 listings into one listing (So now Bill of Lading appears once, with all the requisite information, and the total cost of $100 in a new field in this query, called totalCost). We'd calculate this by hand, but there are approximately 7000 recodrs in the query, and this will continue on an ongoing basis, so the query needs to perform teh summations.

thanks in advance for your help!
Matt

View 1 Replies View Related

Please Help! I'm Stuck!

Jan 10, 2008

Hello! I'm developing a database that is to be used for case management. Being completely self-taught it's been a bit of a struggle!!
I have a form where data is entered regarding the details of each case. This form has a button on it that opens another form for entering the details of the participants involved in each case. To make the database as user-friendly as possible I would like to add a field to my main form which counts the number of participants. The forms are linked by a case reference number & I made a query (that works) that counts each instance of a particular case number in the participants details form....then I got stuck. Is there a way of adding the results of a query to a form that is based on a table? Or else is there a way I can perform that calculation in the main form?
I would really appreciate it if you could make your replies as "Access for Dummies" as possible!

Thanks!

Oh it's Access 2007 if that helps at all.

View 5 Replies View Related

Remove Zero Before The Decimal Point

Mar 9, 2008

Hello,

I have a lot of values that look like this: 0.524, 0.673, and 0.398. I hate to look at these numbers with the zero before the decimal point and would like to find out how to remove them. I know that it's possible in Excel, but I'm not sure of how to do it in Access.

Is this possible?

Thanks

View 1 Replies View Related

Decimal Point Problems

Aug 7, 2007

I am working on a database that tracks things for a welding shop. Because of this I am using heights in millimeters and decimal points are necessary. The page I am using is an input form with a subform tied to a specific record. I can under no circumstance get my decimals to stay put in the input form or in the table. I have tried changing to decimal and putting the decimal to two and the precision to five, long integers with decimals to 2. Formatting with #.## so it maintains it in the text box... but nothing has worked. Has anyone run into this problem?

Thanks

Riley

View 6 Replies View Related

Single Decimal Point?

Jun 12, 2006

When created a query how do you change the decimal point,
There are many and i want a single one.

View 1 Replies View Related

ListBox Decimal Point?

Apr 14, 2005

Does anyone know how to force a listbox to display an additional level of accuaracy in a listbox which displays a value based on an expression in a querry? My querry displays the value to 4 decimal point but my listbox only diplays the value to 2 decimal point.
Thanks!

View 2 Replies View Related

Access To Power Point

Jul 20, 2006

I need to transfer a report form access to a power point slide does any one know how or have a macro that does this. or know someone who does.

View 3 Replies View Related

Hiding The Insertion Point

Nov 17, 2006

Is there anyway to hide the insertion point in access?

View 1 Replies View Related

2 Fields Point At Same Table

Nov 30, 2006

Quote: I have 2 fields in my table - cityID and offcityID - I want to create a query that

ties the cityID to the city table cityID and
offcityID ties the offcityID to the city table cityID

I am not getting the correct amount of records when I set this up.

Code:SELECT [main changed].lastname, [main changed].firstname, [main changed].address, City.City, [main changed].business, [main changed].offaddress, City.CityFROM [main changed] INNER JOIN City ON ([main changed].cityID = City.CityID) AND ([main changed].offcityID = City.CityID);


Quote: I should have 1898 records - when I have the AND in I get 227 records and when I have the OR in I get 2176 records. Neither is correct

View 10 Replies View Related

Somewhat Stuck In Bowling Db

Mar 1, 2006

I am trying to create a bowling league db in access 2003. I believe I have started with the right structure but I am having some trouble with recording the scores of the bowlers. Attached in a word doc is how I have set up the relationships. Any thoughts would be greatly appreciated.

D.J.

View 2 Replies View Related

Im Stuck With My Combo Box...please Help With Just One.

Dec 15, 2006

I am having difficulties with combo boxes for some reason and cant get it to work. I have spent this week trying to use examples found here and other places but still not successful.

Have looked at the examples on font stuff and have downloaded various examples here on these forums.

If anyone can help set this one up for me, then I can use it for a model for the rest, just not sure how to setup initially. Even if you get me closer to what I am now.

I thought I came close yesterday, but the combo boxes didnt change the records in the database after choosen.
-----------------------------------
I need the classification drop down box on the member details form to prompt the secondary box choices. Initally if someone chooses "Lost Opportunity" in the classification then the reasons why need to be available in the second box. When choosen they need to be saved in the database. I have tables setup for classification (tblClassification) and for reasons (tblLostopportunityreasons). If anyone at all can help set this up I would soooooo appreciate it.

----------------------------------
Then I can use this to help me do others that I need to do. I am looking for this one xmas present since I am stuck and my understanding of Access is rather new.

Thanks.

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved