export a complex query into a file
Posted on 2002-06-28
I have a long and complex query that needs to be exported to a data file. The problem is that the user needs to supply 1 Parameter to the query for it to process the required data.
When I try to bcp it from within a Stored Procedure in which the Parameter is passed, I get an error that the query is too long.
Any ideas of another way to supply the Parameter, run the query, and then export the data?