Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 IMPORTING EXCEL DATA TO AN ALREADY EXISTING DB

Author  Topic 

sonia_newbie
Starting Member

17 Posts

Posted - 2012-11-01 : 10:45:39
Hi All,
I have a query related to sql.

I have an already existing database.Now I have to add another table to the database but i don't have a code for importing the data.Is it possible for me to import a data from an excel sheet to a table to a db without a code.
Please let me know what should I do.
Should i create a new table name with columns?
How should i import the excel sheet data?

I work on unix.

sonia_newbie
Starting Member

17 Posts

Posted - 2012-11-01 : 11:01:58
Just to add on ..
my excel sheet looks like this

name start_location end_location details
milguel 2345 5678 parathesis
vanise 3433 4544 quantified.
............

i need to import this excelsheet data to my db.(only the columns : name and details to my db.)
I will have to create a table named details in my database with 2 columns namely : name and details. Am I right?

can i create a table and column in my db without mentioning the datatype ?

Also how can i import those two columns from the excelsheet to my table without a code? Do i need some tool or software?
Thanks in advance.Sorry fro multiple posts!
Go to Top of Page

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2012-11-01 : 11:19:29
You should be able to use Import/Export Wizard. Right click on the database name in object explorer in SQL Sever Management Studio, select Tasks->Import Data and follow through the wizard. The wizard will give you options to pick and choose the columns you want to import, create a new table or use an existing table, decide whether to wipe out the existing data in the table or not etc.
Go to Top of Page

clinton_eg
Yak Posting Veteran

60 Posts

Posted - 2012-11-01 : 12:39:26
Hello Sonia

You could try creating a SQL Server Integration Services package to transfer the required Excel data into the SQL database table.

Ewan Gilby
Go to Top of Page

sonia_newbie
Starting Member

17 Posts

Posted - 2012-11-04 : 21:10:45
Thanks all!!!
It worked :)
Go to Top of Page
   

- Advertisement -