Solved

Please Help convert Excel File to MS-SQL table

Posted on 2008-10-22
4
201 Views
Last Modified: 2011-10-19
Hi Everyone-

I would like to port this file to a table is SQL server,  I have created the database for the file and have used various tools but with no success.

Could someone please direct me on how to get this converted and into SQL server.  Is it possible to have the SQL code for the creation during the conversion.  So I can modify the table constraints and table values.

I was using Full convert enterprise, but don't have the full version for the SQL code.


KudlerCOA.xls
0
Comment
Question by:salberta
  • 2
  • 2
4 Comments
 
LVL 8

Accepted Solution

by:
mikainz earned 500 total points
Comment Utility
Why don't you use the import/export wizard built in SQL Server 2005?
see http://www.databasejournal.com/features/mssql/article.php/3580216 for a sample

0
 

Author Comment

by:salberta
Comment Utility
Hi Mikainz-
 
I have used this, the values are imported but the columns are being entered as null by default.  When modify the values from null to NOT NULL and trying to set a primary key I get the following errot
''CHART OF ACCOUNTS$'' table
- Unable to modify table.  
Cannot insert the value NULL into column 'Description', table 'TEAMCHARTACCOUNTS.dbo.Tmp_'CHART OF ACCOUNTS$''; column does not allow nulls. INSERT fails.
The statement has been terminated.
0
 
LVL 8

Expert Comment

by:mikainz
Comment Utility
You can only set to not null if all existing rows have contnent in that field.
You can only build a primary key if each content in that field is unique.
Please check this against your data.
Hth
 
0
 

Author Comment

by:salberta
Comment Utility
The table has 350 rows from the import that are trailing and are null.   A select and delete is erroring out.
 
A Problem occured attmepting to delete row 1429
The row values updated or deleted either do not make the row unique or they alter multiple rows (315)
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Join & Write a Comment

'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now