开发者

Are there any tools to dynamically generate flat files from SQL objects?

开发者 https://www.devze.com 2022-12-30 09:51 出处:网络
I\'m looking for a tool or component that generates flat files given a SQL Server\'s query result (from a stored procedure or a SELECT * over a table or view). This will be a batch process which runs

I'm looking for a tool or component that generates flat files given a SQL Server's query result (from a stored procedure or a SELECT * over a table or view). This will be a batch process which runs every day, and every day a new file is created.

I could use SQL Server Integration Services (DTS), but I have a mandatory requirement: the output of the file need to be dynamic. If a new column is added in my query result, the file must have this new column too, without having to modify my SSIS package. If a column is removed, then the flat file no longer will have it. I’ve tried to do this with SSIS, but when I create a new package I need to specify the number of columns. Another requirement is configuring the format of the output, depending on the data type of the column. If it’s a datetime, the format needs to be YYYY-MM-DD. If it’s a float, then I need to use 2 decimal digits, and so on.

Does anyone know a t开发者_StackOverflow中文版ool that does this job?

Thanks


I don't know of a tool that will do this, but it would be pretty simple to implement a custom application that uses a DataReader to get the output and simply dumps it to a flat file.

0

精彩评论

暂无评论...
验证码 换一张
取 消