Queries :: Way To Automate / Improve Update Of Query

Apr 13, 2013

I have 2 queries to check if there is any "double quote" character in any of 12 month columns in a month table of 125K records. I use 2 queries since the maximun criteria in a query is only 8. So I use 8 criteria in the 1st query then use 4 criteria to check the remaining months in the 2nd query. The month table is refreshed and created every month. The 12 month columns are changing from month to month since they are -13 month to -1 month when the month table is created. For example, if the month table is refreshed and created in May 2013, then the 12 month columns are "May 2012", "Jun 2012" .... and "Apr 2013". If the month table is created in Jun 2013, then the 12-month columns are "Jun 2012", "Aug 2012" .... and "May 2013". The end user has little knowledge of Access Databse so he seems confusing how to update the 2 queries on new month table.I am trying to see if there is a way to use 12 criteria in just one query so the end user only deals with one query's update.If there is a way to automate/improve the update of the queries/query, then it would be the best.

View Replies


ADVERTISEMENT

How Can I Improve The Speed Of An UPDATE Query

Mar 8, 2008

I have a (quite) specific question but I thing it covers something I simply cannot answer.

I have three UPDATE queries running on linked tables in Microsoft Access (2000/XP).

My main data table (the one to be updated) has almost 1million records

My three information tables ALL have primary keys (which are used to link the main table) and vary in size

I have atatched the three UPDATE queries plus descriptions of the field names used.


TableRecordsTime

Main DataTable900000
Mask nomenk1302 hours
Mask media90015 minutes
Mask brand4000?????



Query A
UPDATE [Main DataTable] AS z
INNER JOIN [Mask nomenk] AS n ON (z.nomCode1 = mn.nomCode1) AND (z.nomCode2 = mn.nomCode2) AND (z.nomCode3 = mn.nomCode3) AND (z.nomCode4 = mn.nomCode4)
SET z.NomenkMask1 = n!NomenkMask1;

Query B
UPDATE [Main DataTable] AS z
INNER JOIN [Mask media] AS mm ON (z.couCode = mm.couCode) AND (z.nomCode1 = mm.nomCode1) AND (z.pubCode = mm.pubCode)
SET z.MediaMask1 = mm!MediaMask1;

Query C
UPDATE [Main DataTable] AS z
INNER JOIN [Mask brand] AS mb ON (z.couCode = mb.couCode) AND (z.nomCode1 = mb.nomCode1) AND (z.brCode1 = mb.brCode1) AND (z.brCode2 = mb.brCode2)
SET z.BrandMask1 = mb!BrandMask1;


FieldnameFieldType
couCodeText
pubCodeText
nomCode1Long Integer
nomCode2Long Integer
nomCode3Long Integer
nomCode4Long Integer
brCode1Long Integer
brCode2Long Integer


My problem, quite simpley is the speed involved with running these queries. I know that query b) is the quickest with query a) a distant second (I could not even complete the running of query c) and killed it after 6 hours.

What I need to know is WHY is queryC soooo much slower than queryB when the only realy diference that I can see between them if the latter has an extra field to join on

View 6 Replies View Related

How To Automate An Update Query?

Dec 29, 2004

Is it possible to automate a update query to run whenever a table has a new record added? If so, how is it done?

Thank you.

View 2 Replies View Related

Queries :: Automate Outlook Task To Export Common Query Every Day

Jun 29, 2013

I've created an outlook task to export a common query I do every day, is there a way to automate it so it will happen automatically without me pressing Run?

I use office 2007 on a company laptop with tight network restrictions (so no Windows Task Scheduler)..

View 1 Replies View Related

Automate Changes Of Fieldnames In Tables/queries

Jan 31, 2008

I have a reasonable large dbase with some 12 tables and some 40 Queries.
In three of the tables, there are fields with dubious names like AA1, CD-3, 227, etc.
I want to change these field names to some more appropriate names like : Testblok , Cspeler, Jaarnummer, etc, etc.

In doing so, I will have to go thru each and every Query ( and at a later stage forms/reports) to change the fieldnames in that query corresponding to the changes I made in the initial table field name.

Would there be another way of doing this, i.e. is there a routine for changes made in the fieldnames, being “automatically updated in the table bound query.

View 6 Replies View Related

Queries :: Automate A Harder Date Field

Mar 12, 2014

I run a report based on dates I enter (see below)

>=[Date you wish to view DD/MM/YY] And <=[Enter the Date after DD/MM/YY]

I would like to automate this if possible, the dates are enter are always a set pattern

If its Monday I enter the previous Thursday and Sunday
If Its Tuesday I enter the previous Sunday and Monday
If Its Wednesday I enter the previous Monday and Tuesday
If Its Thursday I enter the previous Tuesday and Wednesday
If Its Friday I enter the previous Wednesday and Thursday
I dont run rthe report on weekends

View 7 Replies View Related

Queries :: Automate Show / Hide Of A Column Not In Use

Dec 18, 2014

I want to automate a query so when the user views it they see only the columns that have data. Columns that do not have data are not there.I am using MS 2007

My Access tool is setup to import data into tables and then the user views the data imported. However, if their's no data (and no column to import) I want the query report to not include the column.

View 8 Replies View Related

Queries :: Design View - Automate Date Field

Mar 12, 2014

I run a query daily and have to alter the date in the design view (as below).

>=#01/04/2013# And <#11/03/2014#

All I want is for the query to run 2 days behind, so for example today is the 12/03/2014, I use the above, and then daily change this every day.

View 1 Replies View Related

Modules & VBA :: Automate Access 2007 Queries With Form For Users?

Oct 18, 2013

I've been using Access 2007 to run queries on a database where we eventually export results as separate Excel spreadsheets for individual clients. The process is quite involved, using queries to change fields from code letters to words and splitting the database up into different client tables, saving the tables under date order and with different client codes.

I now need to pass this role on to colleagues, so need to make everything as straightforward as possible.

I had thought to use a Form as the user interface, with a minimum number of buttons, however I need either the system or the user to amend the date for the initial table, then to use this new table and run a series of standard queries on it, then produce the separate tables.

I don't think I can just use macros behind the buttons, because the database name is changing each time.

I assume some parts will be too tricky to automate - it will be necessary for colleagues to follow instructions instead.....

View 2 Replies View Related

How To Speed Up/improve Performance For International DB Users

Mar 7, 2006

Hello,
First time poster here so I hope this doesn’t sound too remedial. Here’s my situation…

I work for a large industrial company that has locations throughout the world. We have a DB that tracks product concepts and ideas and associated metrics for those ideas. The DB resides on a file server in North America (Raleigh, North Carolina to be exact). North American users have no trouble with the performance of the DB. It takes a moment to open (several seconds), but once it has opened there is virtually no lag time to add or edit records, run reports, view graphs, etc. However, users in Germany and the Netherlands encounter substantial lag time not only in opening, but also in updating and entering records, running reports, and viewing graphs. This is true even after they have waited for the DB to open.

The size of the DB is only around 2MB so I don’t think overall size is the issue.

There are probably no more than 3 or 4 users in the DB at the same time with most occasions being a single user so I don’t think we are having a multiple user issue.

The DB is self contained – no references to external data or splitting of any kind.

So my questions are:
1. Do you think the poor performance is a function of our network or of Access or the DB design?
2. If it is the network, is there anything that I can do in Access to help get around the hardware/network issues?

View 2 Replies View Related

Settings To Improve Export Text Wizard Speed?

Jun 25, 2014

I am exporting a large query to a delimited text file. I'm finding that it takes more than 5 minutes just to get the Export Text Wizard to load, and I'm guessing that's because Access is running the query as it loads the wizard.

View 3 Replies View Related

General :: Archiving Data - Improve Response Time Of Database?

Apr 30, 2015

Will archiving older data improve response time of a database?

What is the best way to archive data knowing that older records will still be accessed twice a year?

View 2 Replies View Related

Automate The Running Of A Parameter Query

Jun 12, 2006

Automate the run of a parameter query

I have a parameter query in ACCESS that generates an ACCESS report for 250 facilities. (Each facility has their own ID of course.) Every other month I need to run this report on all 250 different facilities. Then I give each facility their report by dropping it into an electronic folder.

This is a lot of work. Is there a way that I can automate the generation of these reports? Perhaps somehow pass the ID numbers?

I need each report to continue to be generated as a separate file.

View 7 Replies View Related

Modules & VBA :: Union Query - Automate Date Field

Mar 18, 2014

The statement below is a snippet from a union query and is repeated 6 times within the SQL Statement for various reasons, I have to manually change this every month, again is there i tiny bit of code I can insert to replace the following so that it automatically runs the previous months data.

WHERE ArrivalDateTime >= 'February 1 2014'

View 5 Replies View Related

Reports :: Automate Printing From A Command Button With Selected Data From A Query?

Jul 15, 2013

How can I automate different printers for different reports on the same MS Access 2007 database, without having to select the printer each time?

There are two reports that are printed on the same database. Previously, I had automated form buttons to print the reports, without having to select the printer each time. This was about 8 years ago, but I don't remember how I did this. Also, I don't know SQL. Nothing against code, but I did not know how to program, and just MS Access 2007 access itself.

View 6 Replies View Related

Queries :: Update A Query Based On Results From Another Query Using Count Function

Apr 2, 2013

I run a physical therapy office and patients come in for treatment either 3, 4 or 5 times per week. My database is used to track these frequencies (among other things).

I have 3 queries which count how many patients come in 5, 4 and 3 times/week.

In my main table I have fields called "how many 5's", "how many 4's" and "how many 3's".

I have tried to design an update query which will update those fileds in my main table to reflect the counts in the 3 queries mentioned above.

(I'm not using SQL view, I'm using the query design view)

In the "update to:" row, I use the Build function and locate the count I'm looking for.

Problem: when I run the query I get the error: Operation must use an updateable query.

View 3 Replies View Related

Queries :: How To Use Update Query

Aug 16, 2014

I am facing problem regarding updating of certain field of table. For example i would like to take data from a column of Table1 and would like insert that data into particular column in Table2.

Suppose Table One has data:

Table 1
ID Name amount
1 a 0
34 b 0
3 ab 0

Table2
ID Name amount
34 a 400
1 b 900
3 ab 4500

There are about 2000 records in each table.I would like to update column "Amount" of Table1 by taking data from Table2 "Amount" Field. how can i update the amount column by keeping the ID field?

View 5 Replies View Related

Queries :: Update Query To Add One To Current Value?

Dec 18, 2014

im working on an update query (written in VB coding) for one of my tables, for now im just setting the value to 1 (as currently all the data is set to 0, so for now it works), however id like to improve upon the query and get it to add 1 every time instead of setting it to 1 (i can work with it the way it is, but changing it would give me more info)

currently its at
DoCmd.RunSQL "UPDATE tblBatches SET tblBatches.batchCarryover = 1;"

View 1 Replies View Related

Queries :: Update Query From One Table To Another

Jul 2, 2014

I have 2 tables that hold similar data. In one table tblMultiSchedule I have a few blank columns. I want to update each column(ActualCost*) with the correct data which is stored in tblOrdersItems. the corresponding fields in each tbl are

tblMultiSchedule.OrderItemID1
tblOrdersItems.OrdersItemsID

I've been trying all day to have an update query to input the actual cost data into the tblMultiSchedule.

I know the rules regarding duplicate data but this is the only way i can do this.

View 4 Replies View Related

Queries :: Only A Certain Amounts Of Row With Update Query

Feb 14, 2014

possible to have an update query to only update 20 rows with a new data in the fields? And, how do I pass the information that I want to update only data from a certain date.If I have the word Cat and want to update it to Dog, but only with the dates 12-01-2014, where do I need to put the date part (also possible to do this for dates that are greater than 12-01-2014).

View 8 Replies View Related

Queries :: Update Query From 3 Tables

Oct 14, 2014

one of my tables.

tbl_type1
-type1_id
-PONumber

tbl_type2
-type2_id
-PONumber

tbl_bill
-billID
-PONumber
-bill_type

Now I have huge data from tbl_bill which contains mix PONumber depends on type. If bill_type is type1 then it will get data from tbl_type1 table and vise versa. the problem is tbl_type1 and tbl_type2 is changing, when someone update this table then the data in tbl_bill will not match to 2 tables.

Now, i need an update query where I can update all records of tbl_bill to match with tbl_type1 and tbl_type2 PONumber.

View 3 Replies View Related

Queries :: Cannot Update A Table Via A Query

Aug 14, 2014

I have created the tables I need for my Access Web App.I would like to create queries.I cannot update fields that show in the query (fields have a grey frame and cannot be edited) . I have even created a completely new app with only 1 table (no relationships whatsoever in case this may influence). It is still not possible to edit any field in a query (that would update the underlying table). Are there any general settings in Access I need to enable? Is there a setting in Sharepoint I need to enable?

View 1 Replies View Related

Queries :: Update Query Using 3 Tables?

Sep 1, 2014

Can't figure the SQL to UPDATE a table (tblAccomResv) with columns: AccomID and DtBooked. It will be an empty table.

I need to populate it with one record for each record in tblAccomodations (ID) by each record in tblEventDts (EventDts).

Like:
Room1 Dt 1
Room1 Dt 2
Room2 Dt 1
Room2 Dt 2
etc.

View 5 Replies View Related

Queries :: Can't Get Query To Even ALLOW To Update Record

Jul 1, 2015

I can do this in like 5 seconds in SQL Server but I can't get the query to even ALLOW me to update records.

Table1 - Columns
Query1 - ColumnDesc

Code:
SELECT DISTINCT C.Column
FROM Columns C INNER JOIN (
SELECT Cols.Column, Count(Cols.DataType)
FROM (SELECT DISTINCT Columns.Column, Columns.DataType FROM Columns) Cols
WHERE Cols.DataType = 'char' OR Cols.DataType = 'varchar'
GROUP BY Cols.Column
HAVING Count(Cols.DataType) > 1
) C2 ON C.Column = C2.Column;

Simple, straight forward query, that grabs all the rows from table Columns where there are more than one DataType per Column [name], and either one of those datatype strings are 'char' or 'varchar'.Now I want to UPDATE table Columns to set all of the columns whose "column" value is in the above query, and set all those DataType values to 'VarChar'. Thus I run that UPDATE query, and the above query should come back empty afterwords in SQL Server I would simply write:

Code:
UPDATE Columns
SET DataType = 'varchar'
WHERE EXISTS (
SELECT 1 FROM ColumnDesc INNER JOIN Columns ON ColumnDesc.COlumn = Columns.Column
)

And this would already have been done.But Access doesn't like that syntax. using the designer it created sql like this:

Code:
UPDATE Columns INNER JOIN ColumnDesc ON Columns.Column = ColumnDesc.Column
SET Columns.DataType = 'varchar'

But that wasn't an "Updateable" query.I have to run this on several patterns and right now I'm completely screwed if I can't get this to work.

My end goal is to have:
SELECT DISTINCT Columns.Column FROM Columns
return the same # of rows as
SELECT DISTINCT Columns.Column, Columns.DataType FROM Columns

for each duplication I will have to do different algorithm, but I can't even get one update query to work so I'm currently frustrated (and ready to reaffirm my belief that Access should have been discontinued 5 versions ago).

View 1 Replies View Related

Queries :: Update Query Using Previous Query

Dec 1, 2013

Is it possible to create an update query where the Update To field is set to the results of a previous query? I've been playing around with the Design View but I haven't figured out how to do this yet.

View 3 Replies View Related

Update Query Based On Another Queries Result

May 14, 2007

I currently have the sql below...
UPDATE tbl_Node_List INNER JOIN qryUpdate_P1 ON tbl_Node_List.Zip = qryUpdate_P1.[Zip Code] SET tbl_Node_List.[Date Sent] = (SELECT [MinOfAudit Date] FROM qryUpdate_P1), tbl_Node_List.[Date Recv'd] = (SELECT [MaxOfAudit Date] FROM qryUpdate_P1)
WHERE (((tbl_Node_List.Zip)="35243"));

but I get an err.msg stating the operation must use an updateable query.

What I am trying to do is update my dates in 'tableA' with the max and min values stored in 'tableB'. I have read some of the posts but still can't quite get it. As always all help is appreciated.

View 2 Replies View Related







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