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
 SQL to txt

Author  Topic 

jcb267
Constraint Violating Yak Guru

291 Posts

Posted - 2013-12-13 : 13:54:12
Hi -

I generated a large file using sql 2008R2. Now I need to make that available in Access for others in my department to use. I would like to export it as a txt file so that I may import it to Access but am not sure how. My system just seems to make an rpt file (if I put the results to a file), can this be used in Access as is?

Can anyone help me to do this

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2013-12-13 : 14:08:08
From the menu select (Query | Query Options)
Then set the Text Results to whatever format you want.
Then from the menu select (Query | Results To | File)

Then run your query. It will prompt you for a file name at that point.

Be One with the Optimizer
TG
Go to Top of Page

jcb267
Constraint Violating Yak Guru

291 Posts

Posted - 2013-12-13 : 14:14:08
I tried this but it is saved as an .rpt file? Can I just change the extension to .txt?

Thank you!!
Go to Top of Page

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2013-12-13 : 15:29:06
of course. When you specify the file name to save you can give it whatever extension you want.

EDIT:
change the File Save dialog drop down from *.rpt to *.*

Be One with the Optimizer
TG
Go to Top of Page
   

- Advertisement -