Ok, here's another.........I've done it in the past, but am sick as dog right now and am not thinking properly..
I have an XLS that has the following info empUid, empStat, empPerf1, empPerf2, empPerf3.
The file gets emailed, updated then needs to be imported back into MDB table, respective fields.
Opening query, have the file linked, but I am completely forgetting how I inserted the information into the proper existing empUID (essentially updating their empty fields), rather than having it added to the end of the table?
PULLING MY LAST BITS OF HAIR OUT!
7 2488
Hi. You could try the following update statement which updates the fields of the table joined to the Excel linked table. You must substitute in the correct names of your access table and your linked excel table as appropriate. - UPDATE [your access table] AS A
-
INNER JOIN [your linked excel table] AS E ON
-
A.EmpUID = E.EmpUID
-
SET A.empStat = E.empStat,
-
A.empPerf1 = E.empPerf1,
-
A.empPerf2 = E.empPerf2,
-
A.empPerf3 = E.empPerf3;
-Stewart
Thanks Stewart!
Worked like a charm....
Now, one last "stupid" question......if, on the XLS, I would like to have "Employee Performance in Area 1" as the column heading, rather than empPerf1, is that possible?
You know, those outside....looking at the XLS need it to be pretty. :o)
Hi Art. You can set the Excel headings in any suitable way, then refer to them in the update SQL like this: - A.empPerf1 = E.[Employee Performance in Area 1]
It is essential to use the left and right square brackets to enclose any field name that contains spaces.
-Stewart
Wooo-Hooo!
Worked like a charm!!!
Thanks and thanks to all that chimed in to help me out with this post.
:o)
So....like I said above, this worked beautifully.
Now I'm just wondering if there is a way to be prompted for the the source table at qry execution? Or is this something that needs to be built into a form? - UPDATE [PROMPT FOR TABLE???] AS A
-
INNER JOIN [your linked excel table] AS E ON
-
A.EmpUID = E.EmpUID
-
SET A.empStat = E.empStat,
-
A.empPerf1 = E.empPerf1,
-
A.empPerf2 = E.empPerf2,
-
A.empPerf3 = E.empPerf3;
I'm thinking something along these lines..... -
SELECT MSysObjects.Name
-
FROM MSysObjects
-
WHERE (((MSysObjects.Type)=1) AND ((MSysObjects.Name) Like "*tbl*")) OR (((MSysObjects.Type)=6) AND ((MSysObjects.Name) Not Like "*~TMPCLP*"))
-
ORDER BY MSysObjects.Name;
-
Thanks for all the help!
Worked beautifully using a form and the DoCmd :o)
Sign in to post your reply or Sign up for a free account.
Similar topics
by: george |
last post by:
This is like the bug from hell. It is kind of hard to explain, so
please bear with me.
Background Info: SQL Server 7.0, on an NT box, Active Server pages
with Javascript, using ADO objects.
...
|
by: Alex Vorobiev |
last post by:
hi there,
i am using sql server 7. below is the stored procedure that is giving
me grief. its purpose it two-fold, depending on how it is called:
either to return a pageset (based on page...
|
by: serge |
last post by:
I have a scenario where two tables are in a One-to-Many relationship
and I need to move the data from the Many table to the One table so
that it becomes a One-to-One relationship.
I need to...
|
by: Philip Boonzaaier |
last post by:
I want to be able to generate SQL statements that will go through a list of
data, effectively row by row, enquire on the database if this exists in the
selected table- If it exists, then the colums...
|
by: Andrew Bourne |
last post by:
I would like to insert multiple records into a table
based on a query returned from the same table. For
example a datareader returns 3 records containing the
following records
user1 file1...
|
by: shank |
last post by:
I'm trying to use online samples for submitting multiple records from ASP
into a stored procedure. Failing! Through the below form, a user could be
submitting many records at a time. I'm not...
|
by: Sezai YILMAZ |
last post by:
Hello
I need high throughput while inserting into PostgreSQL. Because of that I
did some PostgreSQL insert performance tests.
------------------------------------------------------------
--...
|
by: Bob Alston |
last post by:
I have a routine to copy data to new versions of my app via insert into
sql statements. Unfortunately, due to evolution of my app, sometimes
the new version has more restrictive editing than an...
|
by: nano2k |
last post by:
Hi
Shortly, I keep invoices in a table.
Occasionally, someone will fire the execution of a stored procedure
(SP) that performs several UPDATEs against (potentially) all invoices
OLDER than a...
|
by: mivey4 |
last post by:
Okay I have 2 tables:
Table A - holds a list of new hardware serial numbers and their corresponding model (no constraints or indexes)
Table B - holds a distinct list of current serial numbers...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |