473,396 Members | 2,154 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Uploading Bulk Data into an existing Table

17 16bit
I have problem with my append query

I have a query Name NewData with exist in a temporary and i have created an Append query name Appenddata. When i run this query i would like the data from temporary table to be inserted into dbo_Master table which reside in MS SQL server. However when i run the appenddata query in is appending zero data into the master table. The master table has several relationships with other tables - need some help on this.
Jun 6 '18 #1
7 1227
PhilOfWalton
1,430 Expert 1GB
I feel sure there was an error message generated of why the data was not appended.
Have you bothered to read it, and if so, what did it say?

Phil
Jun 6 '18 #2
Rabbit
12,516 Expert Mod 8TB
We can't actually tell you what's wrong with the query when you haven't given us the query. You need to post the SQL at least.
Jun 6 '18 #3
Adict
17 16bit
Below is my query
Expand|Select|Wrap|Line Numbers
  1. INSERT INTO dbo_TblMaster 
  2. ( HRAPSNo, AlphaCode, FirstName, LastName, Branch, 
  3. Dept, Loc, CostCtr, DateStarted, EndDate, Status, 
  4. PayRate, AnnualSalary, BirthDate, Sex, 
  5. MaritalStatus, Dep, PositionNumber, PositionTitle, 
  6. Netuser, DateCreated, DateModified, [Counter] )
  7. SELECT NewData.HRAPSNo, NewData.AlphaCode, 
  8. NewData.FirstName, NewData.LastName, NewData.Branch, NewData.Dept, NewData.Loc, NewData.CostCtr, NewData.DateStarted, NewData.EndDate, NewData.Status, NewData.PayRate, NewData.AnnualSalary, 
  9. NewData.BirthDate, NewData.Sex, 
  10. NewData.MaritalStatus, NewData.Dep, 
  11. NewData.PositionNumber, NewData.PositionTitle, 
  12. NewData.Netuser, NewData.DateCreated, 
  13. NewData.DateModified, NewData.Counter
  14. FROM NewData INNER JOIN dbo_TblMaster 
  15. ON NewData.HRAPSNo = dbo_TblMaster.HRAPSNo;
Jun 6 '18 #4
Rabbit
12,516 Expert Mod 8TB
You should use code tags when posting code to make it easier to read.

But I see the problem in your query. You're joining to table you're trying to insert into. If you're trying to insert new data, then trying to join to the master table is going to return 0 rows.
Jun 7 '18 #5
Adict
17 16bit
Thank you Rabbit

I've successfully managed to do remove the inner join and the rows has been picked up when i ran the column, however, I am receiving another error, file conversion error. I will have a workaround with the datatype i guess. Thank you for the assistance.
Jun 7 '18 #6
Rabbit
12,516 Expert Mod 8TB
No problem, feel free to create a new thread if you have another question.
Jun 7 '18 #7
NeoPa
32,556 Expert Mod 16PB
Sometimes linking to the destination table does make sense. Generally when you're trying to add only those records that you know don't exist there already.

In such a case you might use an OUTER JOIN (LEFT JOIN or RIGHT JOIN in Jet/ACE SQL) and include a WHERE clause to include only those records from the destination table where the values are NULL.
Jun 9 '18 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: dev | last post by:
how create a temp table as a copy of a existing table and then update1 field and insert the hole temp table back in the existing table? please any help? if i have 10 fields in 1 record and...
6
by: Tuong Do | last post by:
Hi, I am going to insert a large amount (200,000 records) of data into a table Is there a way that I can temporarily disable the log? so that the insertion run faster Thanks in advance
3
by: Raj | last post by:
Hi, I am trying to add some more information to the table which already has a lot a data (like 2-3000 records). The new information may be adding 2-3 new columns worth. Now my questions are:...
1
by: deko | last post by:
DoCmd.CopyObject copies data, but I only need structure. I'm trying to clone several tables in my Access 2003 mdb. The goal is to link to a series of Excel spreadsheets and then run various...
4
by: Bri | last post by:
Hi, First let me explain the process I have going on, then I'll address the problems I'm having: 1) Insert records in a temp table using a query 2) Using a query that joins the temp table with...
3
by: Carlos | last post by:
Hello Forum, I would appreciate it if you could recommend settings to use auto-vacuum in my version 7.4 database. I am uploading several thousands records in the database at a rate of ~1 second...
5
priyan
by: priyan | last post by:
hi all, I am newbie to sql server 2005. I want to import a bulk data from an excel file to the table..........pls suggest me a solution on how to do this................pls reply me as...
10
by: timleonard | last post by:
I am trying to update some existing database tables by inserting some new fields in a set order within the existing table. The issue I am having is it inserts the new field at the existing position...
3
by: sg2808 | last post by:
When I am appending new data to an empty existing field in an existing table, the data is being added after the last record (row) in the table. I would like to place the data in a "side-by-side"...
0
by: sreedharmcts | last post by:
I have Bulk data ,just want to insert that data from Gridview to Database table how it possible? I have done this way is it correct? protected void btn_insert_Click(object sender, EventArgs e) ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
jinu1996
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...
0
tracyyun
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.