Solved

How to create a simple SQL table from a txt file

Posted on 2011-02-13
4
290 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
4 Comments
 
LVL 26

Expert Comment

by:tigin44
Comment Utility
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
Comment Utility
Here is a sample of a txt file I need to create an sql table for.
OCENY.txt
0
 
LVL 32

Accepted Solution

by:
ewangoya earned 500 total points
Comment Utility
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 40

Expert Comment

by:Sharath
Comment Utility
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Audit has been really one of the more interesting, most useful, yet difficult to maintain topics in the history of SQL Server. In earlier versions of SQL people had very few options for auditing in SQL Server. It typically meant using SQL Trace …
Long way back, we had to take help from third party tools in order to encrypt and decrypt data.  Gradually Microsoft understood the need for this feature and started to implement it by building functionality into SQL Server. Finally, with SQL 2008, …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

728 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now