Re: exporting to CSV



Katie wrote:
How would that work if i want the user to enter values in a form and
then wen they click submit run a stored proc using the values they
entered as params and output for them a csv file.

You can write a custom DTS package that is called from a stored proc. Parameters to that stored proc will be the parameters you want to query on. The stored proc will set global DTS variables based on these parameters and DTS will use these variables to filter out the unwanted records. You'll probably want a good book on DTS as this sort of thing can be a bear for the uninitiated. SQL Server 2000 DTS Step By Step by Carl Rabeler worked for me!

Cheers,
Brian


--
===================================================================

Brian Peasland
oracle_dba@xxxxxxxxxxxxxxxxxxx
http://www.peasland.net

Remove the "nospam." from the email address to email me.


"I can give it to you cheap, quick, and good.
Now pick two out of the three" - Unknown
.



Relevant Pages

  • Re: DTS advice
    ... I was focusing on "not using DTS" to do the data transfer ... You are right - the stored proc is to be scheduled ... > next you say use DTS to do the scheduling ...
    (microsoft.public.sqlserver.dts)
  • Re: Insert Title into text file during transformation task in DTS
    ... Thank you very much for all your postings. ... My first row in a text file has ... I already tried to include in stored proc additional column ... DTS on scheduler automatically. ...
    (microsoft.public.sqlserver.dts)
  • Re: dts fails to execute
    ... So long as the metadata exposed by the stored proc is the same then ... Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) ... www.SQLDTS.com - The site for all your DTS needs. ... procedure which was used in the dts pkg I created earlier. ...
    (microsoft.public.sqlserver.dts)
  • Re: How to copy all user defined tables to flat file
    ... Create a DTS package that accepts global variables for the table name & ... Drive the stored proc with a cursor over the information_schema views ... how do you construct a query that states return all rows from ...
    (microsoft.public.sqlserver.server)
  • Re: Can I do this in SQL Analyzer or with a dts package?
    ... It can be done in a SQL stored proc but it will get kind of ugly. ... Item_number, qty, price, description ... My ultimate goal is to export this to a text or csv file. ...
    (comp.databases.ms-sqlserver)