Loading dynamic files from a table that has header and detail records
all, i have table, say, footest has 2 columns, 1 column (say, message) has header , detail records stored , 2nd column in "status". how table structure looks like: message status 1|hdr|abc|121|qwasdf 0 2|dtl|abc|121|qwfggjg 0 3|dtl|abc|121|cvmcbnv 0 4|hdr|def|134|dghmcbq 0 5|dtl|def|134|dghmcbq 0 6|hdr|abc|173|mnxccvc 0 7|dtl|abc|173|ndsjkdnx 0 i want dynamically generate files table. so, example, when first loop runs, file named, "abc_12142014_6:10:23 (filename_date_time)" generated , status column should updated "1" , file have 3 records i.e.: 1|hdr|abc|121|qwasdf 2|dtl|abc|121|qwfggjg 3|dtl|abc|121|cvmcbnv similarly, once, "def" file has been loaded, status column should updated 1 , file name should have date , time (including milliseconds). also, though filename same last 2 records (i.e. abc), want 1 diffe