?
Solved

How to create a simple SQL table from a txt file

Posted on 2011-02-13
4
Medium Priority
?
299 Views
Last Modified: 2012-05-11
I am a beginner programmer.
I need to create an sql table from a text file.
I need to have 6 columns and since the file is large, I don't know how many rows I need.

I need a very step by step tutorial.
0
Comment
Question by:pgmerLA
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 26

Expert Comment

by:tigin44
ID: 34884072
do your text file has any structure on the rows... if so you can use the import/export wizard to create your table. By the way you dont need to know the row number of your table. you should be care just the columns and their data types. I f you can provide a sample data we may guide you more
0
 

Author Comment

by:pgmerLA
ID: 34884277
Here is a sample of a txt file I need to create an sql table for.
OCENY.txt
0
 
LVL 32

Accepted Solution

by:
Ephraim Wangoya earned 2000 total points
ID: 34884368
First you need to create a databse in SQL Server
Open SQL Server  Management Studio (SSMS)
Right click on Databases and select New Database

Enter the name of your database and click OK
Now you have a new database, you have to create the table

The easiest way for you is to use the Import\Export wizard
Right click on the database you just created, select
Tasks-> Import Data...

Follow the wizard
For your Data source, select Flat File from the drop down list, then browse for the file and select it
Follow through the wizard and your table will be created and populated.


New-Database.png
0
 
LVL 41

Expert Comment

by:Sharath
ID: 34885676
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After restoring a Microsoft SQL Server database (.bak) from backup or attaching .mdf file, you may run into "Error '15023' User or role already exists in the current database" when you use the "User Mapping" SQL Management Studio functionality to al…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

777 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