Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to create a simple SQL table from a txt file

Posted on 2011-02-13
4
Medium Priority
?
305 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

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

636 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