![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
Hello, Anyone know how to export a SQL result set to CSV with SQL Server 7? We have a series of queries which run and produce unique result sets based on user's criteria. We then want to export these result sets to a CSV file on the server. Thank you, Mike |
#4
| |||
| |||
|
|
-----Original Message----- Look at BCP Look at osql with the -q and -o arguments Allan Mitchell (Microsoft SQL Server MVP) MCSE,MCDBA www.SQLDTS.com I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org . |
#5
| |||
| |||
|
|
-----Original Message----- At a high level, export the results of a sql statement to a CSV file can be done pretty easily. Drop a SQL connection on the designer and set the properties. Drop a text file destination on the designer and set those properties. Then just add a transform data task between the two, enter your sql statement, set the destination and transformations and that's about it. -Sue On Fri, 12 Sep 2003 11:49:19 -0700, "Mike T." m.tamburro (AT) technologue (DOT) com> wrote: Hello, Anyone know how to export a SQL result set to CSV with SQL Server 7? We have a series of queries which run and produce unique result sets based on user's criteria. We then want to export these result sets to a CSV file on the server. Thank you, Mike . |
#6
| |||
| |||
|
|
Thank you, but we are looking for an automated process. Our queries are built on-the-fly, so we don't have a pre- determined SQL statement. Of course, the results vary, too. Can the method you recommended be automated under these conditions? -----Original Message----- At a high level, export the results of a sql statement to a CSV file can be done pretty easily. Drop a SQL connection on the designer and set the properties. Drop a text file destination on the designer and set those properties. Then just add a transform data task between the two, enter your sql statement, set the destination and transformations and that's about it. -Sue On Fri, 12 Sep 2003 11:49:19 -0700, "Mike T." m.tamburro (AT) technologue (DOT) com> wrote: Hello, Anyone know how to export a SQL result set to CSV with SQL Server 7? We have a series of queries which run and produce unique result sets based on user's criteria. We then want to export these result sets to a CSV file on the server. Thank you, Mike . |
#7
| |||
| |||
|
|
-----Original Message----- I read your response to Allan as well and if you are using client software for the users to run ad hoc queries, why not tackle it from that end? Exporting the results from there? But I'm a little unclear as to how this is architected...e.g. I don't know if this is off the shelf software, if it's written in house, if you want to write a new front end to achieve what you have posted about, etc. Some of the directions would likely depend upon issues, architecture of the software package being used. -Sue On Mon, 15 Sep 2003 09:31:55 -0700, "Mike T." m.tamburro (AT) technologue (DOT) com> wrote: Thank you, but we are looking for an automated process. Our queries are built on-the-fly, so we don't have a pre- determined SQL statement. Of course, the results vary, too. Can the method you recommended be automated under these conditions? -----Original Message----- At a high level, export the results of a sql statement to a CSV file can be done pretty easily. Drop a SQL connection on the designer and set the properties. Drop a text file destination on the designer and set those properties. Then just add a transform data task between the two, enter your sql statement, set the destination and transformations and that's about it. -Sue On Fri, 12 Sep 2003 11:49:19 -0700, "Mike T." m.tamburro (AT) technologue (DOT) com> wrote: Hello, Anyone know how to export a SQL result set to CSV with SQL Server 7? We have a series of queries which run and produce unique result sets based on user's criteria. We then want to export these result sets to a CSV file on the server. Thank you, Mike . . |
![]() |
| Thread Tools | |
| Display Modes | |
| |