daily pastebin goal
38%
SHARE
TWEET

Untitled

a guest Jan 24th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CREATE TABLE mckdev.ogd_xml_table (
  2.   id        NUMBER(10),
  3.   xml       XMLTYPE,
  4.   "IN_CON_LOG" NUMBER(1,0),
  5.   "ZIS_EVENT" VARCHAR2(35 BYTE),
  6. );
  7.  
  8. ALTER TABLE mckdev.ogd_xml_table ADD (
  9.   CONSTRAINT ogd_xml_table_pk PRIMARY KEY (id)
  10. );
  11.  
  12. CREATE SEQUENCE mckdev.ogd_xml_table_seq;
  13.    
  14. load data
  15. infile ''
  16. append
  17. into table ogd_xml_table
  18. fields
  19. (  
  20.     filename FILLER CHAR(100),
  21.     xml lobfile( filename) terminated by eof
  22. )
  23.    
  24. $dataFiles = @(
  25.     "filelist21.dat"
  26.     "filelist22.dat",
  27.     "filelist23.dat",
  28.     "filelist25.dat",
  29.     "filelist121a.dat",
  30.     "filelist121b.dat",
  31.     "filelist122a.dat",
  32.     "filelist122b.dat"
  33. )
  34. $ctlFile = "$PSScriptRootload_data.ctl"
  35.  
  36. foreach ($f in $dataFiles) {
  37.     (Get-Content $ctlFile) -Replace "infile '[^']*'", "infile '$($PSScriptRoot)$($f)'" | Out-File $ctlFile -Encoding ASCII
  38.     sqlldr mckdev@$SecretDatabase/$SecretPassword control=$PSScriptRootload_data.ctl
  39. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top