daily pastebin goal
42%
SHARE
TWEET

Untitled

a guest Oct 15th, 2018 58 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1. DROP TABLE IF EXISTS soc;
  2. DROP TABLE IF EXISTS pt;
  3. DROP TABLE IF EXISTS llt;
  4.  
  5. CREATE TABLE soc (
  6.     soc_code BIGINT constraint ix1_soc01 PRIMARY KEY,
  7.     soc_name varchar(100) constraint ix1_soc02 NOT NULL,
  8.     soc_abbrev varchar(5) NOT NULL,
  9.     soc_whoart_code varchar(7),
  10.     soc_harts_code BIGINT,
  11.     soc_costart_sym varchar(21),
  12.     soc_icd9_code varchar(8),
  13.     soc_icd9cm_code varchar(8),
  14.     soc_icd10_code varchar(8),
  15.     soc_jart_code varchar(8),
  16.     x varchar(1)
  17. );
  18.  
  19. CREATE TABLE pt (
  20.     pt_code BIGINT constraint ix1_pt01 PRIMARY KEY,
  21.     pt_name varchar(100) constraint ix1_pt02 NOT NULL,
  22.     null_field varchar(1),
  23.     pt_soc_code BIGINT,
  24.     pt_whoart_code varchar(7),
  25.     pt_harts_code BIGINT,
  26.     pt_costart_sym varchar(21),
  27.     pt_icd9_code varchar(8),
  28.     pt_icd9cm_code varchar(8),
  29.     pt_icd10_code varchar(8),
  30.     pt_jart_code varchar(6),
  31.     x varchar(1)
  32. );
  33.  
  34. CREATE TABLE llt (
  35.     llt_code BIGINT constraint ix1_pt_llt01 PRIMARY KEY,
  36.     llt_name varchar(100) constraint ix1_pt_llt02 NOT NULL,
  37.     pt_code BIGINT,
  38.     llt_whoart_code varchar(7),
  39.     llt_harts_code BIGINT,
  40.     llt_costart_sym varchar(21),
  41.     llt_icd9_code varchar(8),
  42.     llt_icd9cm_code varchar(8),
  43.     llt_icd10_code varchar(8),
  44.     llt_currency varchar(1),
  45.     llt_jart_code varchar(6),
  46.     x varchar(1)
  47. );
  48.  
  49. COPY soc
  50. FROM '/Users/neil/Documents/MMM/MedDRA_15_0_English/MedAscii/soc.asc'
  51. WITH
  52.     DELIMITER AS '$'
  53.     NULL AS '';
  54.  
  55. COPY pt
  56. FROM '/Users/neil/Documents/MMM/MedDRA_15_0_English/MedAscii/pt.asc'
  57. WITH
  58.     DELIMITER AS '$'
  59.     NULL AS '';
  60.  
  61. COPY llt
  62. FROM '/Users/neil/Documents/MMM/MedDRA_15_0_English/MedAscii/llt.asc'
  63. WITH
  64.     DELIMITER AS '$'
  65.     NULL AS '';
  66.  
  67. ALTER TABLE soc DROP COLUMN x;
  68. ALTER TABLE pt DROP COLUMN x;
  69. ALTER TABLE llt DROP COLUMN x;
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