hi using external tables
692864Apr 21 2009 — edited Apr 21 2009hi all
need your help on this as i have to submit this by end of the day :(
this is regarding external tables........
i get few files daily on my server ...and i need to use external tables and delete some records on the basis of the records in the external table...... how to do it ?
this is what i got ......... plz see below
VeriSign File Layout
Record Example 13175900288,Deactivation,2007-09-01T13:35Z,5
Record Definition [MDN],[Action name],[Timestamp],[Carrier ID]
MDN Bytes 1-11 (Phone Number)
Comma Byte 12
Action Name Bytes 13-24
Comma Byte 25
TimeStamp Bytes 26-42
Comma Byte 43
Carrier ID Variable Byte Length, Carrier ID is 1 to 3 bytes in length
Carrier ID = Bytes 44 or Bytes 44-45 or Bytes 44-46
Carrier File Name Carrier ID Record Length
--------------------------------------------------------------------------------------------------------------------------
Boost Boost_Deactivation_<yyyymmdd>.csv 128 47
Centennial Centennial_Deactivation_<yyyymmdd>.csv 53 46
Cingular Cingular_Deactivation_<yyyymmdd>.csv 3 45
Dobson Dobson_Deactivation_<yyyymmdd>.csv 41 46
Sprint Sprint_Deactivation_<yyyymmdd>.csv 5 45
T Mobile T Mobile_Deactivation_<yyyymmdd>.csv 2 45
Verizon Verizon_Deactivation_<yyyymmdd>.csv 4 45
i need to create a stored procedure......... that should access the data in these files in a external table...........
the script should also put these files in a backup location . please help me
i have fair idea of external tables, directory creation etc but how to work on these many files ....? how to rename these files to a common name?
regards
raj