473,503 Members | 1,648 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problems importing data into sql server

I have a table for authors (for our bookstore) that has several fields
(firstname, lastname, etc.) and an author_id field (set as identity)

I'm trying to import a spreadsheet into this table, but keep getting
error messages that say I can't import data into the author_id field
(the identityf field).

Can someone suggest what I can do to overcome this?

Thanks,

Bill
Jul 20 '05 #1
2 2097
1) Import the data into a new flat table (ie: without indexes).
2) Run a report on the key field (identityf) -- there must be no duplicates.

select indentityf, count(*)
from newtable
group by identityf
having count(*)>1

should yield no results.

3) Correct the spreadsheet.
4) reimport the spreadsheet.

"Bill" <bi***********@gospellight.com> wrote in message
news:8d*************************@posting.google.co m...
I have a table for authors (for our bookstore) that has several fields
(firstname, lastname, etc.) and an author_id field (set as identity)

I'm trying to import a spreadsheet into this table, but keep getting
error messages that say I can't import data into the author_id field
(the identityf field).

Can someone suggest what I can do to overcome this?

Thanks,

Bill

Jul 20 '05 #2

"Bill" <bi***********@gospellight.com> wrote in message
news:8d*************************@posting.google.co m...
I have a table for authors (for our bookstore) that has several fields
(firstname, lastname, etc.) and an author_id field (set as identity)

I'm trying to import a spreadsheet into this table, but keep getting
error messages that say I can't import data into the author_id field
(the identityf field).

Can someone suggest what I can do to overcome this?

<snip>

Use the DTS. On the screen that allows you to select the tables, click the
Transform button. On this screem, you'll see 'Allow Identity Insert'.

BV
www.iheartmypond.com
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
4878
by: me | last post by:
I'm also having problems getting the bulk insert to work. I don't know anything about it except what I've gleened from BOL but I'm not seeming to get anywhere...Hopefully there is some little (or...
0
1368
by: Daryl Zavier | last post by:
Hi Gurus, Please forgive me if my question is dumb cause this is my first web application I've done. Currently in my web application there is a button to click which will fire off a DTS event...
3
5064
by: Wade G. Pemberton | last post by:
Help!: I use javascript to format repetitive data from a web page input FORM into a long string , and save it as lines of comma delimited data in a text file on a Unix server. The text...
0
344
by: Daryl Zavier | last post by:
Hi Gurus, Please forgive me if my question is dumb cause this is my first web application I've done. Currently in my web application there is a button to click which will fire off a DTS event...
3
2989
by: scoots987 | last post by:
What do others do if you need to import excel files into SQL Server? My main problems are 1) zipcode formatting issues. If the column is a mix of zip and zip+4, I have problems retrieving all...
0
7198
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7072
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...
0
7449
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
5570
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
4666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1498
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
373
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.