Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Sunday, 29 November 2015

How to create flat files from SQL Server table


Flat Files in SQL Server

What are flat files and what did they give?
Flat files are data files that 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. Do not 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 imagination hunt to read 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 imagination hunt to read 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 is your flat file. Ready to use.




For any query, comment us below.



Related Questions:


Q-1 What are the features of flat files?
Ans. Flat files come 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 imagination hunt to read latest blogs.


Keep learning and sharing...

No comments:

Post a comment

Featured post

Think that makes you rich and richer

 Napolean said: “You can think and grow rich, but if you can be brought up like most people with work and you won't starve, this wil...