|
i have file/table in my database with the following format i want to achieve the output like this first of all a file should be created as (account_number).dex so foe example :- file created sam.dex with entries like 2 nd file created:- jaz.dex with entries 3rd file created:- mike.dex with entries How to achieve this output? thanks in advance!!!
(comments are locked)
|
|
Are you looking for this to be dynamic to be able to include any new account numbers that come in or is your data set going to remain static? If static a simple DTS, SSIS, or even TSQL statements using SQLCMD could pipe the results out to file. What version of SQL are you running and what are your full requirements? The number of entries in my source file will be dynamic ..sometimes it may be 10 records and sometime it can reach 100 also. i m using sql server 2005. Can u tell me what should be the approach if i plan to use ssis?
Apr 20 '11 at 01:17 PM
AbhiD
You could use a foreach loop and get the distinct account number, then pass each account number to a stored procedure or query to get the individual result set per account number. Those results could be written to individual files and use the account number in the output file name.
Apr 20 '11 at 01:21 PM
Tim
(comments are locked)
|

