I am pretty new at this, so please bear with me.
I have a table with all my records. I update my table. Today, I updated my table with three new records. I want to take only those 3 records and put them into another smaller table which has only 4 fields. I can't make it happen... I can get it to Append all the records, but I only want the three new one.
Your help is appreciated.
10 5598
You have posted your question in the Articles section rather than the Forum section. I have moved it across for you.
Linq ;0)>
Thank you very much !
You have posted your question in the Articles section rather than the Forum section. I have moved it across for you.
Linq ;0)>
Hi there. Could you post the metadata for the two tables you are using.
Here is an example of how to post table MetaData :
Table Name=tblStudent -
Field; Type; IndexInfo
-
StudentID; AutoNumber; PK
-
Family; String; FK
-
Name; String
-
University; String; FK
-
Mark; Numeric
-
LastAttendance; Date/Time
-
thanks for your help
Table Name – tbl2007
FieldName; Type,
Item# AutoNumber
Invoice #
Invoice Code
Description
Date
Acct#
Return#
ContactName
ContactAddress
ContactCity
ContactState
ContactZip
I want to update tblStatus with only a few fields, and only the new records in tbl2007
Table Name – tblStatus
(Fields to be updated from tbl2007)
Item# AutoNumber
Invoice #
Invoice Code
Description
The append query would be something like this: -
INSERT into tblStatus (Item, Invoice, [Invoice Code], Description)
-
SELECT tbl2007.Item, tbl2007.Invoice, tbl2007.[Invoice Code], tbl2007.Description
-
FROM tbl2007
-
WHERE tbl2007.Item Not In (SELECT tblStatus.Item From tblStatus)
-
This is the basic lay out of what you will need to do. I'm assuming here that you will want to append any records from tbl2007 that aren't currently in tblStatus. This is handled by the where clause. If this is not the case how do you plan on determining which records are new in tbl2007? By date perhaps?
Exactly what I needed. I will go try it...... thanks!
Exactly what I needed. I will go try it...... thanks!
Hi, kwc.
Just a silly question.
What a special reason do you have to maintain separate table which is just field subset of another one?
Why not to use simple query like this - SELECT tbl2007.Item, tbl2007.Invoice, tbl2007.[Invoice Code], tbl2007.Description
-
FROM tbl2007
to retrieve necessary data any time you like?
Hi, kwc.
Just a silly question.
What a special reason do you have to maintain separate table which is just field subset of another one?
Why not to use simple query like this - SELECT tbl2007.Item, tbl2007.Invoice, tbl2007.[Invoice Code], tbl2007.Description
-
FROM tbl2007
to retrieve necessary data any time you like?
NEVER a silly question - it actually helps me think through how to do things in a better more efficient way. I greatly appreciated. My problem is - and help me if there is a better way - I have to export into excel, and in my excel spreadsheet (which I have to email to the managers) I add a few more fields and mess with it....
I am actually confusing and probably complicating my situation with multiple places where I need to update data...
NEVER a silly question - it actually helps me think through how to do things in a better more efficient way. I greatly appreciated. My problem is - and help me if there is a better way - I have to export into excel, and in my excel spreadsheet (which I have to email to the managers) I add a few more fields and mess with it....
I am actually confusing and probably complicating my situation with multiple places where I need to update data...
Ok. I have some additional questions. - You want to export to excel only some records from tbl2007. What criteria do you want to use to select records (date range, those never been sent previously etc.) ?
- What are these additional fields in excel spreadsheet? I mean whether they are being added to each record becoming a part of query or they are separate single fields?
- Do you want to use some template excel file or you want to build it from scratch?
NeoPa 32,556
Expert Mod 16PB
Fish, you're on the right lines there. The OP probably doesn't want a separate table for this stuff.
KWC, if you can answer FishVal clearly I'm sure he can help you to do this in a more straightforward (natural) way.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: JMCN |
last post by:
hi
i need some advice on whether if it would be better to use an append
query or an update query. here is the situation, i have linked another
database table to my current database. then i...
|
by: Dom Boyce |
last post by:
Hi
First up, I am using MS Access 2002.
I have a database which records analyst rating changes for a list of
companies on a daily basis. Unfortunately, the database has been set
up (by my...
|
by: Mike Dole |
last post by:
I might have taken a wrong turn trying to do an update on a database
the way I did but maybe somebody can help me out cause I'm stuck..
I have to update 12 tables in a database in a client...
|
by: Aaron |
last post by:
Hello fellow programmers,
I am trying to run an append/update query from code, a command button
on a form initiates the queries.
the format i am using is;
...
|
by: dd_bdlm |
last post by:
Hi all
I have a database that stores customer records and their associated
insurance details. I need to be able to archive any changes made to
that record. Currently the user selects 'record...
|
by: baonks |
last post by:
hello all
here is my problem:
I have 2 table
1:
K_POS SALDO_A_D SALDO_A_K
11100 105 5
11200 5 105
|
by: MN |
last post by:
I have to import a tab-delimited text file daily into Access through a
macro. All of the data needs to be added to an existing table. Some of
the data already exists but may be updated by the...
|
by: Dixie |
last post by:
I have asked this question before, but I could not get the suggested
solution work. So I will give more details this time.
I have an append query that adds several hundred records to a table...
|
by: ARC |
last post by:
Hello all,
So I'm knee deep in this import utility program, and am coming up with all
sorts of "gotcha's!".
1st off. On a "Find Duplicates Query", does anyone have a good solution for...
|
by: dougmeece |
last post by:
Morning Everyone...
I have a table that needs to be append to and also updated. All the fields in the table are populated with data from the text boxes and combo boxes on a form. The Date...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
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: 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:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |