KenyKeny
KenyKeny

Reputation: 151

SQL Server : how to import Excel to create a table?

I am really new to database management. What I expect from this question is a clear guideline on how to achieve this and how to set up SQL Server.

The Excel file with three columns is like this:

ItemCode    Description Price
a01         apple       10
a02         orange      20
a03         pineapple   10
a04         fire        30
a05         tim         35
a06         keny        25
a07         peter       20
a08         tom         21
a09         mouse       23
a10         keyboard    45

I am using SQL Server 2008 Express edition. But I skip some things during installation like "Failed PerfMonCounterNotCorruptedCheck". Any way I completed the installation.

I go to import/export into SQL Server, I choose source from Excel and set the destination server like "SQL Server Native Client" and server to CNG9130xxxx. It shows the records from Excel is imported to form a table in database to from table successfully. But, after I hit close, I just can not locate the newly-created database file and where should I type SQL command to extract some data list says the list of Price<21

Any ideas?

Or should I go for some later version like SQL Server 2014 Express?

Thanks in advance

Upvotes: 0

Views: 916

Answers (2)

Rajan Goswami
Rajan Goswami

Reputation: 769

If you are using SQL Server Management Studio, then follow these Steps:

  1. From the object explorer of SQl Server Mgmt. Studio, right click on your database name.
  2. Select Tasks > Import Data
  3. In SQL Server Import and Export Wizard, Select Microsofrt Excel.Next
  4. Set Destination as SQL Server Native Client 11.0.
  5. Enter your Server Name,Authentication,Database. Next
  6. Select Copy data from one or more table or views. Next
  7. Select the sheet name of your excel and modify the table name from right side column. Next.
  8. Excecute immediately.

Your new table is ready to use.

Upvotes: 1

wiretext
wiretext

Reputation: 3342

right click on your DB then click on Import and follow below link https://www.mssqltips.com/sqlservertutorial/203/simple-way-to-import-data-into-sql-server/

Upvotes: 1

Related Questions