Solved

How to create a simple SQL table from a txt file

Posted on 2011-02-13
4
296 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 500 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

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.

Question has a verified solution.

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

     When we have to pass multiple rows of data to SQL Server, the developers either have to send one row at a time or come up with other workarounds to meet requirements like using XML to pass data, which is complex and tedious to use. There is a …
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…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

687 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