Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 .dat file conversion

Author  Topic 

whitefire
Starting Member

1 Post

Posted - 2013-07-01 : 10:26:07
Hello,

I am completely new to SQL and I need a bit of help:
I want to manipulate data from a .dat file. say the file name is "catalog.dat" and I want to create another one named "target.dat" which will contain the same data than "catalog.dat" except somewhat modified. question:

- how do I 'convert' the "catalog.dat" file into an SQL workable database?
- once this database created and modified, how do I insert the output back into the "target.dat" file?

Thanks in advance...

James K
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2013-07-01 : 10:37:41
quote:
Originally posted by whitefire

Hello,

I am completely new to SQL and I need a bit of help:
I want to manipulate data from a .dat file. say the file name is "catalog.dat" and I want to create another one named "target.dat" which will contain the same data than "catalog.dat" except somewhat modified. question:

- how do I 'convert' the "catalog.dat" file into an SQL workable database?
- once this database created and modified, how do I insert the output back into the "target.dat" file?

Thanks in advance...

It depends on what is in the catalog.dat file. Assuming it is tabular data, one possibility (and perhaps the easier route) is to use Excel or a text editor such as Notepad++ to do the changes you need.

If you must import into SQL, do the updates, and export to a new file, you will need to

1. create an empty database (or use an existing one),
2. import the data into the database (using something like SSIS - look up "Import/Export Wizard"),
3. write queries to modify the data, and
4. then again use Import/Export Wizard to export the data to a destination file.
Go to Top of Page
   

- Advertisement -