HOW TO CREATE FLAT FILES FROM SQL SERVER TABLE

Today in Engineer's World, we are discussing a very important topic of SQL SERVER - Flat Files in very easy way. Posted By- +Manish Kumar Gautam +LIVE VIAR  +ASP.NET SOLUTIONS

Click imaginationhunt.blogspot to see latest Blogs

Previous Post - STRING SEARCH USING REGEX METHOD IN C#

Flat Files in SQL SERVER

What are flat files and what did they give?
Flat files are data files which give the table data. (Only Table Data Not Schema).

How to make flat files in SQL Server?
Follow these simple steps:

1. Right click the database for which you want to create the flat file. Select Tasks -> Export Data...

2. SQL Server Import and Export Wizard window appear. Click on next button.

3. A window appears in which you have to choose the Data Source and its respective information. 
  • By default- the Data Source is selected as SQL Server Native Client 10.0 or anything. Don’t change.
  • Select the server name from the drop-down list or you can write the server name by yourself if the respective server name is not there.
  • Now, select one of the Authentication modes - Windows Authentication or SQL Server Authentication.
  • Re-check the database name for which you want to create the flat file. And click next Button.

4. A window appears in which you have to choose the Destination and its respective information.
  •          Select the Destination to Flat File Destination.

Click imaginationhunt.blogspot to see latest Blogs

5. Click the browse button. Here, you have to write a file name (For example- I write my file name as ‘a’ and its extension is .txt (Text File)). Click Open Button.


6. Click Next Button.


7. A Window appears in which you have to select on "Copy data from one or more tables or views". Now, click Next button.


8. Select the table for which you want to create the flat file. And proceed by clicking the next button.


9. Check the checkbox with run immediately option and click next Button.


10. Click Finish.


Click imaginationhunt.blogspot to see latest Blogs

11. File Execution successful. Your file is created successfully.


12. Open the destination folder in which you have created the file.


13. Here’s your flat file. Ready to use.

Related Questions:

#newtoprgm try first program

Q-1 What are the features of flat files?
Ans- Flat files comes with various features:
A) Easy to understand
B) Easy to set up
C) Much lighter in file size.
D) The column data are separated by a comma.

Q-2 Why do we need flat files?
Ans- Flat files are very light as it is created in a text file. And thus, useful and helpful in data storage and data transfer.

Click imaginationhunt.blogspot to see latest Blogs


Keep learning and sharing...

Comments

Popular posts from this blog

SSC CGL 2016 Tier-1 Marks / Result

DATA TYPES IN C#

Pattern printing program

IS STRING MUTABLE OR IMMUTABLE IN .NET?

Top Mutual Funds

SSC CGL 2017 TIER 2 RESULT OUT

JUST IN TIME (JIT)

Can we have multiple Main methods in one class

TOP 15 VISUAL STUDIO SHORTCUT KEYS

Top 10 Interview Tips and Questions