Thank you soo much for everyone's help, works a treat!
I have used Andy's code because the names and number of my column headings will vary between different ranges of products.
The code below is Andy's with an extra line I have added to handle the variable number of columns.
(ps. Haven't been...
Sorry I'm unable to explain, so therefore it is hard to search. Here is an example of what I have and what I want it to look like. This will be over hundreds of records.
What the data is:
Code Bore (mm) Bush (mm) Diameter (mm) Diameter (in) Kerf (mm) Rake RPM Teeth Tooth Grind
TP2102540 25 16...
I need to pro-rata a monthly budget so that a greater proportion is allocated to beginning of month.
They want it to be:
working days 1-5 = 40% of total budget
6-10 = 30%
10-15 = 20%
15+ = 10%
There is a table currently in the system called x_workdates...
Also, to identify different periods and compare the budget would it work if I had another table but didn't actually link it to anything - havent done that before and seems bad design?
FACULTY (tbl)
Period (pk) valid data in as 201001, 201002, 201101 etc
Budget$
And in the Appointment (tbl)...
I am after a bit of help with how to develop a database with expected change in $ Rate mid way through.
Basically the budget and course/staff/duty, goes over a semester - approx six month period.
These are the tables and attributes I have done so far:
COURSE (tbl)
STAFF (tbl)
DUTY (tbl)...
Thank you heaps George.
I made all 4 changes you suggested and it works much faster.
My last test of 100 records took 36mins, this test took just 9mins to run after all your improvements.
I am running a test of 1000 records now (which failed with my previous setup) and I can see the tempdb...
I have run the Tuning Advisor and the results were 0% Estimated Improvement - which I assume is good.
SQLServer has been installed on a pc I log into remotely now
Time it takes to run just 100 records = 36 minutes
I also timed it running the same query on a company sql server
Time taken for...
ps. I won't be needing to insert, update or delete records in this database. The results from the query will be analysed. This is going to be done for a few more sets of different source data.
Hi gmmastros.
Cant believe I didn't check and just assumed relationships and keys would copy across to sql from access. Anyway have done some research and worked out how to add the primary keys and relationships, just accepted clustered indexes i think.
My tables and keys are as follows, I put...
I know its been awhile since posts, but I just want to thank you George (gmmastros) because I went back and used the first query you sent and it worked successfully.
I have now finished running the query over all the data, finally. (It took approx 2hrs per 1000 results).
Another point I went...
Thanks Bill, but I think I just didn't really get it. I put your code in adding the second query below yours. The first one runs, ie strCompleteVisit. But the second one doesn't.
Private Sub Command29_Click()
Dim db As DAO.Database
Dim prm As DAO.Parameter
Dim qdf As DAO.QueryDef
Set db =...
I have a button on a form that I want to run two Update queries from but am getting "Error: 3061 Too few parameters. Expected 1."
Its driving me nuts, any help would be greatly appreciated.
My code is:
Private Sub cmdComplete_Click()
If MsgBox("Are you sure?", vbYesNo) = vbYes Then
'Run...
The result for ProductOfProbability is eg. 5.32829322812585E-05 so I suppose it would be a real?
I won't be able to remove the exp and log because then it just adds up these numbers, I need them to be multiplied by each other first. (The results of the multiplications are then grouped and added...
Thanks George. Probability is a double eg 0.326086956521739 and there are no negative or zero numbers.
The data is massive so efficiency is a big issue. I am going to end up with a total of 82,893 records (27,631 records for each of the 3 available OverallResults).
I couldn't output the...
I have a qry that gets the correct output result in Access, but it is way too big for it to process. As suggested I have been able to get it put on MS SQL Server 2008, but it wasn't successful.
In summary, the subqry matches heaps of records, works out the product in groups, then the qry sums...
PHV gave your code a go, but the output for TimeId 1 was 0 and TimeId 2 also 0. The result should be TimeId 1 be 0.108074373615488 and very similar for TimeId 2.
Your code is definetly a lot cleaner than mine though. But not sure why didn't quite work.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.