blob_id
stringlengths
40
40
language
stringclasses
1 value
repo_name
stringlengths
5
133
path
stringlengths
3
276
src_encoding
stringclasses
33 values
length_bytes
int64
23
9.61M
score
float64
2.52
5.28
int_score
int64
3
5
detected_licenses
listlengths
0
44
license_type
stringclasses
2 values
text
stringlengths
23
9.43M
download_success
bool
1 class
fd1089b3f9c1c7b6d844fd3be8875b70fe1026e8
SQL
AntonFagerberg/Kookies
/conf/evolutions/default/3.sql
UTF-8
230
2.875
3
[]
no_license
# --- !Ups CREATE TABLE unit( abbreviation VARCHAR(2) PRIMARY KEY, name VARCHAR(20) NOT NULL UNIQUE ); INSERT INTO `unit` (`abbreviation`, `name`) VALUES ('ml','milliliters'), ('g','grams'); # --- !Downs DROP TABLE unit;
true
359b0bac17c8c709a2e0a16ed94d51c7e2dc20cc
SQL
kluf/shop_rating_update
/www/schema/create.sql
UTF-8
3,361
3.75
4
[]
no_license
CREATE DATABASE IF NOT EXISTS shop_rating; USE shop_rating; CREATE TABLE IF NOT EXISTS `shops`( `id` INT NOT NULL AUTO_INCREMENT COMMENT 'shop id', `name` VARCHAR(30) NOT NULL COMMENT 'shop name', `siteUrl` VARCHAR(30) NOT NULL, `description` TEXT COMMENT 'some description', `logo` INT COMMENT 'foreign key to images table', PRIMARY KEY (`id`) )ENGINE=MyISAM DEFAULT CHARACTER SET `utf8` COLLATE utf8_general_ci, COMMENT 'stores shops data'; CREATE TABLE IF NOT EXISTS `commentType`( `id` INT NOT NULL AUTO_INCREMENT COMMENT 'commentType id', `name` VARCHAR(30) NOT NULL COMMENT 'type of comment', PRIMARY KEY (`id`) )ENGINE=MyISAM DEFAULT CHARACTER SET `utf8` COLLATE utf8_general_ci, COMMENT 'stores type of comments data, like positive, negative, etc.'; CREATE TABLE IF NOT EXISTS `operationType`( `id` INT NOT NULL AUTO_INCREMENT COMMENT 'operationType id', `name` VARCHAR(30) NOT NULL COMMENT 'type of operationType', PRIMARY KEY (`id`) )ENGINE=MyISAM DEFAULT CHARACTER SET `utf8` COLLATE utf8_general_ci, COMMENT 'stores type of operation, like buying, repairing, etc.'; CREATE TABLE IF NOT EXISTS `images`( `id` INT NOT NULL AUTO_INCREMENT COMMENT 'image id', `name` VARCHAR(30) NOT NULL COMMENT 'image name', `type` VARCHAR(30) NOT NULL COMMENT 'image type, like png, gif, etc.', `width` INT NOT NULL, `heihgt` INT NOT NULL, PRIMARY KEY (`id`) )ENGINE=MyISAM DEFAULT CHARACTER SET `utf8` COLLATE utf8_general_ci, COMMENT 'stores shops data'; CREATE TABLE IF NOT EXISTS `comments`( `id` INT NOT NULL AUTO_INCREMENT COMMENT 'image id', `dateComment` VARCHAR(30) NOT NULL COMMENT 'image name', `userName` VARCHAR(30) NOT NULL COMMENT 'image type, like png, gif, etc.', `description` TEXT NOT NULL, `lasts` VARCHAR(30) NOT NULL, `commentType` INT NOT NULL COMMENT 'foreign key to commentType table', `operationType` INT NOT NULL COMMENT 'foreign key to operationType table', `shopId` INT NOT NULL COMMENT 'foreign key to shops table', `rating` ENUM('1','2','3','4','5') NOT NULL DEFAULT '3', PRIMARY KEY (`id`) )ENGINE=MyISAM DEFAULT CHARACTER SET `utf8` COLLATE utf8_general_ci, COMMENT 'stores shops data'; CREATE TABLE users ( id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, username VARCHAR(50), password VARCHAR(50), role VARCHAR(20), created DATETIME DEFAULT NULL, modified DATETIME DEFAULT NULL )ENGINE=MyISAM DEFAULT CHARACTER SET `utf8` COLLATE utf8_bin, COMMENT 'stores shops data'; -- *** alternative table for users and groups *** -- CREATE TABLE users ( -- id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, -- username VARCHAR(50), -- password VARCHAR(50), -- role VARCHAR(20), -- created DATETIME DEFAULT NULL, -- modified DATETIME DEFAULT NULL -- )ENGINE=MyISAM -- DEFAULT CHARACTER SET `utf8` -- COLLATE utf8_bin, -- COMMENT 'stores shops data'; -- CREATE TABLE groups ( -- id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, -- groupname VARCHAR(50), -- )ENGINE=MyISAM -- DEFAULT CHARACTER SET `utf8` -- COLLATE utf8_bin, -- COMMENT 'stores shops data'; -- INSERT INTO groups (name,created,modified) VALUES ('admin', NOW(), NOW()),('subscribers', NOW(), NOW()), ('users', NOW(), NOW()); -- END ALTERNATIVE TABLES INSERT INTO users (username, password, role, created, modified) VALUES ('admin', '$2a$10$3otKxeQ.UR5I9ICH8Ly4F.GOk4NBTbmPb', 'admin', NOW(), NOW());
true
ef11d5b6dddac68ee36f7f28047d6e20e77bdf75
SQL
hackert/una_vaina_loca
/protected/data/er-tancking.sql
UTF-8
13,428
3.625
4
[]
no_license
/* Drop Tables */ DROP TABLE IF EXISTS track.admision; DROP TABLE IF EXISTS track.clientes; DROP TABLE IF EXISTS track.receptor; DROP TABLE IF EXISTS track.contacto; DROP TABLE IF EXISTS track.maestro; DROP TABLE IF EXISTS track.ruta_entrega; DROP TABLE IF EXISTS track.sedes; /* Drop Sequences */ DROP SEQUENCE IF EXISTS track.admision_id_admision_seq; DROP SEQUENCE IF EXISTS track.clientes_id_cliente_seq; DROP SEQUENCE IF EXISTS track.contacto_id_contacto_seq; DROP SEQUENCE IF EXISTS track.maestro_id_maestro_seq; DROP SEQUENCE IF EXISTS track.receptor_id_receptor_seq; DROP SEQUENCE IF EXISTS track.ruta_entrega_id_rutae_seq; DROP SEQUENCE IF EXISTS track.sedes_id_sede_seq; /* Create Tables */ CREATE TABLE track.admision ( -- ID DE LA ADMISIÓN id_admision serial NOT NULL, -- PESO DEL PAQUETE peso_admision varchar(100) NOT NULL, -- PRECIO DE LA ADMISION DEPENDE DEL PESO DEL PAQUETE -- precio_admision varchar NOT NULL, -- DIMENSIÓN DE LA ADMISIÓN dimension_admision varchar NOT NULL, -- PAGO A RECEPCIÓN pago_recepcion boolean, -- FECHA ENTREGA DE LA ADMISIÓN fecha_entrega time with time zone, fksede_destino int, -- BOLEANO QUE IDENTICA SI EL CAMPO ESTA ACTIVO es_activo boolean, -- FORANEA DE LA TABLA MAESTRO fk_estatus int, -- FECHA DE CREACIÓN create_date time with time zone, -- IDENTIFICADOR DEL ID DEL USUARIO QUE MODIFICO EL REGISTRO modified_by int, -- IDENTIFICADOR DE LAS CEDES id_sede int NOT NULL, -- ID DEL CLIENTE id_cliente int NOT NULL, id_rutae int NOT NULL, CONSTRAINT admision_pkey PRIMARY KEY (id_admision) ) WITHOUT OIDS; /* ---------- Nueva tabla Envio --------- */ CREATE TABLE track.envio ( id_envio serial NOT NULL, tipo_envio int NOT NULL, cant_articulo int NOT NULL, codigo_envio varchar(20), create_date time with time zone, -- FECHA MODIFICACIÓN Envio modified_date time with time zone, -- ID DEL Usuario CONSTRAINT envio_pkey PRIMARY KEY (id_envio) ) WITHOUT OIDS; CREATE TABLE track.envio_paquete ( id_paquete int NOT NULL, id_envio int NOT NULL ); CREATE TABLE track.paquete ( id_paquete serial NOT NULL, peso_envio int NOT NULL, dimension_envio varchar(10) NOT NULL ); /* ----------------------------------------- */ CREATE TABLE track.clientes ( -- ID DEL CLIENTE id_cliente serial NOT NULL, -- NOMBRE DEL CLIENTE nb_cliente varchar(100), -- APELLIDO DEL CLIENTE apellido_cliente varchar(100), -- CEDULA DEL CLIENTE cedula_cliente int, -- ESTATUS CLIENTE es_activo boolean, -- FECHA CREACIÓN CLIENTE create_date time with time zone, -- FECHA MODIFICACIÓN CLIENTE modified_date time with time zone, -- ID DEL CONTACTO id_contacto int NOT NULL, CONSTRAINT clientes_pkey PRIMARY KEY (id_cliente) ) WITHOUT OIDS; CREATE TABLE track.contacto ( -- ID DEL CONTACTO id_contacto serial NOT NULL, -- CONTACTO: REDES SOCIALES, TELEFONO, CORREO contacto text, -- FECHA CREACIÓN create_date time with time zone, -- MODIFICADO POR modified_by int, -- ESTATUS DEL REGISTRO fk_estatus int, CONSTRAINT contacto_pkey PRIMARY KEY (id_contacto) ) WITHOUT OIDS; CREATE TABLE track.maestro ( -- ID DEL MAESTRO id_maestro serial NOT NULL, -- DESCRIPCIÓN DE MAESTRO descripcion varchar(100), -- PADRE QUE IDENTICA EL ID DE CADA ELEMENTO padre int, -- HIJO A EL CUAL PERTENECE EL REGISTRO hijo int, CONSTRAINT maestro_pkey PRIMARY KEY (id_maestro) ) WITHOUT OIDS; CREATE TABLE track.receptor ( id_receptor serial NOT NULL, nb_cliente varchar(100), apellido_cliente varchar(100), direccion_receptor text, es_activo boolean, create_date time with time zone, modified_date time with time zone, -- ID DEL CONTACTO id_contacto int NOT NULL, CONSTRAINT receptor_pkey PRIMARY KEY (id_receptor) ) WITHOUT OIDS; CREATE TABLE track.ruta_entrega ( id_rutae serial NOT NULL, fksede_salida int, fecha_salida time with time zone, fksede_llegada int, fecha_llegada time with time zone, id_fkestatus int, create_date time with time zone, modified_date time with time zone, CONSTRAINT ruta_entrega_pkey PRIMARY KEY (id_rutae) ) WITHOUT OIDS; CREATE TABLE track.sedes ( -- IDENTIFICADOR DE LAS CEDES id_sede serial NOT NULL, -- NOMBRE DE LA CEDE nb_sede varchar(150) NOT NULL, -- DIRECCIÓN DE LA CEDE direccion_sede text NOT NULL, -- CLAVE FOREANEA DE LA TABLA ESTADO -- fk_estado int NOT NULL, fk_municipio int NOT NULL, fk_parroquia int NOT NULL, -- ESTATUS DE LA SEDE. PUEDE SER -- --ACTIVO -- --INACTIVO -- ESTA RELACIÓN PROVIENE DE MAESTRO fk_estatus int NOT NULL, -- FECHA DE CREACIÓN DELREGISTRO create_date timestamp with time zone DEFAULT now() NOT NULL, -- USUARIO QUE REALIZO LA MODIFICACIÓN EN EL REGISTRO modified_by int, -- IDENTICADOR SI EL REGISTRO ESTA ACTIVO es_activo boolean, CONSTRAINT sedes_pkey PRIMARY KEY (id_sede) ) WITHOUT OIDS; /* Create Foreign Keys */ ALTER TABLE track.admision ADD FOREIGN KEY (id_cliente) REFERENCES track.clientes (id_cliente) ON UPDATE RESTRICT ON DELETE RESTRICT ; ALTER TABLE track.clientes ADD FOREIGN KEY (id_contacto) REFERENCES track.contacto (id_contacto) ON UPDATE RESTRICT ON DELETE RESTRICT ; ALTER TABLE track.receptor ADD FOREIGN KEY (id_contacto) REFERENCES track.contacto (id_contacto) ON UPDATE RESTRICT ON DELETE RESTRICT ; ALTER TABLE track.admision ADD FOREIGN KEY (id_rutae) REFERENCES track.ruta_entrega (id_rutae) ON UPDATE RESTRICT ON DELETE RESTRICT ; ALTER TABLE track.admision ADD FOREIGN KEY (id_sede) REFERENCES track.sedes (id_sede) ON UPDATE RESTRICT ON DELETE RESTRICT ; /* Comments */ COMMENT ON COLUMN track.admision.id_admision IS 'ID DE LA ADMISIÓN '; COMMENT ON COLUMN track.admision.peso_admision IS 'PESO DEL PAQUETE'; COMMENT ON COLUMN track.admision.precio_admision IS 'PRECIO DE LA ADMISION DEPENDE DEL PESO DEL PAQUETE '; COMMENT ON COLUMN track.admision.dimension_admision IS 'DIMENSIÓN DE LA ADMISIÓN'; COMMENT ON COLUMN track.admision.pago_recepcion IS 'PAGO A RECEPCIÓN'; COMMENT ON COLUMN track.admision.fecha_entrega IS 'FECHA ENTREGA DE LA ADMISIÓN'; COMMENT ON COLUMN track.admision.es_activo IS 'BOLEANO QUE IDENTICA SI EL CAMPO ESTA ACTIVO'; COMMENT ON COLUMN track.admision.fk_estatus IS 'FORANEA DE LA TABLA MAESTRO'; COMMENT ON COLUMN track.admision.create_date IS 'FECHA DE CREACIÓN'; COMMENT ON COLUMN track.admision.modified_by IS 'IDENTIFICADOR DEL ID DEL USUARIO QUE MODIFICO EL REGISTRO'; COMMENT ON COLUMN track.admision.id_sede IS 'IDENTIFICADOR DE LAS CEDES'; COMMENT ON COLUMN track.admision.id_cliente IS 'ID DEL CLIENTE'; COMMENT ON COLUMN track.clientes.id_cliente IS 'ID DEL CLIENTE'; COMMENT ON COLUMN track.clientes.nb_cliente IS 'NOMBRE DEL CLIENTE'; COMMENT ON COLUMN track.clientes.apellido_cliente IS 'APELLIDO DEL CLIENTE'; COMMENT ON COLUMN track.clientes.cedula_cliente IS 'CEDULA DEL CLIENTE'; COMMENT ON COLUMN track.clientes.es_activo IS 'ESTATUS CLIENTE'; COMMENT ON COLUMN track.clientes.create_date IS 'FECHA CREACIÓN CLIENTE'; COMMENT ON COLUMN track.clientes.modified_date IS 'FECHA MODIFICACIÓN CLIENTE'; COMMENT ON COLUMN track.clientes.id_contacto IS 'ID DEL CONTACTO'; COMMENT ON COLUMN track.contacto.id_contacto IS 'ID DEL CONTACTO'; COMMENT ON COLUMN track.contacto.contacto IS 'CONTACTO: REDES SOCIALES, TELEFONO, CORREO'; COMMENT ON COLUMN track.contacto.create_date IS 'FECHA CREACIÓN'; COMMENT ON COLUMN track.contacto.modified_by IS 'MODIFICADO POR'; COMMENT ON COLUMN track.contacto.fk_estatus IS 'ESTATUS DEL REGISTRO'; COMMENT ON COLUMN track.maestro.id_maestro IS 'ID DEL MAESTRO'; COMMENT ON COLUMN track.maestro.descripcion IS 'DESCRIPCIÓN DE MAESTRO'; COMMENT ON COLUMN track.maestro.padre IS 'PADRE QUE IDENTICA EL ID DE CADA ELEMENTO'; COMMENT ON COLUMN track.maestro.hijo IS 'HIJO A EL CUAL PERTENECE EL REGISTRO'; COMMENT ON COLUMN track.receptor.id_contacto IS 'ID DEL CONTACTO'; COMMENT ON COLUMN track.sedes.id_sede IS 'IDENTIFICADOR DE LAS CEDES'; COMMENT ON COLUMN track.sedes.nb_sede IS 'NOMBRE DE LA CEDE'; COMMENT ON COLUMN track.sedes.direccion_sede IS 'DIRECCIÓN DE LA CEDE'; COMMENT ON COLUMN track.sedes.fk_estado IS 'CLAVE FOREANEA DE LA TABLA ESTADO '; COMMENT ON COLUMN track.sedes.fk_estatus IS 'ESTATUS DE LA SEDE. PUEDE SER --ACTIVO --INACTIVO ESTA RELACIÓN PROVIENE DE MAESTRO'; COMMENT ON COLUMN track.sedes.create_date IS 'FECHA DE CREACIÓN DELREGISTRO'; COMMENT ON COLUMN track.sedes.modified_by IS 'USUARIO QUE REALIZO LA MODIFICACIÓN EN EL REGISTRO'; COMMENT ON COLUMN track.sedes.es_activo IS 'IDENTICADOR SI EL REGISTRO ESTA ACTIVO'; /* ------------------ Cruge ----------------------- */ CREATE TABLE cruge_system ( idsystem serial, name VARCHAR(45) NULL , largename VARCHAR(45) NULL , sessionmaxdurationmins integer NULL DEFAULT 30 , sessionmaxsameipconnections integer NULL DEFAULT 10 , sessionreusesessions integer NULL DEFAULT 1, sessionmaxsessionsperday integer NULL DEFAULT -1 , sessionmaxsessionsperuser integer NULL DEFAULT -1 , systemnonewsessions integer NULL DEFAULT 0, systemdown integer NULL DEFAULT 0 , registerusingcaptcha integer NULL DEFAULT 0 , registerusingterms integer NULL DEFAULT 0 , terms varchar(4096) , registerusingactivation integer NULL DEFAULT 1 , defaultroleforregistration VARCHAR(64) NULL , registerusingtermslabel VARCHAR(100) NULL , registrationonlogin integer NULL DEFAULT 1 , PRIMARY KEY (idsystem) ) ; delete from cruge_system; INSERT INTO cruge_system (idsystem,name,largename,sessionmaxdurationmins,sessionmaxsameipconnections,sessionreusesessions,sessionmaxsessionsperday,sessionmaxsessionsperuser,systemnonewsessions,systemdown,registerusingcaptcha,registerusingterms,terms,registerusingactivation,defaultroleforregistration,registerusingtermslabel,registrationonlogin) VALUES (1,'default',NULL,30,10,1,-1,-1,0,0,0,0,'',0,'','',1); CREATE TABLE cruge_session ( idsession serial, iduser INT NOT NULL , created BIGINT NULL , expire bigint NULL , status integer NULL DEFAULT 0 , ipaddress VARCHAR(45) NULL , usagecount integer NULL DEFAULT 0 , lastusage bigint NULL , logoutdate bigint NULL , ipaddressout VARCHAR(45) NULL , PRIMARY KEY (idsession) ) ; CREATE TABLE cruge_user ( iduser serial, regdate bigint NULL , actdate bigint NULL , logondate bigint NULL , username VARCHAR(64) NULL , email VARCHAR(45) NULL , password VARCHAR(64) NULL, authkey VARCHAR(100) NULL, state integer NULL DEFAULT 0 , totalsessioncounter integer NULL DEFAULT 0 , currentsessioncounter integer NULL DEFAULT 0 , PRIMARY KEY (iduser) ) ; delete from cruge_user; insert into cruge_user(username, email, password, state) values ('admin', 'admin@tucorreo.com','admin',1) ,('invitado', 'invitado','nopassword',1) ; CREATE TABLE cruge_field ( idfield serial, fieldname VARCHAR(20) NOT NULL , longname VARCHAR(50) NULL , position integer NULL DEFAULT 0 , required integer NULL DEFAULT 0 , fieldtype integer NULL DEFAULT 0 , fieldsize integer NULL DEFAULT 20 , maxlength integer NULL DEFAULT 45 , showinreports integer NULL DEFAULT 0 , useregexp VARCHAR(512) NULL , useregexpmsg VARCHAR(512) NULL , predetvalue varchar(4096), PRIMARY KEY (idfield) ); CREATE TABLE cruge_fieldvalue ( idfieldvalue serial, iduser INT NOT NULL , idfield INT NOT NULL , value varchar(4096), PRIMARY KEY (idfieldvalue) , CONSTRAINT fk_cruge_fieldvalue_cruge_user1 FOREIGN KEY (iduser ) REFERENCES cruge_user (iduser ) ON DELETE CASCADE ON UPDATE NO ACTION, CONSTRAINT fk_cruge_fieldvalue_cruge_field1 FOREIGN KEY (idfield ) REFERENCES cruge_field (idfield ) ON DELETE CASCADE ON UPDATE NO ACTION) ; CREATE TABLE cruge_authitem ( name VARCHAR(64) NOT NULL , type integer NOT NULL , description TEXT NULL DEFAULT NULL , bizrule TEXT NULL DEFAULT NULL , data TEXT NULL DEFAULT NULL , PRIMARY KEY (name) ) ; CREATE TABLE cruge_authassignment ( userid INT NOT NULL , bizrule TEXT NULL DEFAULT NULL , data TEXT NULL DEFAULT NULL , itemname VARCHAR(64) NOT NULL , PRIMARY KEY (userid, itemname) , CONSTRAINT fk_cruge_authassignment_cruge_authitem1 FOREIGN KEY (itemname ) REFERENCES cruge_authitem (name ) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT fk_cruge_authassignment_user FOREIGN KEY (userid ) REFERENCES cruge_user (iduser ) ON DELETE CASCADE ON UPDATE NO ACTION) ; CREATE TABLE cruge_authitemchild ( parent VARCHAR(64) NOT NULL , child VARCHAR(64) NOT NULL , PRIMARY KEY (parent, child) , CONSTRAINT crugeauthitemchild_ibfk_1 FOREIGN KEY (parent ) REFERENCES cruge_authitem (name ) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT crugeauthitemchild_ibfk_2 FOREIGN KEY (child ) REFERENCES cruge_authitem (name ) ON DELETE CASCADE ON UPDATE CASCADE) ; /* ----------------------------------------------------- */
true
dace12f1bf92ea2ddf85292cfb296b00f0e7f6b1
SQL
Aram777/OnlineShoppingProject
/ProjectDocuments/New folder/OnlineShopping.sql
UTF-8
6,892
3.578125
4
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
/*==============================================================*/ /* DBMS name: MySQL 5.0 */ /* Created on: 15/04/2018 01:52:50 */ /*==============================================================*/ alter table Discounts drop foreign key FK_DISCOUNT_PRODUCTSD_PRODUCTS; alter table Orders drop foreign key FK_ORDERS_DISCOUNTO_DISCOUNT; alter table Orders drop foreign key FK_ORDERS_PRODUCTST_PRODUCTS; alter table Orders drop foreign key FK_ORDERS_USERTOORD_SYSTEMUS; alter table Products drop foreign key FK_PRODUCTS_PRODUCTCA_PRODUCTS; alter table Products drop foreign key FK_PRODUCTS_PRODUCTPR_PRICECAT; alter table Discounts drop primary key; alter table Discounts drop foreign key FK_DISCOUNT_PRODUCTSD_PRODUCTS; drop table if exists Discounts; alter table Orders drop primary key; alter table Orders drop foreign key FK_ORDERS_PRODUCTST_PRODUCTS; alter table Orders drop foreign key FK_ORDERS_USERTOORD_SYSTEMUS; alter table Orders drop foreign key FK_ORDERS_DISCOUNTO_DISCOUNT; drop table if exists Orders; alter table PriceCategory drop primary key; drop table if exists PriceCategory; alter table Products drop primary key; alter table Products drop foreign key FK_PRODUCTS_PRODUCTPR_PRICECAT; alter table Products drop foreign key FK_PRODUCTS_PRODUCTCA_PRODUCTS; drop table if exists Products; alter table ProductsCategory drop primary key; drop table if exists ProductsCategory; alter table SystemUsers drop primary key; drop table if exists SystemUsers; /*==============================================================*/ /* Table: Discounts */ /*==============================================================*/ create table Discounts ( DiscountsId int not null auto_increment comment '', ProductsId int not null comment '', DiscountStartDate date not null comment '', DiscountEndDate date not null comment '', DiscountPercent decimal(5,2) not null comment '' ); alter table Discounts add primary key (DiscountsId); /*==============================================================*/ /* Table: Orders */ /*==============================================================*/ create table Orders ( OrdersId int not null auto_increment comment '', SystemUsersId int not null comment '', ProductsId int not null comment '', DiscountsId int comment '', OrdersDate datetime not null comment '', OrderStatus smallint not null default 1 comment '0 deactive 1 added to cart 2 payed 3 delivered', ProductRate int default 0 comment 'for rating the products', OrderQuantity int default 1 comment '', OrderPrice decimal(5,2) not null comment '' ); alter table Orders add primary key (OrdersId); /*==============================================================*/ /* Table: PriceCategory */ /*==============================================================*/ create table PriceCategory ( PriceCategoryId int not null auto_increment comment '', PriceCatPerecent decimal(5,2) not null default 0.00 comment '' ); alter table PriceCategory add primary key (PriceCategoryId); /*==============================================================*/ /* Table: Products */ /*==============================================================*/ create table Products ( ProductsId int not null auto_increment comment '', ProductsCategoryId int not null comment '', PriceCategoryId int not null comment '', ProductName varchar(200) not null comment '', ProductQuantity int not null default 0 comment '', ProductDesc varchar(200) not null comment '', ProductPicture varchar(200) comment '', ProdutMaxCapasity int not null default 1 comment '', ProductOrderPoint int not null default 0 comment '', ProductState smallint not null default 1 comment '0 Deactivated Product 1 Active products', ProductAddingDate datetime not null comment '', ProductPrice decimal(5,2) not null default 0 comment '' ); alter table Products add primary key (ProductsId); /*==============================================================*/ /* Table: ProductsCategory */ /*==============================================================*/ create table ProductsCategory ( ProductsCategoryId int not null auto_increment comment '', PrdCatDescription longtext not null comment '' ); alter table ProductsCategory add primary key (ProductsCategoryId); /*==============================================================*/ /* Table: SystemUsers */ /*==============================================================*/ create table SystemUsers ( SystemUsersId int not null auto_increment comment '', UserFirstName varchar(50) not null comment '', UserLastName varchar(50) comment '', UserEmail varchar(100) not null comment '', UserType smallint not null default 1 comment '0 for admin 1 for requalre users', UserState smallint not null default 1 comment '0 for deactivated users 1 for Active users', UserAddress varchar(100) comment '', UserPass varchar(200) not null comment '' ); alter table SystemUsers add primary key (SystemUsersId); alter table Discounts add constraint FK_DISCOUNT_PRODUCTSD_PRODUCTS foreign key (ProductsId) references Products (ProductsId) on delete restrict on update restrict; alter table Orders add constraint FK_ORDERS_DISCOUNTO_DISCOUNT foreign key (DiscountsId) references Discounts (DiscountsId) on delete restrict on update restrict; alter table Orders add constraint FK_ORDERS_PRODUCTST_PRODUCTS foreign key (ProductsId) references Products (ProductsId) on delete restrict on update restrict; alter table Orders add constraint FK_ORDERS_USERTOORD_SYSTEMUS foreign key (SystemUsersId) references SystemUsers (SystemUsersId) on delete restrict on update restrict; alter table Products add constraint FK_PRODUCTS_PRODUCTCA_PRODUCTS foreign key (ProductsCategoryId) references ProductsCategory (ProductsCategoryId) on delete restrict on update restrict; alter table Products add constraint FK_PRODUCTS_PRODUCTPR_PRICECAT foreign key (PriceCategoryId) references PriceCategory (PriceCategoryId) on delete restrict on update restrict;
true
2d19a0f2977000c2f5e130964ab93050e49d7104
SQL
amar-jagdale/SQL_Assignment
/SQLQuery_FUNCTIONS.sql
UTF-8
1,565
3.796875
4
[]
no_license
--================== SQL FUNCTIONS ======================= SELECT REPLACE('SQL Tutorial', 'T', 'M'); --Replace "T" with "M": SELECT CONCAT('SQL', ' is', ' fun!'); SELECT REPLACE('SQL Tutorial', 'SQL', 'HTML'); --Replace "SQL" with "HTML": SELECT LOWER('SQL Tutorial is FUN!'); --Lower the string select GETDATE() --=========================================================================== Create table Student ( Id int Not Null, FName varchar(20), LName varchar(20), Class varchar(20), Marks decimal(20), Age int, Primary Key(Id) ) Insert into Student(Id,FName,LName,Class,Marks,Age)values(1,'Shardul','Patel','A',90,24); Insert into Student(Id,FName,LName,Marks,Age)values(2,'Mehak','Gujar',80,23); Insert into Student(Id,FName,LName,Class,Marks,Age)values(3,'Shreesha','Dubey','B',75,22); Insert into Student(Id,FName,LName,Class,Marks,Age)values(4,'darshan','Patil','B',60,21); Insert into Student(Id,FName,LName,Class,Marks,Age)values(5,'Amar','Jagdale','A',84,26); Insert into Student(Id,FName,LName,Class,Marks,Age)values(6,'Sachin','Vaze','A',78,24); Select * from Student --================ FUNCTION ===================== select FName from Student where Class IS Null select FName from Student where Class IS Not Null --=============== Aggregate Function ============== select AVG(Marks) from Student Select COUNT(Age) from Student select Count(Class) from Student where Class IS Not Null Select Min(Marks) from Student Select Max(Marks) from Student Select SUM(Marks) From Student
true
7edfc9b3cdd1d345e675de1cdcb17bed6ab00583
SQL
jonpratt/powerschool-customizations
/Online Registration/admin/portalupdates/annualagreements.sql
UTF-8
1,378
3.578125
4
[]
no_license
SELECT students.dcid as studentsDCID, students.lastfirst as studentsName, students.grade_level as studentsGradeLevel, teachers.lastfirst as advisor, CASE WHEN u_student_demographics.emergency_agree=1 THEN u_student_demographics.emergency_agree ELSE 0 END as emergencyValue, CASE WHEN u_student_demographics.clinic_agree=1 THEN u_student_demographics.clinic_agree ELSE 0 END as clinicValue, CASE WHEN u_student_demographics.bus_agree=1 THEN u_student_demographics.bus_agree ELSE 0 END as busValue, CASE WHEN u_student_demographics.handbook_agree=1 THEN u_student_demographics.handbook_agree ELSE 0 END as handbookValue, CASE WHEN u_student_demographics.ipad_agree=1 THEN u_student_demographics.ipad_agree ELSE 0 END as ipadValue, CASE WHEN u_student_demographics.enrollment_agree=1 THEN u_student_demographics.enrollment_agree ELSE 0 END as enrollmentValue, CASE WHEN u_student_demographics.forms_complete=1 THEN u_student_demographics.forms_complete ELSE 0 END as formsCompleteValue FROM students LEFT OUTER JOIN u_student_demographics on u_student_demographics.studentsdcid=students.dcid LEFT OUTER JOIN cc on cc.studentid=students.id AND cc.termid BETWEEN 2600 AND 2610 AND cc.course_number='104' LEFT OUTER JOIN teachers on teachers.id=cc.teacherid WHERE students.enroll_status=0 ORDER BY students.grade_level, students.lastfirst
true
b5f955b610c9dede1867b66bbd3e26c5c716be38
SQL
dineshkummarc/hijab-master
/assets/db/px_guest_book.sql
UTF-8
1,589
2.90625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jan 09, 2017 at 07:19 PM -- Server version: 10.1.16-MariaDB -- PHP Version: 5.6.24 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `hijab` -- -- -------------------------------------------------------- -- -- Table structure for table `px_guest_book` -- CREATE TABLE `px_guest_book` ( `id` int(10) UNSIGNED NOT NULL, `name` varchar(225) NOT NULL, `email` varchar(225) NOT NULL, `phone` varchar(50) NOT NULL, `subject` varchar(250) NOT NULL, `content` text NOT NULL, `status` int(11) NOT NULL, `date_created` datetime NOT NULL, `date_read` datetime NOT NULL, `date_replied` datetime NOT NULL, `id_parent` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Indexes for dumped tables -- -- -- Indexes for table `px_guest_book` -- ALTER TABLE `px_guest_book` ADD PRIMARY KEY (`id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `px_guest_book` -- ALTER TABLE `px_guest_book` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
true
cd6839b2d309f2cabe2eb77c148ae42c8571784b
SQL
JANVI062/StockInvo
/database/grocery_db.sql
UTF-8
16,613
3.25
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 02, 2021 at 12:47 PM -- Server version: 10.4.19-MariaDB -- PHP Version: 8.0.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `grocery_db` -- -- -------------------------------------------------------- -- -- Table structure for table `category_list` -- CREATE TABLE `category_list` ( `id` int(30) NOT NULL, `name` text NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `category_list` -- INSERT INTO `category_list` (`id`, `name`) VALUES (9, 'Snacks'), (11, 'Drinks'), (12, 'Shampoo'), (14, 'Oils'), (15, 'Cereals'); -- -------------------------------------------------------- -- -- Table structure for table `customer_list` -- CREATE TABLE `customer_list` ( `id` int(30) NOT NULL, `customer_name` text NOT NULL, `email_id` text NOT NULL, `contact` varchar(30) NOT NULL, `firm_name` text DEFAULT NULL, `firm_location` text DEFAULT NULL, `pincode` int(6) NOT NULL, `city` varchar(200) NOT NULL, `state` varchar(200) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `customer_list` -- INSERT INTO `customer_list` (`id`, `customer_name`, `email_id`, `contact`, `firm_name`, `firm_location`, `pincode`, `city`, `state`) VALUES (26, 'Bhushan Kumar', 'bk@gmail.com', '9888007654', 'Bhushan General Store', 'Near Gurudwara', 147001, 'Patiala', 'Punjab'), (27, 'Ankit Chopra', 'ac5@gmail.com', '9076534521', 'Ankit Karyana Store', 'Model Town ', 110001, 'Delhi ', 'UT'), (28, 'Kanav Bansal', 'kb@gmail.com', '9119148391', 'KB Store', 'Main Bazar', 403004, 'Aldona', 'Goa'), (29, 'Harman Singh', 'hs33@gmail.com', '9876543210', 'HS Departmental Store', 'Leela Bhawan ', 148024, 'Dhuri', 'Punjab'), (30, 'Saman Kumar', 'saman@gmail.com', '6283491600', 'Kumar Karyana Store', '22 no. Road', 148025, 'Sherpur', 'Punjab'); -- -------------------------------------------------------- -- -- Table structure for table `inventory` -- CREATE TABLE `inventory` ( `id` int(30) NOT NULL, `product_id` int(30) NOT NULL, `qty` int(30) NOT NULL, `price` float NOT NULL, `type` tinyint(1) NOT NULL COMMENT '1= stockin , 2 = stockout', `stock_from` varchar(100) NOT NULL COMMENT 'sales/receiving', `form_id` int(30) NOT NULL, `remarks` text NOT NULL, `date_updated` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `inventory` -- INSERT INTO `inventory` (`id`, `product_id`, `qty`, `price`, `type`, `stock_from`, `form_id`, `remarks`, `date_updated`) VALUES (46, 15, 120, 50, 1, 'receiving', 8, 'Stock from Receiving-00000000\r\n', '2021-06-01 23:49:47'), (47, 19, 100, 200, 1, 'receiving', 8, 'Stock from Receiving-00000000\r\n', '2021-06-01 23:49:47'), (48, 23, 60, 230, 1, 'receiving', 8, 'Stock from Receiving-00000000\r\n', '2021-06-01 23:49:47'), (49, 16, 70, 270, 1, 'receiving', 9, 'Stock from Receiving-53970464\n', '2021-06-01 23:50:23'), (50, 17, 40, 100, 1, 'receiving', 10, 'Stock from Receiving-53095315\r\n', '2021-06-01 23:51:24'), (51, 21, 70, 25, 1, 'receiving', 10, 'Stock from Receiving-53095315\r\n', '2021-06-01 23:51:24'), (52, 24, 90, 100, 1, 'receiving', 10, 'Stock from Receiving-53095315\r\n', '2021-06-01 23:51:24'), (60, 25, 30, 170, 2, 'Sales', 12, 'Stock out from Sales-00000000\r\n', '2021-06-02 00:07:28'), (61, 23, 12, 250, 2, 'Sales', 12, 'Stock out from Sales-00000000\r\n', '2021-06-02 00:07:28'), (62, 16, 30, 300, 2, 'Sales', 13, 'Stock out from Sales-94172231\n', '2021-06-02 00:01:16'), (63, 24, 11, 120, 2, 'Sales', 13, 'Stock out from Sales-94172231\n', '2021-06-02 00:01:16'), (64, 20, 33, 20, 2, 'Sales', 13, 'Stock out from Sales-94172231\n', '2021-06-02 00:01:16'), (68, 22, 40, 400, 2, 'Sales', 15, 'Stock out from Sales-58300037\r\n', '2021-06-02 00:08:04'), (69, 18, 40, 200, 1, 'receiving', 11, 'Stock from Receiving-36152828\r\n', '2021-06-02 00:05:30'), (70, 15, 35, 56, 2, 'Sales', 16, 'Stock out from Sales-86599010\n', '2021-06-02 00:06:54'), (71, 18, 12, 200, 2, 'Sales', 16, 'Stock out from Sales-86599010\n', '2021-06-02 00:06:54'), (72, 19, 40, 230, 2, 'Sales', 16, 'Stock out from Sales-86599010\n', '2021-06-02 00:06:54'), (73, 21, 30, 30, 2, 'Sales', 12, 'Stock out from Sales-00000000\r\n', '2021-06-02 00:07:28'), (75, 19, 7, 230, 2, 'Sales', 15, 'Stock out from Sales-58300037\r\n', '2021-06-02 11:41:07'), (76, 25, 50, 150, 1, 'receiving', 12, 'Stock from Receiving-43472499\r\n', '2021-06-02 11:45:48'), (77, 20, 40, 20, 1, 'receiving', 12, 'Stock from Receiving-43472499\r\n', '2021-06-02 11:46:26'), (78, 22, 60, 350, 1, 'receiving', 13, 'Stock from Receiving-66044427\r\n', '2021-06-02 12:03:05'), (81, 17, 20, 120, 2, 'Sales', 15, 'Stock out from Sales-58300037\r\n', '2021-06-02 12:49:07'); -- -------------------------------------------------------- -- -- Table structure for table `permissible_users_list` -- CREATE TABLE `permissible_users_list` ( `id` int(30) NOT NULL, `name` varchar(100) NOT NULL, `email` varchar(100) NOT NULL, `store_id` int(100) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `permissible_users_list` -- INSERT INTO `permissible_users_list` (`id`, `name`, `email`, `store_id`) VALUES (7, 'Raj Kumar', 'raj@gmail.com', 10), (8, 'Vinod Kansal', 'vk@gmail.com', 10); -- -------------------------------------------------------- -- -- Table structure for table `product_list` -- CREATE TABLE `product_list` ( `id` int(30) NOT NULL, `category_id` int(30) NOT NULL, `supplier_id` int(30) NOT NULL, `batch` varchar(50) NOT NULL, `selling_price` double NOT NULL, `name` varchar(150) NOT NULL, `description` text NOT NULL, `expiry_date` date NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `product_list` -- INSERT INTO `product_list` (`id`, `category_id`, `supplier_id`, `batch`, `selling_price`, `name`, `description`, `expiry_date`) VALUES (15, 11, 12, '13872413', 56, 'Coca cola', 'Diet (1.25L)', '2021-09-05'), (16, 12, 9, '57186050', 300, 'Dove ', 'Hair Fall Rescue (650ml)', '2022-03-20'), (17, 14, 11, '8677280', 120, 'Parachute', 'Aloevera enriched ', '2021-09-24'), (18, 15, 13, '21522055', 200, 'Corn Flakes', 'Honey flavour', '2021-06-05'), (19, 12, 12, '43313978', 230, 'Dove', 'Anti Dandruff', '2022-03-04'), (20, 9, 10, '39077873', 20, 'Lays', 'Cream & Onion ', '2021-06-02'), (21, 9, 11, '17615836', 30, 'Kurkure', 'Masala Munch', '2021-07-11'), (22, 15, 10, '31004564', 400, 'Rice', 'Basmati (5kg)', '2022-09-01'), (23, 11, 12, '63957230', 250, 'Coffee', 'BRU Gold', '2022-01-21'), (24, 14, 11, '69173155', 120, 'Almond Oil', 'Bajaj (25ml)', '2021-12-31'), (25, 12, 10, '6126458', 170, 'Clinic Plus', 'Silky and smooth', '2023-07-22'); -- -------------------------------------------------------- -- -- Table structure for table `receiving_list` -- CREATE TABLE `receiving_list` ( `id` int(30) NOT NULL, `ref_no` varchar(100) NOT NULL, `supplier_id` int(30) NOT NULL, `total_amount` double NOT NULL, `date_added` datetime NOT NULL DEFAULT current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `receiving_list` -- INSERT INTO `receiving_list` (`id`, `ref_no`, `supplier_id`, `total_amount`, `date_added`) VALUES (8, '00000000\n', 12, 39800, '2021-06-01 23:44:30'), (9, '53970464\n', 9, 18900, '2021-06-01 23:50:23'), (10, '53095315\n', 11, 14750, '2021-06-01 23:50:47'), (11, '36152828\n', 13, 8000, '2021-06-01 23:51:51'), (12, '43472499\n', 10, 8300, '2021-06-01 23:53:04'), (13, '66044427\n', 10, 21000, '2021-06-02 11:48:08'); -- -------------------------------------------------------- -- -- Table structure for table `sales_list` -- CREATE TABLE `sales_list` ( `id` int(30) NOT NULL, `ref_no` varchar(30) NOT NULL, `customer_id` int(30) NOT NULL, `total_amount` double NOT NULL, `amount_tendered` double NOT NULL, `amount_change` double NOT NULL, `date_updated` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `sales_list` -- INSERT INTO `sales_list` (`id`, `ref_no`, `customer_id`, `total_amount`, `amount_tendered`, `amount_change`, `date_updated`) VALUES (12, '00000000\n', 26, 9000, 9000, 0, '2021-06-02 00:07:27'), (13, '94172231\n', 28, 10980, 11000, 20, '2021-06-02 00:01:16'), (15, '58300037\n', 27, 20010, 20010, 0, '2021-06-02 11:49:15'), (16, '86599010\n', 29, 13560, 14000, 440, '2021-06-02 00:06:54'); -- -------------------------------------------------------- -- -- Table structure for table `store` -- CREATE TABLE `store` ( `store_id` int(30) NOT NULL, `store_name` text NOT NULL, `store_loc` varchar(200) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `store` -- INSERT INTO `store` (`store_id`, `store_name`, `store_loc`) VALUES (10, 'J.K Enterprises', 'Main Bazar, Near Gurudwara'); -- -------------------------------------------------------- -- -- Table structure for table `supplier_list` -- CREATE TABLE `supplier_list` ( `id` int(30) NOT NULL, `supplier_name` text NOT NULL, `email_id` text NOT NULL, `contact` varchar(30) NOT NULL, `firm_name` text NOT NULL, `firm_location` text NOT NULL, `pincode` int(6) NOT NULL, `city` text DEFAULT NULL, `state` text DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `supplier_list` -- INSERT INTO `supplier_list` (`id`, `supplier_name`, `email_id`, `contact`, `firm_name`, `firm_location`, `pincode`, `city`, `state`) VALUES (9, 'Manoj Kumar', 'mk@gmail.com', '9915019651', 'Manoj Karyana Store', 'Model town 12', 148024, 'Dhuri ', 'Punjab'), (10, 'Sohan Goyal', 'sohan@gmail.com', '8766589043', 'Goyal Brothers', '22 no. Market ', 147001, 'Patiala', 'Punjab'), (11, 'Rakesh Sharma', 'rs02@gmail.com', '6789054321', 'RK General Store', 'Near Bus Stand ', 226001, 'Lucknow', 'UP'), (12, 'Aman Singh ', 'aman@gmail.com', '6283491729', 'AS Store', 'Sadar Bazar', 148101, 'Barnala', 'Punjab'), (13, 'Raman Aggarwal', 'raman@gmail.com', '7890065544', 'Raman Departmental Store', 'Pharwahi Bazar', 323021, 'Kota', 'Rajasthan'); -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE `users` ( `id` int(30) NOT NULL, `first_name` varchar(200) NOT NULL, `last_name` varchar(200) DEFAULT NULL, `email` varchar(100) NOT NULL, `password` varchar(200) NOT NULL, `type` tinyint(1) NOT NULL DEFAULT 2 COMMENT '1=owner , 2 = permissible', `pincode` int(6) NOT NULL, `city` varchar(200) NOT NULL, `state` varchar(200) NOT NULL, `store_id` int(100) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `users` -- INSERT INTO `users` (`id`, `first_name`, `last_name`, `email`, `password`, `type`, `pincode`, `city`, `state`, `store_id`) VALUES (33, 'Jatinder', 'Kumar', 'jk04@gmail.com', '4cdf29939e36963e78e1319d2b0d9a82', 1, 148025, 'Sherpur', 'Punjab', 10), (34, 'Raj', 'Kumar', 'raj@gmail.com', 'c223199626bf0875cbc4e5859c93040c', 2, 148101, 'Barnala', 'Punjab', 10), (36, 'Vinod', 'Kansal', 'vk@gmail.com', 'd2c51c9cde1f15b718296c99ae362fb1', 2, 133001, 'Ambala', 'Haryana', 10); -- -------------------------------------------------------- -- -- Table structure for table `user_phone` -- CREATE TABLE `user_phone` ( `id` int(30) NOT NULL, `user_id` int(30) NOT NULL, `phone_number` varchar(200) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `user_phone` -- INSERT INTO `user_phone` (`id`, `user_id`, `phone_number`) VALUES (1, 33, '9417429425'), (2, 33, '9988019649'), (3, 34, '8907677889'), (4, 34, '7654323456'), (6, 36, '7007960304'), (7, 36, '7589325632'); -- -- Indexes for dumped tables -- -- -- Indexes for table `category_list` -- ALTER TABLE `category_list` ADD PRIMARY KEY (`id`); -- -- Indexes for table `customer_list` -- ALTER TABLE `customer_list` ADD PRIMARY KEY (`id`); -- -- Indexes for table `inventory` -- ALTER TABLE `inventory` ADD PRIMARY KEY (`id`), ADD KEY `inventory_product` (`product_id`); -- -- Indexes for table `permissible_users_list` -- ALTER TABLE `permissible_users_list` ADD PRIMARY KEY (`id`), ADD KEY `permissible_store` (`store_id`); -- -- Indexes for table `product_list` -- ALTER TABLE `product_list` ADD PRIMARY KEY (`id`), ADD KEY `category_fk` (`category_id`), ADD KEY `supplier_fk` (`supplier_id`); -- -- Indexes for table `receiving_list` -- ALTER TABLE `receiving_list` ADD PRIMARY KEY (`id`), ADD KEY `receiving_supplier` (`supplier_id`); -- -- Indexes for table `sales_list` -- ALTER TABLE `sales_list` ADD PRIMARY KEY (`id`), ADD KEY `sale_customer` (`customer_id`); -- -- Indexes for table `store` -- ALTER TABLE `store` ADD PRIMARY KEY (`store_id`); -- -- Indexes for table `supplier_list` -- ALTER TABLE `supplier_list` ADD PRIMARY KEY (`id`); -- -- Indexes for table `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `email` (`email`), ADD KEY `user_store` (`store_id`); -- -- Indexes for table `user_phone` -- ALTER TABLE `user_phone` ADD PRIMARY KEY (`id`), ADD KEY `user_fk` (`user_id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `category_list` -- ALTER TABLE `category_list` MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16; -- -- AUTO_INCREMENT for table `customer_list` -- ALTER TABLE `customer_list` MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=32; -- -- AUTO_INCREMENT for table `inventory` -- ALTER TABLE `inventory` MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=82; -- -- AUTO_INCREMENT for table `permissible_users_list` -- ALTER TABLE `permissible_users_list` MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; -- -- AUTO_INCREMENT for table `product_list` -- ALTER TABLE `product_list` MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26; -- -- AUTO_INCREMENT for table `receiving_list` -- ALTER TABLE `receiving_list` MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14; -- -- AUTO_INCREMENT for table `sales_list` -- ALTER TABLE `sales_list` MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17; -- -- AUTO_INCREMENT for table `supplier_list` -- ALTER TABLE `supplier_list` MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14; -- -- AUTO_INCREMENT for table `users` -- ALTER TABLE `users` MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=37; -- -- AUTO_INCREMENT for table `user_phone` -- ALTER TABLE `user_phone` MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; -- -- Constraints for dumped tables -- -- -- Constraints for table `inventory` -- ALTER TABLE `inventory` ADD CONSTRAINT `inventory_product` FOREIGN KEY (`product_id`) REFERENCES `product_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `permissible_users_list` -- ALTER TABLE `permissible_users_list` ADD CONSTRAINT `permissible_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `product_list` -- ALTER TABLE `product_list` ADD CONSTRAINT `category_fk` FOREIGN KEY (`category_id`) REFERENCES `category_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `supplier_fk` FOREIGN KEY (`supplier_id`) REFERENCES `supplier_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `receiving_list` -- ALTER TABLE `receiving_list` ADD CONSTRAINT `receiving_supplier` FOREIGN KEY (`supplier_id`) REFERENCES `supplier_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `sales_list` -- ALTER TABLE `sales_list` ADD CONSTRAINT `sale_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `users` -- ALTER TABLE `users` ADD CONSTRAINT `user_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `user_phone` -- ALTER TABLE `user_phone` ADD CONSTRAINT `user_fk` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
true
200eb73d04c5824aabb88b3bff6ee4ddc65a0fe6
SQL
otto-dlh/ProyectoFinal
/database/sp_Cursos.sql
UTF-8
476
4.09375
4
[]
no_license
USE `des`; DROP procedure IF EXISTS `sp_Cursos`; DELIMITER $$ USE `des`$$ CREATE PROCEDURE `sp_Cursos`( pUsuario INT ) BEGIN SELECT c.idCursos, c.Nombre, COUNT(dp.idCursos) TotalProyectos FROM cursos c INNER JOIN detallecurso dc ON c.idCursos = dc.idCurso INNER JOIN usuarios u ON dc.idUsuario = idUsuarios LEFT JOIN detalleproyecto dp ON c.idCursos = dp.idCursos WHERE u.idUsuarios = pUsuario GROUP BY c.idCursos, c.Nombre; END$$ DELIMITER ;
true
d388bffa4a1a0eb3e85d80ea04c1b057822108df
SQL
samuelg4133/BDIICinema
/Consultas.sql
UTF-8
6,037
4.1875
4
[]
no_license
use cinema; #3. Faça as seguintes consultas, e grave-as em um arquivo SQL para ser enviado. #a) Obter o nome e o ano de todos os filmes cadastrados no banco de dados select NomeFilme, AnoFilme from filme; #b) Obter a nacionalidade dos atores cadastrados no BD select distinct Nacionalidade from ator; #c) Obter o nome artístico e o nome real dos atores cadastrados no BD select NomeArtistico, NomeReal from ator; #d) Obter os personagens e os cachês pagos dos filmes cadastrados. select personagem, salario as cachê from personagem; #e) Obter o código e nome artístico dos atores que são do sexo feminino select CodAtor as Codigo, NomeArtistico as "Nome Artístico" from ator where sexo="F" ORDER BY NomeArtistico; #f) Obter o código e nome artístico dos atores que são do sexo feminino e que possuem idade entre 35 e 45 anos. select CodAtor as Código, NomeArtistico as "Nome Artístico" from ator where sexo="F" and (Idade>=35 && Idade<=45); #g) Obter o nome dos filmes em que o orçamento excede 8.000.000,00 select NomeFilme from filme where Orcamento>8000000; #h) Obter o número de filmes em que o ator de código ‘a1’ atuou. select count(CodFilme) as "Número de Filme(s)" from personagem where CodAtor="a1"; #i) Obter o nome dos filmes em que Jim Carrey atua. select f.NomeFilme from filme f, ator a, personagem p where p.CodAtor=a.CodAtor and p.CodFilme=f.CodFilme AND a.NomeArtistico="Jim Carrey"; #j) Obter o nome dos atores, nacionalidades e idades. select NomeReal as Nome, Nacionalidade, Idade from ator; #k) Obter o nome dos atores, personagens e correspondentes cachês. select distinct a.NomeArtistico, p.Personagem, p.Salario from ator a, personagem p where p.CodAtor=a.CodAtor; #l) Obter os nomes dos atores e o total de indicações de oscar recebidos por cada ator. select NomeArtistico, count(IndicacaoOscar) from ator group by NomeArtistico; #m) Obter o nome dos autores que não atuam em nenhum filme. select a.NomeArtistico from ator a where a.CodAtor not in (select p.CodAtor from personagem p); #n) Obter o código e o nome dos filmes em que Jim Carrey não atua. select f.CodFilme, F.NomeFilme from filme f where f.CodFilme not in(select f.CodFilme from filme f, ator a, personagem p where p.CodAtor=a.CodAtor and p.CodFilme=f.CodFilme AND a.NomeArtistico="Jim Carrey") order by f.NomeFilme; #o) Obter o nome artístico dos atores, bem como a média de ganho com cachês nos filmes que atuaram. select distinct a.NomeArtistico, sum(p.Salario)/count(p.Salario) from ator a, personagem p where p.CodAtor=a.CodAtor group by a.NomeArtistico; #p) Obter os dados dos atores que receberam algum Oscar. select a.* from ator a where Oscar is not null; #q) Obter o nome dos atores e suas respectivas idades, que têm idade maior do que a idade média de todos os atores do sexo masculino. select NomeArtistico, Idade from ator where sexo="M" and Idade>(select sum(Idade)/count(Idade) from ator); #r) Obter o ano do Primeiro filme onde Jim Carrey atuou, e o ano de seu último filme. select min(f.AnoFilme) as "Primeiro Filme", max(f.AnoFilme) as "Último Filme" from filme f, ator a, personagem p where p.CodAtor=a.CodAtor and p.CodFilme=f.CodFilme AND a.NomeArtistico="Jim Carrey" ; #s) Obter o número de filmes em que atuou George Clooney. select count(f.CodFilme) from filme f, ator a, personagem p where p.CodAtor=a.CodAtor and p.CodFilme=f.CodFilme AND a.NomeArtistico="George Clooney"; #t) Obter o nome e o código dos filmes em que Tom Hanks e Matt Damon atuam juntos. select f.NomeFilme, f.CodFilme from filme f, ator a, personagem p where p.CodAtor=a.CodAtor and p.CodFilme=f.CodFilme AND a.NomeArtistico="Tom Hanks " and f.CodFilme in (select f.CodFilme from filme f, ator a, personagem p where p.CodAtor=a.CodAtor and p.CodFilme=f.CodFilme AND a.NomeArtistico="Matt Damon"); #u) Obter o nome dos filmes que Tom Hanks atua, mas Matt Damon não atua. select f.NomeFilme, f.CodFilme from filme f, ator a, personagem p where p.CodAtor=a.CodAtor and p.CodFilme=f.CodFilme AND a.NomeArtistico="Tom Hanks " and f.CodFilme not in (select f.CodFilme from filme f, ator a, personagem p where p.CodAtor=a.CodAtor and p.CodFilme=f.CodFilme AND a.NomeArtistico="Matt Damon"); #v) Obter o nome dos atores que atuam em algum filme que Jim Carrey atua. select distinct a.NomeArtistico from Ator a, Filme f, Personagem p where a.CodAtor = p.CodAtor and f.CodFilme = p.CodFilme and a.NomeArtistico <> 'Jim Carrey' and f.CodFilme in (select f.CodFilme from Ator a, Filme f, Personagem p where a.CodAtor = p.CodAtor and f.CodFilme = p.CodFilme and a.NomeArtistico = 'Jim Carrey') order by a.NomeArtistico; #w) Obter o nome dos atores que atuam em algum filme que Jim Carrey não atua. select distinct a.NomeArtistico from Ator a, Filme f, Personagem p where a.CodAtor = p.CodAtor and f.CodFilme = p.CodFilme and a.NomeArtistico <> 'Jim Carrey' and f.CodFilme in (select f.CodFilme from Ator a, Filme f, Personagem p where a.CodAtor = p.CodAtor and f.CodFilme = p.CodFilme and a.NomeArtistico <> 'Jim Carrey') order by a.NomeArtistico; #4. Utilizando as consultas UPDATE e DELETE, faça as seguintes consultas e grave-as em um arquivo SQL para ser enviado. #a) Atualize os valores dos cachês de todos os atores para 100.000. use cinema; update personagem set salario=100000 where salario>0; #b) Atualize a tabela ATOR alterando a sigla USA referente à nacionalidade dos atores para “EUA”. update ator set Nacionalidade="EUA" where Nacionalidade="USA"; #c) Altere o ano de lançamento do filme “A Máscara do Zorro” para 2001. update filme set AnoFilme=2001 where NomeFilme like "A Máscara do Zorro"; #d) Acrescente mais 10 anos à idade de todos os atores que são do sexo “Masculino”. update ator set idade=idade+10 where Sexo="M"; select idade from ator; #e) Exclua o ator de código ‘a22’. delete from ator where CodAtor='a22'; #f) Tente remover o ator de código a1 e verifique a mensagem informado pelo MySQL. DELETE FROM ATOR WHERE CodAtor='a1'; #Não é possível excluir pq possui chave estrangeira ativa
true
0a7c4a517d2d7b60472049b8f9b25245acccbc9f
SQL
ABOGABOGI/Biller_Adapter
/src/sql/biller.sql
UTF-8
1,723
2.75
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : Dolly Source Server Version : 100120 Source Host : 192.168.180.156:3306 Source Database : switching Target Server Type : MYSQL Target Server Version : 100120 File Encoding : 65001 Date: 2017-08-29 10:25:38 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for biller -- ---------------------------- DROP TABLE IF EXISTS `biller`; CREATE TABLE `biller` ( `BillerId` int(11) NOT NULL AUTO_INCREMENT, `ARMId` int(11) DEFAULT NULL, `BillerName` varchar(200) DEFAULT NULL, `Status` tinyint(1) DEFAULT NULL, `CreatedBy` varchar(50) DEFAULT NULL, `CreatedDate` datetime DEFAULT NULL, `ModifiedBy` varchar(50) DEFAULT NULL, `ModifiedDate` datetime DEFAULT NULL, PRIMARY KEY (`BillerId`) ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1; -- ---------------------------- -- Records of biller -- ---------------------------- INSERT INTO `biller` VALUES ('1', null, 'Pesona Cipta Utama', '1', 'lorensius.simanjuntak', '2017-07-24 15:43:23', null, null); INSERT INTO `biller` VALUES ('2', null, 'DOKU', '1', 'lorensius.simanjuntak', '2017-07-24 15:44:26', null, null); INSERT INTO `biller` VALUES ('3', null, 'Telesindo', '1', 'lorensius.simanjuntak', '2017-03-20 17:14:00', null, null); INSERT INTO `biller` VALUES ('4', null, 'Pesona Postpaid', '1', 'yogie.yabie', '2017-08-25 15:52:22', null, null); INSERT INTO `biller` VALUES ('5', null, 'Jatelindo', '1', 'dika.atrariksa', '2017-07-24 15:46:07', null, null); INSERT INTO `biller` VALUES ('6', null, 'Jatelindo Kartu Halo', '1', 'dika.atrariksa', '2017-08-25 16:10:23', null, null); SET FOREIGN_KEY_CHECKS=1;
true
518d2c355aca278fa55acffa02460a04aff77fce
SQL
Deerluluolivia/education-highschool-public
/experiments/features/LOOKUP_feature_category.sql
UTF-8
273
2.75
3
[ "MIT" ]
permissive
/* schema creation for feature lookup table _feature_category.csv */ CREATE TABLE wake._feature_category ( feature_name VARCHAR(255) NOT NULL, table_name VARCHAR(255) NOT NULL, feature_category_primary VARCHAR(255) NOT NULL, exclude_when_modeling INTEGER NOT NULL );
true
5f430dccb872ce89c99e552c58320c02104601c8
SQL
Ares7/2013-JUL-Module-7
/Task 05/Anzhela_Papova_labwork05/dw/tables/t_countries/vl_countries.sql
UTF-8
1,054
3
3
[]
no_license
--drop view dw.vl_countries; --============================================================== -- View: vl_countries --============================================================== create or replace view dw.vl_countries as SELECT geo_id , country_id , country_code_a2 , country_code_a3 , country_desc , localization_id FROM lc_countries; comment on table dw.vl_countries is 'Localazible View: T_CONTINENTS'; comment on column dw.vl_countries.geo_id is 'Unique ID for All Geography objects'; comment on column dw.vl_countries.country_id is 'ID Code of Country'; comment on column dw.vl_countries.country_code_a2 is 'Code of Countries - ALPHA 2'; comment on column dw.vl_countries.country_code_a3 is 'Code of Countries - ALPHA 3'; comment on column dw.vl_countries.country_desc is 'Description of Countries'; comment on column dw.vl_countries.localization_id is 'Identificator of Supported References Languages'; grant DELETE,INSERT,UPDATE,SELECT on dw.vl_countries to dw_cl;
true
0c5739d11c635c574a5439f09119bae016f312d5
SQL
daidai21/Leetcode
/DataBase/178-Rank_Scores.SQL
UTF-8
406
4.25
4
[]
no_license
SELECT s1.score 'Score', COUNT( DISTINCT s2.score) 'Rank' FROM Scores s1 INNER JOIN Scores s2 ON s1.score <= s2.score GROUP BY s1.id, s1.score ORDER BY s1.score DESC; SELECT Score, ( SELECT COUNT( DISTINCT Score ) FROM Scores WHERE Score >= s.Score ) Rank FROM Scores s ORDER BY Score desc;
true
a6e58cc71ad80766f395dd7229ad906dc113da81
SQL
PCinkusz/Python
/baza2.sql
UTF-8
786
3
3
[]
no_license
create database baza; create table Pupil (`pupil_id` int primary key , `name` varchar(45), `surname` varchar(45), `pesel` varchar(45), `class` varchar(45)); create table Teacher (`teacher_id` int primary key, `name` varchar(45), `surname` varchar(45), `pesel` int, `subject` varchar(45)); create table Subject (`subject_id` int primary key, `name` varchar(45)); create table Grade (`pupil_id` int REFERENCES Pupil(pupil_id),`value` int, `weight` int) create table Pupil_Subject(`pupil_id` int REFERENCES Pupil(pupil_id),`subject_id` int REFERENCES Subject(subject_id)) create table Pupil_Teacher(`pupil_id` int REFERENCES Pupil(pupil_id),`teacher_id` int REFERENCES Teacher(teacher_id)) ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root'; flush privileges;
true
300b6aa7b28a644e6d5e8c1fb81cf5f7244477e1
SQL
hardaker-dev/sfgweb
/SaasFeeGuides/SaasFeeGuides.Database.Deploy/Scripts/33a_CreateTable_CustomerBookingAudit.sql
UTF-8
655
3.53125
4
[]
no_license
set xact_abort on BEGIN TRAN CREATE TABLE [Activities].[CustomerBookingAudit]( [CustomerId] [int] NOT NULL, [ActivitySkuDateId] int not null, [HasConfirmed] bit not null, [HasPaid] bit not null, [HasCancelled] bit not null, [NumPersons] int not null, [PriceAgreed] float not null, [Modified] datetime not null ) CREATE NONCLUSTERED INDEX CIX_CustomerBookingAudit ON [Activities].[CustomerBookingAudit] (ActivitySkuDateId,CustomerId); ALTER TABLE [Activities].[CustomerBookingAudit] ADD CONSTRAINT FK_CustomerBookingAudit_CustomerId FOREIGN KEY ([CustomerId]) REFERENCES Activities.Customer(Id) COMMIT TRAN
true
afad4878b9d7ea8dd296e5840251ab51433cc856
SQL
bluefatty-hua/huajingtong
/jobs_sql/dw/bb/dw_bb_month.sql
UTF-8
1,761
3.90625
4
[]
no_license
-- 汇总维度 月-公会—主播 -- 汇总指标 开播天数,开播时长,虚拟币收入 -- DROP TABLE IF EXISTS warehouse.dw_month_bb_anchor_live; -- CREATE TABLE warehouse.dw_month_bb_anchor_live AS DELETE FROM warehouse.dw_bb_month_anchor_live WHERE dt = '{month}'; INSERT INTO warehouse.dw_bb_month_anchor_live ( `dt`, `platform_id`, `platform_name`, `backend_account_id`, `anchor_uid`, `contract_status`, `newold_state`, `active_state`, `revenue_level`, `live_days`, `duration`, `revenue`, `revenue_orig` ) SELECT '{month}' AS dt, al.platform_id, al.platform_name, al.backend_account_id, al.anchor_uid, if(sum(if(contract_status!=2,1,0))>0,0,2) as contract_status, -- 月内有非2(非签约),都算在约 al.month_newold_state AS newold_state, al.active_state, al.revenue_level, COUNT(CASE WHEN al.live_status = 1 THEN al.dt ELSE NULL END) AS live_days, SUM(al.duration) AS duration, SUM(al.revenue) AS revenue, SUM(al.revenue_orig) AS revenue_orig FROM (SELECT *, warehouse.ANCHOR_NEW_OLD(min_live_dt, min_sign_dt, LAST_DAY(dt), 180) AS month_newold_state FROM warehouse.dw_bb_day_anchor_live WHERE dt >= '{month}' AND dt < '{month}' + INTERVAL 1 MONTH ) al GROUP BY al.platform_id, al.platform_name, al.backend_account_id, al.anchor_uid, al.month_newold_state, al.active_state, al.revenue_level ;
true
ed5a2e7e5b641b919a8d7166e516e1ac46ab8f7b
SQL
KseniyaST/CakeLand
/cakeland.sql
UTF-8
8,350
3.359375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.1 -- http://www.phpmyadmin.net -- -- Хост: 127.0.0.1 -- Время создания: Апр 27 2018 г., 10:33 -- Версия сервера: 5.5.25 -- Версия PHP: 5.2.12 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; -- -- База данных: `cakeland` -- -- -------------------------------------------------------- -- -- Структура таблицы `cake` -- CREATE TABLE IF NOT EXISTS `cake` ( `id` int(2) NOT NULL AUTO_INCREMENT, `name` varchar(50) NOT NULL DEFAULT 'no' COMMENT 'название пироженки', `price` int(11) NOT NULL COMMENT 'цена', `sostav` varchar(255) NOT NULL DEFAULT 'no' COMMENT 'состав', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=15 ; -- -- Дамп данных таблицы `cake` -- INSERT INTO `cake` (`id`, `name`, `price`, `sostav`) VALUES (1, 'Торт «Бейлис»', 850, 'Четыре слоя белого бисквита пропитаны кофейным сиропом. Крем масляный кофейный. Желе молочное с ликером "Бейлис". Торт оформлен шоколадным кремом и кофейным гляссажем.'), (2, 'Торт "Уже можно"', 800, 'Бисквит с фундуком и уваренной в специях грушей. Крем заварной апельсиново-лимонный, желе на красном вине со специями. Поверхность покрыта шоколадным гляссажем и оформлена малазийским хворостом – квикараз.'), (3, 'Торт "Я худею"', 1000, 'Нежный бисквит, сливочный крем, йогурт, свежие яблоки и ягоды черники'), (5, 'Торт "Дали с клубникой"', 1000, 'Бисквит с добавлением японского чая "Маття", который придаёт ему насыщенный зелёный цвет. Клубничное желе, клубничное кремё с белым шоколадом. Кокосовый мусс с итальянской меренгой. Торт покрыт гляссажем. '), (6, 'Ягодный творожник', 600, 'Основа из песочного печенья. Пирог из творога, сыра «Маскарпоне», с добавлением белого шоколада. Поверхность оформлена сливками и свежей ягодой.'), (7, 'Торт "Дали с клубникой"', 1000, 'Бисквит с добавлением японского чая "Маття", который придаёт ему насыщенный зелёный цвет. Клубничное желе, клубничное кремё с белым шоколадом. Кокосовый мусс с итальянской меренгой. Торт покрыт гляссажем. '), (8, 'Ягодный творожник', 600, 'Основа из песочного печенья. Пирог из творога, сыра «Маскарпоне», с добавлением белого шоколада. Поверхность оформлена сливками и свежей ягодой.'), (9, 'Торт "Тирамису"', 700, 'Подложка из тонкого рулетного бисквита. Бисквитные палочки, обильно пропитанные кофейным сиропом с ликером. Крем сырный.'), (10, 'Торт-конфета «Маракуйя в шоколаде»', 600, 'Шоколадный бисквит, обильно пропитанный экзотическим пуншем. Прослойка: ганаш из маракуйи, сливок и молочного шоколада. Поверхность оформлена шоколадным гляссажем.'), (11, 'Торт "Оригинальный"', 650, 'Сметанный бисквит с добавлением грецкого ореха и мака. Прослоен масляно- сметанным кремом. Сверху заглазирован шоколадной глазурью. Оформление: сливочный крем, курага, орех, мак, чернослив, мармелад.'), (12, 'Торт "Арктика"', 550, 'Два слоя белого бисквита и один слой безе прослоены кремом из сливок, вареной сгущенкой и грецким орехом. Торт обсыпан кусочками безе.'), (13, 'Торт “Сюрприз”', 850, 'Семь слоёв тонкого масляного бисквита, воздушно-орехового п/ф, прослоенного сливочно-шоколадным кремом. Оформление: масло, грецкий орех.'), (14, 'Торт "Соблазн"', 500, 'Слой белого бисквита, на который горкой укладываются заварные эклеры и чернослив, соединенные легким кремом из сухого молока, сливочного масла и сахарной пудры. Торт покрыт белым ганашем и посыпан шоколадной крошкой. Украшен физалисом, красной черешней и '); -- -------------------------------------------------------- -- -- Структура таблицы `order` -- CREATE TABLE IF NOT EXISTS `order` ( `id` int(6) NOT NULL AUTO_INCREMENT, `userid` int(6) NOT NULL COMMENT 'ид пользователя', PRIMARY KEY (`id`), KEY `userid` (`userid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=5 ; -- -- Дамп данных таблицы `order` -- INSERT INTO `order` (`id`, `userid`) VALUES (1, 1), (2, 2); -- -------------------------------------------------------- -- -- Структура таблицы `orderitem` -- CREATE TABLE IF NOT EXISTS `orderitem` ( `id` int(6) NOT NULL AUTO_INCREMENT, `cakeid` int(6) NOT NULL COMMENT 'ид пользователя', `orderid` int(6) NOT NULL COMMENT 'ид пользователя', PRIMARY KEY (`id`), KEY `orderid` (`orderid`), KEY `cakeid` (`cakeid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=10 ; -- -- Дамп данных таблицы `orderitem` -- INSERT INTO `orderitem` (`id`, `cakeid`, `orderid`) VALUES (1, 1, 1), (2, 1, 2), (3, 2, 1), (4, 2, 2), (5, 3, 1), (6, 3, 2); -- -------------------------------------------------------- -- -- Структура таблицы `user` -- CREATE TABLE IF NOT EXISTS `user` ( `id` int(2) NOT NULL AUTO_INCREMENT, `login` varchar(50) NOT NULL DEFAULT 'no' COMMENT 'логин', `password` varchar(50) NOT NULL DEFAULT 'no' COMMENT 'пароль', `admin` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'роль пользователя', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=6 ; -- -- Дамп данных таблицы `user` -- INSERT INTO `user` (`id`, `login`, `password`, `admin`) VALUES (1, 'admin', 'admin', 1), (2, 'ololosha', '12345', 0); -- -- Ограничения внешнего ключа сохраненных таблиц -- -- -- Ограничения внешнего ключа таблицы `order` -- ALTER TABLE `order` ADD CONSTRAINT `Order_ibfk_1` FOREIGN KEY (`userid`) REFERENCES `user` (`id`); -- -- Ограничения внешнего ключа таблицы `orderitem` -- ALTER TABLE `orderitem` ADD CONSTRAINT `OrderItem_ibfk_1` FOREIGN KEY (`orderid`) REFERENCES `order` (`id`), ADD CONSTRAINT `OrderItem_ibfk_2` FOREIGN KEY (`cakeid`) REFERENCES `cake` (`id`); /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
true
12595b930824b0eacaa54d180587de1192e2f35b
SQL
apoyl/LycPHP
/Test/messages.sql
UTF-8
1,340
3.09375
3
[ "Apache-2.0" ]
permissive
-- phpMyAdmin SQL Dump -- version 3.2.0.1 -- http://www.phpmyadmin.net -- -- 主机: localhost -- 生成日期: 2011 年 03 月 22 日 07:57 -- 服务器版本: 5.1.36 -- PHP 版本: 5.2.2 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; -- -- 数据库: `guestbook` -- -- -------------------------------------------------------- -- -- 表的结构 `messages` -- CREATE TABLE IF NOT EXISTS `messages` ( `message_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `nickname` varchar(50) NOT NULL, `content` text NOT NULL, `dateline` int(10) unsigned NOT NULL, PRIMARY KEY (`message_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=31 ; -- -- 转存表中的数据 `messages` -- INSERT INTO `messages` (`message_id`, `nickname`, `content`, `dateline`) VALUES (29, 'dd', 'dd', 1292387616), (30, 'lyctestd', 'neirongsss', 123442333), (27, 'sfd', 'asafa', 1280542980), (28, 'sf', 'saf', 1280542984), (25, 'sadf', 'asf', 1280539321), (26, 'safd', 'sadf', 1280542977), (22, '游客', 'sdf', 1281946939), (21, '游客', 'dd', 1281941358), (23, '单调', '的', 1282011345), (24, 'sdaf', 'dsaf', 1282612181);
true
00f503ec6eed2ad7aa6f6beb8d0310b32f89bcb9
SQL
WWWWYYYY/fbs-lock
/mysql-lock/src/main/resources/db_lock.sql
UTF-8
637
2.671875
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : mac Source Server Type : MySQL Source Server Version : 50639 Source Host : localhost Source Database : fbs_lock Target Server Type : MySQL Target Server Version : 50639 File Encoding : utf-8 Date: 05/11/2019 22:39:09 PM */ SET NAMES utf8; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for `db_lock` -- ---------------------------- DROP TABLE IF EXISTS `db_lock`; CREATE TABLE `db_lock` ( `id` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET FOREIGN_KEY_CHECKS = 1;
true
98f40d60520cead576102edfedb73cd934c16552
SQL
HelloJasonZ/bank
/bankERP/bankerp.sql
UTF-8
20,812
2.765625
3
[ "Apache-2.0" ]
permissive
/* Navicat MySQL Data Transfer Source Server : MyTest Source Server Version : 50704 Source Host : localhost:3306 Source Database : bankerp Target Server Type : MYSQL Target Server Version : 50704 File Encoding : 65001 Date: 2016-08-25 17:10:52 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for `account` -- ---------------------------- DROP TABLE IF EXISTS `account`; CREATE TABLE `account` ( `ac_id` int(11) NOT NULL AUTO_INCREMENT, `ac_number` varchar(19) NOT NULL, `ac_password` varchar(20) NOT NULL, `cus_id` int(11) NOT NULL, `ac_currency` varchar(20) DEFAULT NULL, `ac_balance` decimal(16,2) DEFAULT NULL, `ac_create_time` datetime DEFAULT NULL, `ac_create_address` varchar(50) DEFAULT NULL, `ac_state` bit(1) DEFAULT NULL, `t_id` int(11) DEFAULT NULL, `is_delete` bit(1) DEFAULT NULL, PRIMARY KEY (`ac_id`) ) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of account -- ---------------------------- INSERT INTO `account` VALUES ('24', '6226020160815000953', '49ba59abbe56e057', '20160812', 'CNY', '4878000.00', '2016-07-15 00:10:06', '广东省深圳市', '', '5', ''); INSERT INTO `account` VALUES ('25', '6226020160815001012', '49ba59abbe56e057', '20160812', 'CNY', '51000.00', '2016-08-15 00:10:21', '广东省深圳市', '', '5', ''); INSERT INTO `account` VALUES ('26', '6226020160815001028', '49ba59abbe56e057', '20160812', 'CNY', '7000.00', '2016-08-15 00:10:36', '广东省深圳市', '', '5', ''); INSERT INTO `account` VALUES ('27', '6226020160815094001', '49ba59abbe56e057', '20160812', 'CNY', '0.00', '2016-08-15 09:40:09', '广东省深圳市', '', '5', ''); INSERT INTO `account` VALUES ('28', '6226020160815094037', '49ba59abbe56e057', '20160812', 'CNY', '0.00', '2016-08-15 09:40:44', '广东省深圳市', '', '5', ''); INSERT INTO `account` VALUES ('29', '6226020160815094049', '49ba59abbe56e057', '20160812', 'CNY', '999744.00', '2016-08-15 09:40:56', '广东省深圳市', '', '5', ''); INSERT INTO `account` VALUES ('30', '6226020160815094108', '49ba59abbe56e057', '20160812', 'CNY', '0.00', '2016-08-15 09:41:16', '广东省深圳市', '', '5', ''); INSERT INTO `account` VALUES ('31', '6226020160815094125', '49ba59abbe56e057', '20160812', 'CNY', '988.00', '2016-08-15 09:41:33', '广东省深圳市', '', '5', ''); INSERT INTO `account` VALUES ('32', '6226020160815094956', '49ba59abbe56e057', '20160813', 'CNY', '0.00', '2016-08-15 09:50:04', '广东省深圳市', '', '5', ''); INSERT INTO `account` VALUES ('33', '6226020160815095009', '49ba59abbe56e057', '20160813', 'CNY', '100.00', '2016-08-15 09:50:16', '广东省深圳市', '', '5', ''); INSERT INTO `account` VALUES ('34', '6226020160815095020', '49ba59abbe56e057', '20160813', 'CNY', '389673.00', '2016-08-15 09:50:33', '广东省深圳市', '', '5', ''); INSERT INTO `account` VALUES ('35', '6226020160815095038', '49ba59abbe56e057', '20160813', 'CNY', '5544.00', '2016-08-15 09:50:45', '广东省深圳市', '', '5', ''); INSERT INTO `account` VALUES ('36', '6226020160815095052', '49ba59abbe56e057', '20160813', 'CNY', '1621.00', '2016-08-22 09:50:58', '广东省深圳市', '', '5', ''); INSERT INTO `account` VALUES ('37', '6226020160815110237', '49ba59abbe56e057', '20160812', 'CNY', '60000.00', '2016-08-22 11:02:55', '广东省深圳市', '', '5', ''); INSERT INTO `account` VALUES ('38', '6226020160815113109', '49ba59abbe56e057', '20160815', 'CNY', '566600000.00', '2016-08-22 11:31:17', '广东省深圳市', '', '5', ''); INSERT INTO `account` VALUES ('39', '6226020160817155347', '13955235245b2497', '20160818', 'CNY', '0.00', '2016-08-22 15:53:50', '广东省深圳市', '', '6', ''); INSERT INTO `account` VALUES ('40', '6226020160817155357', '13955235245b2497', '20160818', 'CNY', '0.00', '2016-08-22 15:53:59', '广东省深圳市', '', '6', ''); -- ---------------------------- -- Table structure for `authority` -- ---------------------------- DROP TABLE IF EXISTS `authority`; CREATE TABLE `authority` ( `aut_id` int(11) NOT NULL AUTO_INCREMENT, `aut_content` varchar(10) DEFAULT NULL, `is_delete` bit(1) DEFAULT NULL, PRIMARY KEY (`aut_id`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of authority -- ---------------------------- INSERT INTO `authority` VALUES ('1', '柜员', ''); INSERT INTO `authority` VALUES ('2', '主管', ''); INSERT INTO `authority` VALUES ('3', '经理', ''); -- ---------------------------- -- Table structure for `customer` -- ---------------------------- DROP TABLE IF EXISTS `customer`; CREATE TABLE `customer` ( `cus_id` int(11) NOT NULL AUTO_INCREMENT, `cus_name` varchar(10) NOT NULL, `cus_password` varchar(18) NOT NULL, `cus_phone` varchar(12) DEFAULT NULL, `cus_idcard` varchar(18) NOT NULL, `cus_email` varchar(50) DEFAULT NULL, `cus_address` varchar(50) DEFAULT NULL, `cus_state` bit(1) DEFAULT NULL, `cus_create_time` datetime DEFAULT NULL, `cus_login_time` datetime DEFAULT NULL, `t_id` int(11) DEFAULT NULL, `is_delete` bit(1) DEFAULT NULL, PRIMARY KEY (`cus_id`) ) ENGINE=InnoDB AUTO_INCREMENT=20160819 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of customer -- ---------------------------- INSERT INTO `customer` VALUES ('20160812', '刘奇奇', '49ba59abbe56e057', '13266873662', '360732199403045123', 'liuqiqi@163.com', '广东省深圳市', '', '2016-08-15 00:04:25', '2016-08-15 12:40:02', '5', ''); INSERT INTO `customer` VALUES ('20160813', '张关强', '49ba59abbe56e057', '13820080808', '403207199408135113', 'zhangguanqiang@163.com', '广东省深圳市', '', '2016-08-15 00:08:04', '2016-08-15 10:44:13', '5', ''); INSERT INTO `customer` VALUES ('20160814', '王向阳', '49ba59abbe56e057', '13658964785', '341224199402565489', 'wxy@163.com', '广东省深圳市', '', '2016-08-15 07:41:01', '2016-08-15 11:08:41', '5', ''); INSERT INTO `customer` VALUES ('20160815', '朱文杰', '49ba59abbe56e057', '15219956482', '360732199403045124', 'zwj@163.com', '广东省深圳市', '', '2016-08-15 11:11:49', '2016-08-15 11:31:00', '5', ''); INSERT INTO `customer` VALUES ('20160816', '苏剑丰', '49ba59abbe56e057', '15268552222', '695547852256522222', 'sjf@163.com', '广东省深圳市', '', '2016-08-15 11:16:36', '2016-08-15 11:16:36', '5', ''); INSERT INTO `customer` VALUES ('20160817', '魏国栋', '49ba59abbe56e057', '15555555555', '954741224758888787', 'wgd@163.com', '广东省深圳市', '', '2016-08-15 11:17:52', '2016-08-15 11:17:52', '5', ''); INSERT INTO `customer` VALUES ('20160818', ' 王海', '49ba59abbe56e057', '15622966165', '622826199410110014', '471819072@qq.com', '陕西省西安', '', '2016-08-17 10:41:23', '2016-08-17 15:53:14', '5', ''); -- ---------------------------- -- Table structure for `teller` -- ---------------------------- DROP TABLE IF EXISTS `teller`; CREATE TABLE `teller` ( `t_id` int(11) NOT NULL AUTO_INCREMENT, `t_number` mediumtext NOT NULL, `t_name` varchar(10) NOT NULL, `t_password` varchar(18) NOT NULL, `aut_id` int(11) DEFAULT NULL, `t_login_time` datetime DEFAULT NULL, `is_delete` bit(1) DEFAULT NULL, PRIMARY KEY (`t_id`) ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of teller -- ---------------------------- INSERT INTO `teller` VALUES ('1', '2012546454', 'admin', '49ba59abbe56e057', '3', '2016-08-22 16:58:19', ''); INSERT INTO `teller` VALUES ('4', '2012546455', 'zgq', '49ba59abbe56e057', '2', '2016-08-17 15:49:27', ''); INSERT INTO `teller` VALUES ('5', '2012546456', 'wyj', '49ba59abbe56e057', '1', '2016-08-17 10:50:23', ''); INSERT INTO `teller` VALUES ('6', '2012546457', 'hello', '49ba59abbe56e057', '1', '2016-08-17 15:52:57', ''); -- ---------------------------- -- Table structure for `transactions` -- ---------------------------- DROP TABLE IF EXISTS `transactions`; CREATE TABLE `transactions` ( `tr_id` int(11) NOT NULL AUTO_INCREMENT, `tr_number` varchar(20) NOT NULL, `ac_number` varchar(19) DEFAULT NULL, `cus_id` int(11) DEFAULT NULL, `tr_balance` decimal(19,2) DEFAULT NULL, `tr_time` datetime DEFAULT NULL, `tr_type` int(11) DEFAULT NULL, `tr_address` varchar(50) DEFAULT NULL, `is_delete` bit(1) DEFAULT NULL, PRIMARY KEY (`tr_id`) ) ENGINE=InnoDB AUTO_INCREMENT=88 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of transactions -- ---------------------------- INSERT INTO `transactions` VALUES ('34', '09531471191054187', '6226020160815000953', '20160812', '5000000.00', '2016-08-15 00:10:54', '2', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('35', '09531471191065772', '6226020160815000953', '20160812', '10000.00', '2016-08-15 00:11:05', '1', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('36', '09531471191136986', '6226020160815000953', '20160812', '54000.00', '2016-08-15 00:12:16', '1', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('37', '09531471191229510', '6226020160815000953', '20160812', '2000.00', '2016-08-15 00:13:49', '4', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('38', '09531471191229510', '6226020160815000953', '20160812', '2000.00', '2016-08-15 00:13:49', '3', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('39', '09531471191261901', '6226020160815000953', '20160812', '6000.00', '2016-08-15 00:14:21', '4', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('40', '09531471191261901', '6226020160815001012', '20160812', '6000.00', '2016-08-15 00:14:21', '3', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('41', '09531471192041844', '6226020160815000953', '20160812', '30000.00', '2016-08-15 00:27:21', '4', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('42', '09531471192041844', '6226020160815001012', '20160812', '30000.00', '2016-08-15 00:27:21', '3', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('43', '09531471192472262', '6226020160815000953', '20160812', '5000.00', '2016-08-15 00:34:32', '4', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('44', '09531471192472262', '6226020160815001012', '20160812', '5000.00', '2016-08-15 00:34:32', '3', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('45', '09531471193126790', '6226020160815000953', '20160812', '5000.00', '2016-08-15 00:45:26', '4', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('46', '09531471193126790', '6226020160815001012', '20160812', '5000.00', '2016-08-15 00:45:26', '3', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('47', '09531471193491939', '6226020160815000953', '20160812', '5000.00', '2016-08-15 00:51:31', '4', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('61', '09531471225018888', '6226020160815000953', '20160812', '1000.00', '2016-08-15 09:36:58', '4', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('62', '09531471225018888', '6226020160815001028', '20160812', '1000.00', '2016-08-15 09:36:58', '3', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('63', '40491471225315619', '6226020160815094049', '20160812', '1000000.00', '2016-08-15 09:41:55', '2', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('64', '40491471225347030', '6226020160815094049', '20160812', '256.00', '2016-08-15 09:42:27', '1', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('65', '41251471229615001', '6226020160815094125', '20160812', '222.00', '2016-08-15 10:53:35', '2', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('66', '41251471229725435', '6226020160815094125', '20160812', '100.00', '2016-08-15 10:55:25', '4', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('67', '41251471229725435', '6226020160815095009', '20160813', '100.00', '2016-08-15 10:55:25', '3', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('68', '41251471229947253', '6226020160815094125', '20160812', '250000.00', '2016-08-15 10:59:07', '2', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('69', '41251471229955822', '6226020160815094125', '20160812', '262.00', '2016-08-15 10:59:15', '1', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('70', '41251471229975002', '6226020160815094125', '20160812', '1000.00', '2016-08-15 10:59:35', '4', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('71', '41251471229975002', '6226020160815095052', '20160813', '1000.00', '2016-08-15 10:59:35', '3', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('72', '41251471229985394', '6226020160815094125', '20160812', '621.00', '2016-08-15 10:59:45', '4', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('73', '41251471229985394', '6226020160815095052', '20160813', '621.00', '2016-08-15 10:59:45', '3', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('74', '41251471229994459', '6226020160815094125', '20160812', '22.00', '2016-08-15 10:59:54', '1', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('75', '41251471230000686', '6226020160815094125', '20160812', '85000.00', '2016-08-15 11:00:00', '2', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('76', '41251471230006549', '6226020160815094125', '20160812', '62000.00', '2016-08-15 11:00:06', '2', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('77', '41251471230046438', '6226020160815094125', '20160812', '5544.00', '2016-08-15 11:00:46', '4', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('78', '41251471230046438', '6226020160815095038', '20160813', '5544.00', '2016-08-15 11:00:46', '3', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('79', '41251471230083671', '6226020160815094125', '20160812', '389673.00', '2016-08-15 11:01:23', '4', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('80', '41251471230083671', '6226020160815095020', '20160813', '389673.00', '2016-08-15 11:01:23', '3', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('81', '41251471230130214', '6226020160815094125', '20160812', '1000.00', '2016-08-15 11:02:10', '2', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('82', '41251471230148030', '6226020160815094125', '20160812', '12.00', '2016-08-15 11:02:28', '1', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('83', '31091471231887107', '6226020160815113109', '20160815', '566666666.00', '2016-08-15 11:31:27', '2', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('84', '31091471231940661', '6226020160815113109', '20160815', '5666.00', '2016-08-15 11:32:20', '1', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('85', '31091471231977741', '6226020160815113109', '20160815', '1000.00', '2016-08-15 11:32:57', '1', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('86', '31091471232042768', '6226020160815113109', '20160815', '60000.00', '2016-08-15 11:34:02', '4', '广东省深圳市', ''); INSERT INTO `transactions` VALUES ('87', '31091471232042768', '6226020160815110237', '20160812', '60000.00', '2016-08-15 11:34:02', '3', '广东省深圳市', ''); -- ---------------------------- -- Table structure for `transfer_info` -- ---------------------------- DROP TABLE IF EXISTS `transfer_info`; CREATE TABLE `transfer_info` ( `ti_id` int(11) NOT NULL AUTO_INCREMENT, `tr_number` varchar(20) DEFAULT NULL, `ti_out_num` varchar(19) NOT NULL, `ti_in_num` varchar(19) NOT NULL, `ti_balance` decimal(19,2) DEFAULT NULL, `ti_time` datetime DEFAULT NULL, `ti_state` bit(1) DEFAULT NULL, `ti_result` varchar(50) DEFAULT NULL, `is_delete` bit(1) DEFAULT NULL, PRIMARY KEY (`ti_id`) ) ENGINE=InnoDB AUTO_INCREMENT=48 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of transfer_info -- ---------------------------- INSERT INTO `transfer_info` VALUES ('10', '09531471191175958', '6226020160815000953', '6226020160815001012', '60000000.00', '2016-08-15 00:12:55', '', '转账失败', ''); INSERT INTO `transfer_info` VALUES ('11', '09531471191229510', '6226020160815000953', '6226020160815000953', '2000.00', '2016-08-15 00:13:49', '', '转账成功', ''); INSERT INTO `transfer_info` VALUES ('12', '09531471191261901', '6226020160815000953', '6226020160815001012', '6000.00', '2016-08-15 00:14:21', '', '转账成功', ''); INSERT INTO `transfer_info` VALUES ('13', '09531471192041844', '6226020160815000953', '6226020160815001012', '30000.00', '2016-08-15 00:27:21', '', '转账成功', ''); INSERT INTO `transfer_info` VALUES ('14', '09531471192472262', '6226020160815000953', '6226020160815001012', '5000.00', '2016-08-15 00:34:32', '', '转账成功', ''); INSERT INTO `transfer_info` VALUES ('15', '09531471193126790', '6226020160815000953', '6226020160815001012', '5000.00', '2016-08-15 00:45:26', '', '转账成功', ''); INSERT INTO `transfer_info` VALUES ('16', '09531471193208574', '6226020160815000953', '6226020160815001012', '50000000.00', '2016-08-15 00:46:48', '', '转账失败', ''); INSERT INTO `transfer_info` VALUES ('17', '09531471193491939', '6226020160815000953', '6226020160815001012', '5000.00', '2016-08-15 00:51:31', '', '转账成功', ''); INSERT INTO `transfer_info` VALUES ('18', '09531471193702420', '6226020160815000953', '6226020160815001012', '1000.00', '2016-08-15 00:55:02', '', '转账失败', ''); INSERT INTO `transfer_info` VALUES ('19', '09531471194030984', '6226020160815000953', '6226020160815001012', '1000.00', '2016-08-15 01:00:30', '', '转账失败', ''); INSERT INTO `transfer_info` VALUES ('20', '09531471195777300', '6226020160815000953', '6226020160815001012', '1200.00', '2016-08-15 01:29:37', '', '转账失败', ''); INSERT INTO `transfer_info` VALUES ('21', '09531471195957327', '6226020160815000953', '6226020160815001012', '1000.00', '2016-08-15 01:32:37', '', '转账失败', ''); INSERT INTO `transfer_info` VALUES ('22', '09531471196070857', '6226020160815000953', '6226020160815001015', '1000.00', '2016-08-15 01:34:30', '', '转账失败', ''); INSERT INTO `transfer_info` VALUES ('23', '09531471196279262', '6226020160815000953', '6226020160815001012', '1000.00', '2016-08-15 01:38:22', '', '转账失败', ''); INSERT INTO `transfer_info` VALUES ('24', '09531471196576718', '6226020160815000953', '6226020160815001012', '2000.00', '2016-08-15 01:42:56', '', '转账失败', ''); INSERT INTO `transfer_info` VALUES ('25', '09531471196776437', '6226020160815000953', '6226020160815001012', '1000.00', '2016-08-15 01:46:16', '', '转账失败', ''); INSERT INTO `transfer_info` VALUES ('26', '09531471196806665', '6226020160815000953', '6226020160815001012', '50000000.00', '2016-08-15 01:46:46', '', '转账失败', ''); INSERT INTO `transfer_info` VALUES ('27', '09531471196848409', '6226020160815000953', '6226020160815001028', '5000.00', '2016-08-15 01:47:28', '', '转账成功', ''); INSERT INTO `transfer_info` VALUES ('28', '09531471196867014', '6226020160815000953', '6226020160815001028', '5000000.00', '2016-08-15 01:47:47', '', '转账失败', ''); INSERT INTO `transfer_info` VALUES ('38', '09531471225018888', '6226020160815000953', '6226020160815001028', '1000.00', '2016-08-15 09:36:58', '', '转账成功', ''); INSERT INTO `transfer_info` VALUES ('39', '09531471225079713', '6226020160815000953', '6226020160815001012', '1000.00', '2016-08-15 09:37:59', '', '转账失败', ''); INSERT INTO `transfer_info` VALUES ('40', '41251471229725435', '6226020160815094125', '6226020160815095009', '100.00', '2016-08-15 10:55:25', '', '转账成功', ''); INSERT INTO `transfer_info` VALUES ('41', '41251471229823948', '6226020160815094125', '6226020160815095009', '200.00', '2016-08-15 10:57:03', '', '转账失败', ''); INSERT INTO `transfer_info` VALUES ('42', '41251471229975002', '6226020160815094125', '6226020160815095052', '1000.00', '2016-08-15 10:59:35', '', '转账成功', ''); INSERT INTO `transfer_info` VALUES ('43', '41251471229985394', '6226020160815094125', '6226020160815095052', '621.00', '2016-08-15 10:59:45', '', '转账成功', ''); INSERT INTO `transfer_info` VALUES ('44', '41251471230046438', '6226020160815094125', '6226020160815095038', '5544.00', '2016-08-15 11:00:46', '', '转账成功', ''); INSERT INTO `transfer_info` VALUES ('45', '41251471230083671', '6226020160815094125', '6226020160815095020', '389673.00', '2016-08-15 11:01:23', '', '转账成功', ''); INSERT INTO `transfer_info` VALUES ('46', '41251471230105157', '6226020160815094125', '6226020160815095020', '55.00', '2016-08-15 11:01:45', '', '转账失败', ''); INSERT INTO `transfer_info` VALUES ('47', '31091471232042768', '6226020160815113109', '6226020160815110237', '60000.00', '2016-08-15 11:34:02', '', '转账成功', '');
true
1bb0d3c0afe4644844d6fd9ee5b69208a4a83cd9
SQL
benrodenhaeuser/LS_180
/movies_5.sql
UTF-8
5,829
3.59375
4
[]
no_license
-- -- PostgreSQL database dump -- SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; SET search_path = public, pg_catalog; ALTER TABLE ONLY public.films DROP CONSTRAINT films_director_id_fkey; ALTER TABLE ONLY public.films DROP CONSTRAINT title_unique; ALTER TABLE ONLY public.directors DROP CONSTRAINT directors_pkey; ALTER TABLE public.directors ALTER COLUMN id DROP DEFAULT; DROP TABLE public.films; DROP SEQUENCE public.directors_id_seq; DROP TABLE public.directors; DROP EXTENSION plpgsql; DROP SCHEMA public; -- -- Name: public; Type: SCHEMA; Schema: -; Owner: - -- CREATE SCHEMA public; -- -- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: - -- COMMENT ON SCHEMA public IS 'standard public schema'; -- -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: - -- CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; -- -- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: - -- COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; SET search_path = public, pg_catalog; SET default_tablespace = ''; SET default_with_oids = false; -- -- Name: directors; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE directors ( id integer NOT NULL, name text NOT NULL, CONSTRAINT valid_name CHECK (((length(name) >= 1) AND ("position"(name, ' '::text) > 0))) ); -- -- Name: directors_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE directors_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: directors_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE directors_id_seq OWNED BY directors.id; -- -- Name: films; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE films ( title character varying(255) NOT NULL, year integer NOT NULL, genre character varying(100) NOT NULL, duration integer NOT NULL, director_id integer NOT NULL, CONSTRAINT title_length CHECK ((length((title)::text) >= 1)), CONSTRAINT year_range CHECK (((year >= 1900) AND (year <= 2100))) ); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY directors ALTER COLUMN id SET DEFAULT nextval('directors_id_seq'::regclass); -- -- Data for Name: directors; Type: TABLE DATA; Schema: public; Owner: - -- INSERT INTO directors VALUES (1, 'John McTiernan'); INSERT INTO directors VALUES (2, 'Michael Curtiz'); INSERT INTO directors VALUES (3, 'Francis Ford Coppola'); INSERT INTO directors VALUES (4, 'Michael Anderson'); INSERT INTO directors VALUES (5, 'Tomas Alfredson'); INSERT INTO directors VALUES (6, 'Mike Nichols'); INSERT INTO directors VALUES (7, 'Sidney Lumet'); INSERT INTO directors VALUES (8, 'Penelope Spheeris'); -- -- Name: directors_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- SELECT pg_catalog.setval('directors_id_seq', 8, true); -- -- Data for Name: films; Type: TABLE DATA; Schema: public; Owner: - -- INSERT INTO films VALUES ('Die Hard', 1988, 'action', 132, 1); INSERT INTO films VALUES ('Casablanca', 1942, 'drama', 102, 2); INSERT INTO films VALUES ('The Conversation', 1974, 'thriller', 113, 3); INSERT INTO films VALUES ('1984', 1956, 'scifi', 90, 4); INSERT INTO films VALUES ('Tinker Tailor Soldier Spy', 2011, 'espionage', 127, 5); INSERT INTO films VALUES ('The Birdcage', 1996, 'comedy', 118, 6); INSERT INTO films VALUES ('The Godfather', 1972, 'crime', 175, 3); INSERT INTO films VALUES ('12 Angry Men', 1957, 'drama', 96, 7); INSERT INTO films VALUES ('Wayne''s World', 1992, 'comedy', 95, 8); INSERT INTO films VALUES ('Let the Right One In', 2008, 'horror', 114, 4); -- -- Name: directors_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY directors ADD CONSTRAINT directors_pkey PRIMARY KEY (id); -- -- Name: title_unique; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY films ADD CONSTRAINT title_unique UNIQUE (title); -- -- Name: films_director_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY films ADD CONSTRAINT films_director_id_fkey FOREIGN KEY (director_id) REFERENCES directors(id); -- -- PostgreSQL database dump complete -- -- FROM 1-M to M-M: -- 1. the films table needs a fresh primary key column -- 2. create a join table with foreign keys -- 3. capture the existing 1toM relationships in the join table -- 4. drop the directors column from the films table INSERT INTO directors_films (director_id, film_id) VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (3, 7), (7, 8), (8, 9), (4, 10); -- show a list of films and their directors SELECT films.title, directors.name FROM films JOIN directors_films ON films.id = directors_films.film_id JOIN directors ON directors_films.director_id = directors.id ORDER BY films.title ASC; title, year, genre, duration, director INSERT INTO films (title, year, genre, duration) VALUES ('Fargo', 1996, 'comedy', 98), ('No Country for Old Men', 2007, 'western', 122), ('Sin City', 2005, 'crime', 124), ('Spy Kids', 2001, 'scifi', 88); INSERT INTO directors_films(film_id, director_id) VALUES (11, 9), (12, 9), (12, 10), (13, 11), (13, 12), (14, 12); -- Write a SQL statement that determines how many films each director in the database has directed. Sort the results by number of films (greatest first) and then name (in alphabetical order). SELECT directors.name AS director, count(films.id) AS films FROM directors JOIN directors_films ON directors.id = directors_films.director_id JOIN films ON directors_films.film_id = films.id GROUP BY directors.id ORDER BY count(films.id) DESC, directors.name ASC;
true
100b9cd24f1b62d33837c82517333a042a8725db
SQL
tygray6/Tech-Academy-Projects
/SQL Server Projects/SQLQuery1.sql
UTF-8
2,679
4.34375
4
[]
no_license
/* All information from the habitat table. */ SELECT * FROM tbl_habitat /* Retrieve all names from the species_name column that have a species_order value of 3. */ SELECT species_name FROM tbl_species WHERE species_order = 3 /* Retrieve only the nutrition_type from the nutrition table that have a nutrition_cost of 600.00 or less. */ SELECT nutrition_type FROM tbl_nutrition WHERE nutrition_cost <= 600 /* Retrieve all species_names with the nutrition_id between 2202 and 2206 from the nutrition table. */ SELECT species_name FROM tbl_species INNER JOIN tbl_nutrition ON tbl_species.species_nutrition = tbl_nutrition.nutrition_id WHERE nutrition_id BETWEEN 2202 AND 2206 /* Retrieve all names within the species_name column using the alias "Species Name:" from the species table and their corresponding nutrition_type under the alias "Nutrition Type:" from the nutrition table. */ SELECT species_name AS 'Species Name:', nutrition_type AS 'Nutrition Type:' FROM tbl_species INNER JOIN tbl_nutrition ON tbl_species.species_nutrition = tbl_nutrition.nutrition_id /* From the specialist table, retrieve the first and last name and contact number of those that provide care for the penguins from the species table. */ SELECT specialist_fname, specialist_lname, specialist_contact FROM tbl_species INNER JOIN tbl_care ON tbl_care.care_id = tbl_species.species_care INNER JOIN tbl_specialist ON tbl_care.care_specialist = tbl_specialist.specialist_id WHERE tbl_species.species_name = 'penguin' /* Create a database with two tables. Assign a foreign key constraint on one table that shares related data with the primary key on the second table. Finally, create a statement that queries data from both tables. */ CREATE TABLE staff ( staff_id INT PRIMARY KEY, staff_fname VARCHAR(30) NOT NULL, staff_lname VARCHAR(30) ); INSERT INTO staff (staff_id, staff_fname, staff_lname) VALUES (1,'Tyler','Gray'), (2, 'John','Smith'), (3, 'Trey','Walker'), (4, 'Jim','Thorpe'); CREATE TABLE contact ( contact_phone VARCHAR(50) PRIMARY KEY NOT NULL, contact_email VARCHAR(50) NOT NULL, fkstaff_id INT FOREIGN KEY REFERENCES staff(staff_id) NOT NULL ); INSERT INTO contact (contact_phone, contact_email, fkstaff_id) VALUES ('345-234-1123', 'you@mail.com', 1), ('456-897-4893', 'me@mail.com', 2), ('345-765-3490', 'him@mail.com', 3), ('120-248-6129', 'her@mail.com', 4); SELECT staff_fname AS 'First Name:', staff_lname AS 'Last Name:', contact_phone AS 'Phone Number:' FROM staff INNER JOIN contact ON staff.staff_id = contact.fkstaff_id DROP TABLE staff; DROP TABLE contact; SELECT * FROM staff SELECT * FROM contact
true
ad21f83bafee0e924be8910f03cd34c1b07826af
SQL
zhang555955/Django_studinfor_openpyxl
/SQLDATAtest/pro202.sql
UTF-8
16,484
3.296875
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : mysql Source Server Version : 80011 Source Host : localhost:3306 Source Database : pro202 Target Server Type : MYSQL Target Server Version : 80011 File Encoding : 65001 Date: 2020-12-19 17:26:03 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for auth_group -- ---------------------------- DROP TABLE IF EXISTS `auth_group`; CREATE TABLE `auth_group` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(150) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of auth_group -- ---------------------------- -- ---------------------------- -- Table structure for auth_group_permissions -- ---------------------------- DROP TABLE IF EXISTS `auth_group_permissions`; CREATE TABLE `auth_group_permissions` ( `id` int(11) NOT NULL AUTO_INCREMENT, `group_id` int(11) NOT NULL, `permission_id` int(11) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `auth_group_permissions_group_id_permission_id_0cd325b0_uniq` (`group_id`,`permission_id`), KEY `auth_group_permissio_permission_id_84c5c92e_fk_auth_perm` (`permission_id`), CONSTRAINT `auth_group_permissio_permission_id_84c5c92e_fk_auth_perm` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`), CONSTRAINT `auth_group_permissions_group_id_b120cbf9_fk_auth_group_id` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of auth_group_permissions -- ---------------------------- -- ---------------------------- -- Table structure for auth_permission -- ---------------------------- DROP TABLE IF EXISTS `auth_permission`; CREATE TABLE `auth_permission` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `content_type_id` int(11) NOT NULL, `codename` varchar(100) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `auth_permission_content_type_id_codename_01ab375a_uniq` (`content_type_id`,`codename`), CONSTRAINT `auth_permission_content_type_id_2f476e4b_fk_django_co` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of auth_permission -- ---------------------------- INSERT INTO `auth_permission` VALUES ('1', 'Can add log entry', '1', 'add_logentry'); INSERT INTO `auth_permission` VALUES ('2', 'Can change log entry', '1', 'change_logentry'); INSERT INTO `auth_permission` VALUES ('3', 'Can delete log entry', '1', 'delete_logentry'); INSERT INTO `auth_permission` VALUES ('4', 'Can view log entry', '1', 'view_logentry'); INSERT INTO `auth_permission` VALUES ('5', 'Can add permission', '2', 'add_permission'); INSERT INTO `auth_permission` VALUES ('6', 'Can change permission', '2', 'change_permission'); INSERT INTO `auth_permission` VALUES ('7', 'Can delete permission', '2', 'delete_permission'); INSERT INTO `auth_permission` VALUES ('8', 'Can view permission', '2', 'view_permission'); INSERT INTO `auth_permission` VALUES ('9', 'Can add group', '3', 'add_group'); INSERT INTO `auth_permission` VALUES ('10', 'Can change group', '3', 'change_group'); INSERT INTO `auth_permission` VALUES ('11', 'Can delete group', '3', 'delete_group'); INSERT INTO `auth_permission` VALUES ('12', 'Can view group', '3', 'view_group'); INSERT INTO `auth_permission` VALUES ('13', 'Can add user', '4', 'add_user'); INSERT INTO `auth_permission` VALUES ('14', 'Can change user', '4', 'change_user'); INSERT INTO `auth_permission` VALUES ('15', 'Can delete user', '4', 'delete_user'); INSERT INTO `auth_permission` VALUES ('16', 'Can view user', '4', 'view_user'); INSERT INTO `auth_permission` VALUES ('17', 'Can add content type', '5', 'add_contenttype'); INSERT INTO `auth_permission` VALUES ('18', 'Can change content type', '5', 'change_contenttype'); INSERT INTO `auth_permission` VALUES ('19', 'Can delete content type', '5', 'delete_contenttype'); INSERT INTO `auth_permission` VALUES ('20', 'Can view content type', '5', 'view_contenttype'); INSERT INTO `auth_permission` VALUES ('21', 'Can add session', '6', 'add_session'); INSERT INTO `auth_permission` VALUES ('22', 'Can change session', '6', 'change_session'); INSERT INTO `auth_permission` VALUES ('23', 'Can delete session', '6', 'delete_session'); INSERT INTO `auth_permission` VALUES ('24', 'Can view session', '6', 'view_session'); INSERT INTO `auth_permission` VALUES ('25', 'Can add clazz', '7', 'add_clazz'); INSERT INTO `auth_permission` VALUES ('26', 'Can change clazz', '7', 'change_clazz'); INSERT INTO `auth_permission` VALUES ('27', 'Can delete clazz', '7', 'delete_clazz'); INSERT INTO `auth_permission` VALUES ('28', 'Can view clazz', '7', 'view_clazz'); INSERT INTO `auth_permission` VALUES ('29', 'Can add course', '8', 'add_course'); INSERT INTO `auth_permission` VALUES ('30', 'Can change course', '8', 'change_course'); INSERT INTO `auth_permission` VALUES ('31', 'Can delete course', '8', 'delete_course'); INSERT INTO `auth_permission` VALUES ('32', 'Can view course', '8', 'view_course'); INSERT INTO `auth_permission` VALUES ('33', 'Can add student', '9', 'add_student'); INSERT INTO `auth_permission` VALUES ('34', 'Can change student', '9', 'change_student'); INSERT INTO `auth_permission` VALUES ('35', 'Can delete student', '9', 'delete_student'); INSERT INTO `auth_permission` VALUES ('36', 'Can view student', '9', 'view_student'); -- ---------------------------- -- Table structure for auth_user -- ---------------------------- DROP TABLE IF EXISTS `auth_user`; CREATE TABLE `auth_user` ( `id` int(11) NOT NULL AUTO_INCREMENT, `password` varchar(128) NOT NULL, `last_login` datetime(6) DEFAULT NULL, `is_superuser` tinyint(1) NOT NULL, `username` varchar(150) NOT NULL, `first_name` varchar(30) NOT NULL, `last_name` varchar(150) NOT NULL, `email` varchar(254) NOT NULL, `is_staff` tinyint(1) NOT NULL, `is_active` tinyint(1) NOT NULL, `date_joined` datetime(6) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `username` (`username`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of auth_user -- ---------------------------- -- ---------------------------- -- Table structure for auth_user_groups -- ---------------------------- DROP TABLE IF EXISTS `auth_user_groups`; CREATE TABLE `auth_user_groups` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL, `group_id` int(11) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `auth_user_groups_user_id_group_id_94350c0c_uniq` (`user_id`,`group_id`), KEY `auth_user_groups_group_id_97559544_fk_auth_group_id` (`group_id`), CONSTRAINT `auth_user_groups_group_id_97559544_fk_auth_group_id` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`), CONSTRAINT `auth_user_groups_user_id_6a12ed8b_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of auth_user_groups -- ---------------------------- -- ---------------------------- -- Table structure for auth_user_user_permissions -- ---------------------------- DROP TABLE IF EXISTS `auth_user_user_permissions`; CREATE TABLE `auth_user_user_permissions` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL, `permission_id` int(11) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `auth_user_user_permissions_user_id_permission_id_14a6b632_uniq` (`user_id`,`permission_id`), KEY `auth_user_user_permi_permission_id_1fbb5f2c_fk_auth_perm` (`permission_id`), CONSTRAINT `auth_user_user_permi_permission_id_1fbb5f2c_fk_auth_perm` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`), CONSTRAINT `auth_user_user_permissions_user_id_a95ead1b_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of auth_user_user_permissions -- ---------------------------- -- ---------------------------- -- Table structure for django_admin_log -- ---------------------------- DROP TABLE IF EXISTS `django_admin_log`; CREATE TABLE `django_admin_log` ( `id` int(11) NOT NULL AUTO_INCREMENT, `action_time` datetime(6) NOT NULL, `object_id` longtext, `object_repr` varchar(200) NOT NULL, `action_flag` smallint(5) unsigned NOT NULL, `change_message` longtext NOT NULL, `content_type_id` int(11) DEFAULT NULL, `user_id` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `django_admin_log_content_type_id_c4bce8eb_fk_django_co` (`content_type_id`), KEY `django_admin_log_user_id_c564eba6_fk_auth_user_id` (`user_id`), CONSTRAINT `django_admin_log_content_type_id_c4bce8eb_fk_django_co` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`), CONSTRAINT `django_admin_log_user_id_c564eba6_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of django_admin_log -- ---------------------------- -- ---------------------------- -- Table structure for django_content_type -- ---------------------------- DROP TABLE IF EXISTS `django_content_type`; CREATE TABLE `django_content_type` ( `id` int(11) NOT NULL AUTO_INCREMENT, `app_label` varchar(100) NOT NULL, `model` varchar(100) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `django_content_type_app_label_model_76bd3d3b_uniq` (`app_label`,`model`) ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of django_content_type -- ---------------------------- INSERT INTO `django_content_type` VALUES ('1', 'admin', 'logentry'); INSERT INTO `django_content_type` VALUES ('3', 'auth', 'group'); INSERT INTO `django_content_type` VALUES ('2', 'auth', 'permission'); INSERT INTO `django_content_type` VALUES ('4', 'auth', 'user'); INSERT INTO `django_content_type` VALUES ('5', 'contenttypes', 'contenttype'); INSERT INTO `django_content_type` VALUES ('6', 'sessions', 'session'); INSERT INTO `django_content_type` VALUES ('7', 'studinfortest', 'clazz'); INSERT INTO `django_content_type` VALUES ('8', 'studinfortest', 'course'); INSERT INTO `django_content_type` VALUES ('9', 'studinfortest', 'student'); -- ---------------------------- -- Table structure for django_migrations -- ---------------------------- DROP TABLE IF EXISTS `django_migrations`; CREATE TABLE `django_migrations` ( `id` int(11) NOT NULL AUTO_INCREMENT, `app` varchar(255) NOT NULL, `name` varchar(255) NOT NULL, `applied` datetime(6) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of django_migrations -- ---------------------------- INSERT INTO `django_migrations` VALUES ('1', 'contenttypes', '0001_initial', '2020-12-18 07:44:12.061000'); INSERT INTO `django_migrations` VALUES ('2', 'auth', '0001_initial', '2020-12-18 07:44:18.223000'); INSERT INTO `django_migrations` VALUES ('3', 'admin', '0001_initial', '2020-12-18 07:44:37.117000'); INSERT INTO `django_migrations` VALUES ('4', 'admin', '0002_logentry_remove_auto_add', '2020-12-18 07:44:42.200000'); INSERT INTO `django_migrations` VALUES ('5', 'admin', '0003_logentry_add_action_flag_choices', '2020-12-18 07:44:42.310000'); INSERT INTO `django_migrations` VALUES ('6', 'contenttypes', '0002_remove_content_type_name', '2020-12-18 07:44:44.772000'); INSERT INTO `django_migrations` VALUES ('7', 'auth', '0002_alter_permission_name_max_length', '2020-12-18 07:44:46.385000'); INSERT INTO `django_migrations` VALUES ('8', 'auth', '0003_alter_user_email_max_length', '2020-12-18 07:44:49.064000'); INSERT INTO `django_migrations` VALUES ('9', 'auth', '0004_alter_user_username_opts', '2020-12-18 07:44:49.254000'); INSERT INTO `django_migrations` VALUES ('10', 'auth', '0005_alter_user_last_login_null', '2020-12-18 07:44:50.485000'); INSERT INTO `django_migrations` VALUES ('11', 'auth', '0006_require_contenttypes_0002', '2020-12-18 07:44:50.569000'); INSERT INTO `django_migrations` VALUES ('12', 'auth', '0007_alter_validators_add_error_messages', '2020-12-18 07:44:50.740000'); INSERT INTO `django_migrations` VALUES ('13', 'auth', '0008_alter_user_username_max_length', '2020-12-18 07:44:52.955000'); INSERT INTO `django_migrations` VALUES ('14', 'auth', '0009_alter_user_last_name_max_length', '2020-12-18 07:44:55.353000'); INSERT INTO `django_migrations` VALUES ('15', 'auth', '0010_alter_group_name_max_length', '2020-12-18 07:44:57.252000'); INSERT INTO `django_migrations` VALUES ('16', 'auth', '0011_update_proxy_permissions', '2020-12-18 07:44:57.367000'); INSERT INTO `django_migrations` VALUES ('17', 'sessions', '0001_initial', '2020-12-18 07:44:58.160000'); INSERT INTO `django_migrations` VALUES ('18', 'studinfortest', '0001_initial', '2020-12-18 07:45:02.327000'); -- ---------------------------- -- Table structure for django_session -- ---------------------------- DROP TABLE IF EXISTS `django_session`; CREATE TABLE `django_session` ( `session_key` varchar(40) NOT NULL, `session_data` longtext NOT NULL, `expire_date` datetime(6) NOT NULL, PRIMARY KEY (`session_key`), KEY `django_session_expire_date_a5c62663` (`expire_date`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of django_session -- ---------------------------- -- ---------------------------- -- Table structure for studinfortest_clazz -- ---------------------------- DROP TABLE IF EXISTS `studinfortest_clazz`; CREATE TABLE `studinfortest_clazz` ( `cno` int(11) NOT NULL AUTO_INCREMENT, `cname` varchar(30) NOT NULL, PRIMARY KEY (`cno`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of studinfortest_clazz -- ---------------------------- INSERT INTO `studinfortest_clazz` VALUES ('1', ''); INSERT INTO `studinfortest_clazz` VALUES ('2', 'B201Python'); -- ---------------------------- -- Table structure for studinfortest_course -- ---------------------------- DROP TABLE IF EXISTS `studinfortest_course`; CREATE TABLE `studinfortest_course` ( `course_no` int(11) NOT NULL AUTO_INCREMENT, `course_name` varchar(30) NOT NULL, PRIMARY KEY (`course_no`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of studinfortest_course -- ---------------------------- INSERT INTO `studinfortest_course` VALUES ('1', 'Python'); INSERT INTO `studinfortest_course` VALUES ('2', 'Java'); -- ---------------------------- -- Table structure for studinfortest_student -- ---------------------------- DROP TABLE IF EXISTS `studinfortest_student`; CREATE TABLE `studinfortest_student` ( `sno` int(11) NOT NULL AUTO_INCREMENT, `sname` varchar(30) NOT NULL, `cls_id` int(11) NOT NULL, PRIMARY KEY (`sno`), KEY `studinfortest_student_cls_id_c14f9506_fk_studinfortest_clazz_cno` (`cls_id`), CONSTRAINT `studinfortest_student_cls_id_c14f9506_fk_studinfortest_clazz_cno` FOREIGN KEY (`cls_id`) REFERENCES `studinfortest_clazz` (`cno`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of studinfortest_student -- ---------------------------- INSERT INTO `studinfortest_student` VALUES ('1', 'lisi', '2'); INSERT INTO `studinfortest_student` VALUES ('2', '', '2'); -- ---------------------------- -- Table structure for studinfortest_student_cour -- ---------------------------- DROP TABLE IF EXISTS `studinfortest_student_cour`; CREATE TABLE `studinfortest_student_cour` ( `id` int(11) NOT NULL AUTO_INCREMENT, `student_id` int(11) NOT NULL, `course_id` int(11) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `studinfortest_student_cour_student_id_course_id_4ce4e796_uniq` (`student_id`,`course_id`), KEY `studinfortest_studen_course_id_08680381_fk_studinfor` (`course_id`), CONSTRAINT `studinfortest_studen_course_id_08680381_fk_studinfor` FOREIGN KEY (`course_id`) REFERENCES `studinfortest_course` (`course_no`), CONSTRAINT `studinfortest_studen_student_id_75daef81_fk_studinfor` FOREIGN KEY (`student_id`) REFERENCES `studinfortest_student` (`sno`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of studinfortest_student_cour -- ---------------------------- INSERT INTO `studinfortest_student_cour` VALUES ('1', '1', '1'); INSERT INTO `studinfortest_student_cour` VALUES ('2', '1', '2');
true
d6c5cdc9c72e37c6c64041df7a60bdefba7a06eb
SQL
artcom1/test
/#DB/struct/view/qv.powiazanietezkkw.sql
UTF-8
478
3.625
4
[]
no_license
CREATE VIEW powiazanietezkkw AS SELECT COALESCE(r.tel_idelemsrc, r.tel_idelemdst) AS tel_idelem, COALESCE(wyk.kwh_idheadu, e.kwh_idheadu) AS kwh_idheadu FROM ((public.tr_ruchy r LEFT JOIN public.tr_nodrec wyk ON (((wyk.knr_idelemu = r.knr_idelemusrc) OR (wyk.knr_idelemu = r.knr_idelemudst)))) LEFT JOIN public.tr_kkwnod e ON (((e.kwe_idelemu = r.kwe_idelemusrc) OR (e.kwe_idelemu = r.kwe_idelemudst)))) WHERE (COALESCE(wyk.kwh_idheadu, e.kwh_idheadu) > 0);
true
34bdd5d8ab37c18c471f72b33538038212872fd3
SQL
not-notAlex/holbertonschool-higher_level_programming
/0x0E-SQL_more_queries/12-no_genre.sql
UTF-8
302
3.890625
4
[]
no_license
-- lists all shows that do not have a genre link SELECT tv_shows.title, tv_show_genres.genre_id FROM tv_shows LEFT JOIN tv_show_genres ON tv_shows.id = tv_show_genres.show_id WHERE tv_show_genres.genre_id IS NULL ORDER BY tv_shows.title, tv_show_genres.genre_id ASC;
true
df6d98d75b3ad78d35cecc46abcb06f87e3b4fb2
SQL
marcoshakuro/turma16java
/mySQL/Exercicio/exercicio3MySQL.sql
UTF-8
1,062
3.171875
3
[]
no_license
create database db_registro_escolar; create table tab_alunos( id bigint auto_increment, nome varchar (255), idade int not null, melhorMateria varchar (255), nota int, primary key (id) ); select * from tab_alunos; insert into tab_alunos (nome,idade,melhorMateria,nota) values ("Marcos",27,"Matematica",9); insert into tab_alunos (nome,idade,melhorMateria,nota) values ("Mayara",22,"Filosofia", 10); insert into tab_alunos (nome,idade,melhorMateria,nota) values ("Jean",27,"PHP",5); insert into tab_alunos (nome,idade,melhorMateria,nota) values ("Milton",23,"Eletronica",6); insert into tab_alunos (nome,idade,melhorMateria,nota) values ("Maria",22,"Historia",8); insert into tab_alunos (nome,idade,melhorMateria,nota) values ("Fernando",19,"Algoritimos",10); insert into tab_alunos (nome,idade,melhorMateria,nota) values ("Claudio",33,"S.O",6); insert into tab_alunos (nome,idade,melhorMateria,nota) values ("Paola",19,"POO",3); select * from tab_alunos where nota > 7; select * from tab_alunos where nota < 7; update tab_alunos set nota = 8 where id = 3;
true
8bac774ddf7278e19dcb4facaa34161b5640f62d
SQL
nriqu322/sql_zoo_answers
/7_more_join_operations.sql
UTF-8
2,060
4.15625
4
[]
no_license
SELECT id, title FROM movie WHERE yr = 1962; SELECT yr FROM movie WHERE title = 'Citizen Kane'; SELECT id, title, yr FROM movie WHERE title LIKE '%Star Trek%' ORDER BY yr; SELECT id FROM actor WHERE name = 'Glenn Close'; SELECT id FROM movie WHERE title = 'Casablanca'; SELECT name FROM actor JOIN casting ON id = actorid WHERE movieid = 11768; SELECT name FROM actor JOIN casting ON id = actorid WHERE movieid = (SELECT id FROM movie WHERE title = 'Alien'); SELECT title FROM movie JOIN casting ON id = movieid WHERE actorid = (SELECT id FROM actor WHERE name = 'Harrison Ford'); SELECT title FROM movie JOIN casting ON id = movieid WHERE actorid = (SELECT id FROM actor WHERE name = 'Harrison Ford' AND ord != 1); SELECT title, name FROM movie JOIN casting ON movie.id = casting.movieid JOIN actor ON casting.actorid = actor.id WHERE yr = 1962 AND ord = 1; SELECT yr, COUNT(title) FROM movie JOIN casting ON movie.id = movieid JOIN actor ON actorid = actor.id WHERE name = 'Rock Hudson' GROUP BY yr HAVING COUNT(title) > 2; SELECT title, name FROM movie JOIN casting ON movieid = movie.id AND ord = 1 JOIN actor ON actorid = actor.id WHERE movie.id IN (SELECT movieid FROM casting WHERE actorid IN (SELECT id FROM actor WHERE name='Julie Andrews')); SELECT name FROM movie JOIN casting ON movie.id = casting.movieid AND ord = 1 JOIN actor ON actor.id = casting.actorid GROUP BY name HAVING COUNT(actorid) >= 15; SELECT title, COUNT(actorid) FROM movie JOIN casting ON movie.id = casting.movieid JOIN actor ON actor.id = casting.actorid WHERE yr = 1978 GROUP BY title ORDER BY COUNT(actorid) DESC, title; SELECT name FROM movie JOIN casting ON movie.id = casting.movieid JOIN actor ON actor.id = casting.actorid WHERE movieid IN (SELECT movie.id FROM movie JOIN casting ON movie.id = casting.movieid JOIN actor ON actor.id = casting.actorid WHERE name = 'Art Garfunkel') AND name != 'Art Garfunkel';
true
ed7e8ba5528f9e09f24e8609edf49253c2e06441
SQL
mh44698/Python-work
/SQL/Groupby.sql
UTF-8
580
4.71875
5
[]
no_license
-- GROUP BY Syntax SELECT column_name(s) FROM table_name WHERE condition GROUP BY column_name(s) ORDER BY column_name(s); SELECT COUNT(CustomerID), Country FROM Customers GROUP BY Country; --The following SQL statement lists the number of customers in each country, sorted high to low: SELECT COUNT(CustomerID), Country FROM Customers GROUP BY Country ORDER BY COUNT(CustomerID) DESC; --GROUP BY With JOIN Example SELECT Shippers.ShipperName, COUNT(Orders.OrderID) AS NumberOfOrders FROM Orders LEFT JOIN Shippers ON Orders.ShipperID = Shippers.ShipperID GROUP BY ShipperName;
true
100eaf5c0fe5deb775027f3777102ec853d028e4
SQL
sircanist/clipper
/clipper-cli/src/main/resources/sql/dlvdb_schema.sql
UTF-8
5,632
3.328125
3
[ "Apache-2.0" ]
permissive
SET statement_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = off; SET check_function_bodies = false; SET client_min_messages = warning; SET escape_string_warning = off; SET search_path = public, pg_catalog; SET default_tablespace = ''; SET default_with_oids = false; drop table if exists concept_assertion cascade; drop table if exists data_role_assertion cascade; drop table if exists object_role_assertion cascade; drop table if exists individual_name cascade; drop table if exists predicate_name cascade; CREATE TABLE concept_assertion ( concept integer NOT NULL, individual integer NOT NULL ); ALTER TABLE public.concept_assertion OWNER TO xiao; CREATE TABLE data_role_assertion ( data_role integer NOT NULL, individual integer NOT NULL, value text NOT NULL, datatype character varying(255) NOT NULL, language character varying(10) NOT NULL ); ALTER TABLE public.data_role_assertion OWNER TO xiao; CREATE TABLE individual_name ( id SERIAL, name text NOT NULL UNIQUE ); CREATE TABLE predicate_name ( id SERIAL, name text NOT NULL UNIQUE ); ALTER TABLE public.individual_name OWNER TO xiao; -- -- Name: object_role_assertion; Type: TABLE; Schema: public; Owner: xiao; Tablespace: -- CREATE TABLE object_role_assertion ( object_role integer NOT NULL, a integer NOT NULL, b integer NOT NULL ); ALTER TABLE public.object_role_assertion OWNER TO xiao; ALTER TABLE ONLY concept_assertion ADD CONSTRAINT concept_assertion_pkey PRIMARY KEY (concept, individual); -- -- Name: data_role_assertion_pkey; Type: CONSTRAINT; Schema: public; Owner: xiao; Tablespace: -- ALTER TABLE ONLY data_role_assertion ADD CONSTRAINT data_role_assertion_pkey PRIMARY KEY (data_role, individual, value, datatype, language); -- -- Name: individual_name_pkey; Type: CONSTRAINT; Schema: public; Owner: xiao; Tablespace: -- ALTER TABLE ONLY individual_name ADD CONSTRAINT individual_name_pkey PRIMARY KEY (id); ALTER TABLE ONLY predicate_name ADD CONSTRAINT predicate_name_pkey PRIMARY KEY (id); -- -- Name: object_role_assertion_pkey; Type: CONSTRAINT; Schema: public; Owner: xiao; Tablespace: -- ALTER TABLE ONLY object_role_assertion ADD CONSTRAINT object_role_assertion_pkey PRIMARY KEY (object_role, a, b); -- -- Name: concept_assertion_concept_idx; Type: INDEX; Schema: public; Owner: xiao; Tablespace: -- CREATE INDEX concept_assertion_concept_idx ON concept_assertion USING btree (concept); -- -- Name: data_role_assertion_individual_role_idx; Type: INDEX; Schema: public; Owner: xiao; Tablespace: -- CREATE INDEX data_role_assertion_individual_role_idx ON data_role_assertion USING btree (individual, data_role); -- -- Name: data_role_assertion_role_idx; Type: INDEX; Schema: public; Owner: xiao; Tablespace: -- CREATE INDEX data_role_assertion_role_idx ON data_role_assertion USING btree (data_role); -- -- Name: object_role_assertion_a_role_idx; Type: INDEX; Schema: public; Owner: xiao; Tablespace: -- CREATE INDEX object_role_assertion_a_role_idx ON object_role_assertion USING btree (a, object_role); -- -- Name: object_role_assertion_b_role_idx; Type: INDEX; Schema: public; Owner: xiao; Tablespace: -- CREATE INDEX object_role_assertion_b_role_idx ON object_role_assertion USING btree (b, object_role); -- -- Name: object_role_assertion_role_idx; Type: INDEX; Schema: public; Owner: xiao; Tablespace: -- CREATE INDEX object_role_assertion_role_idx ON object_role_assertion USING btree (object_role); -- -- Name: concept_assertion_concept_fkey; Type: FK CONSTRAINT; Schema: public; Owner: xiao -- -- ALTER TABLE ONLY concept_assertion -- ADD CONSTRAINT concept_assertion_concept_fkey FOREIGN KEY (concept) REFERENCES tbox_name(id); ALTER TABLE ONLY concept_assertion ADD CONSTRAINT concept_assertion_concept_fkey FOREIGN KEY (concept) REFERENCES predicate_name(id); -- -- Name: concept_assertion_individual_fkey; Type: FK CONSTRAINT; Schema: public; Owner: xiao -- ALTER TABLE ONLY concept_assertion ADD CONSTRAINT concept_assertion_individual_fkey FOREIGN KEY (individual) REFERENCES individual_name(id); -- -- Name: data_role_assertion_data_role_fkey; Type: FK CONSTRAINT; Schema: public; Owner: xiao -- ALTER TABLE ONLY data_role_assertion ADD CONSTRAINT data_role_assertion_data_role_fkey FOREIGN KEY (data_role) REFERENCES predicate_name(id); -- -- Name: data_role_assertion_individual_fkey; Type: FK CONSTRAINT; Schema: public; Owner: xiao -- ALTER TABLE ONLY data_role_assertion ADD CONSTRAINT data_role_assertion_individual_fkey FOREIGN KEY (individual) REFERENCES individual_name(id); -- -- Name: object_role_assertion_a_fkey; Type: FK CONSTRAINT; Schema: public; Owner: xiao -- ALTER TABLE ONLY object_role_assertion ADD CONSTRAINT object_role_assertion_a_fkey FOREIGN KEY (a) REFERENCES individual_name(id); -- -- Name: object_role_assertion_b_fkey; Type: FK CONSTRAINT; Schema: public; Owner: xiao -- ALTER TABLE ONLY object_role_assertion ADD CONSTRAINT object_role_assertion_b_fkey FOREIGN KEY (b) REFERENCES individual_name(id); -- -- Name: object_role_assertion_object_role_fkey; Type: FK CONSTRAINT; Schema: public; Owner: xiao -- ALTER TABLE ONLY object_role_assertion ADD CONSTRAINT object_role_assertion_object_role_fkey FOREIGN KEY (object_role) REFERENCES predicate_name(id); -- -- Name: public; Type: ACL; Schema: -; Owner: postgres -- --REVOKE ALL ON SCHEMA public FROM PUBLIC; --REVOKE ALL ON SCHEMA public FROM postgres; --GRANT ALL ON SCHEMA public TO postgres; --GRANT ALL ON SCHEMA public TO PUBLIC;
true
f35f6f629f33da166a8fb3ea526f03030f5907f5
SQL
radtek/Oracle-4
/SQL/Administração/!Script Leandro/Priv_gera_script_priv_para_role_ou_usuario.sql
WINDOWS-1250
1,320
3.078125
3
[]
no_license
Prompt ############################################################# Prompt # # Prompt # Indica quais os grants de uma determinada role # Prompt # # Prompt ############################################################# Accept Grantee prompt "Digite o nome do Usurio ou Role : " set verify off column grantee heading "Usuario" format a25 wrap column objeto heading " " format a7 wrap column nome heading "Objeto" format a34 wrap column privilege heading "Privilegio" format a23 wrap break on grantee on objeto on nome set heading off set feedback off set pages 1000 set trimspool on select 'GRANT '||privilege||' ON ' || OWNER||'.'||table_name || ' '||' TO '||grantee||DECODE (GRANTABLE, 'YES',' WITH GRANT OPTION;',';') Comando from dba_tab_privs where grantee LIKE UPPER('%&&Grantee%') order by owner / select 'GRANT '||granted_role || ' '||' TO '||grantee||';' from dba_role_privs where grantee LIKE UPPER('%&&Grantee%') union all select 'GRANT '||privilege || ' '||' TO '||grantee||';' from dba_sys_privs where grantee LIKE UPPER('%&&Grantee%') / UNDEFINE Grantee clear columns set verify on set heading on set feedback on
true
1f63746bcf76c6065bc4e4fe194388def4696c1a
SQL
rezamatrix/Telefake
/db.sql
UTF-8
4,868
2.921875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 03, 2021 at 05:05 PM -- Server version: 10.4.13-MariaDB -- PHP Version: 7.4.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `test` -- -- -------------------------------------------------------- -- -- Table structure for table `chj` -- CREATE TABLE `chj` ( `id` int(11) NOT NULL, `ci` varchar(255) NOT NULL, `ij` varchar(255) NOT NULL, `im` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `cht` -- CREATE TABLE `cht` ( `id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `teda` int(11) NOT NULL, `linkjoin` text NOT NULL, `idch` text NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `num` -- CREATE TABLE `num` ( `id` int(11) NOT NULL, `chatid` varchar(255) NOT NULL, `number` varchar(255) NOT NULL, `orderid` varchar(255) NOT NULL, `Status` varchar(255) NOT NULL, `m` int(11) NOT NULL, `timetoend` varchar(255) NOT NULL, `buytime` bigint(20) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `p` -- CREATE TABLE `p` ( `id` int(11) NOT NULL, `chatid` varchar(255) NOT NULL, `fee` varchar(255) NOT NULL, `vercher` varchar(255) NOT NULL, `status` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `product` -- CREATE TABLE `product` ( `id` int(11) NOT NULL, `name` varchar(256) NOT NULL, `txt` text NOT NULL, `price` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `refral` -- CREATE TABLE `refral` ( `id` int(11) NOT NULL, `chetidrf` varchar(255) NOT NULL, `chetidfr` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `sender` -- CREATE TABLE `sender` ( `id` int(11) NOT NULL, `matn` text NOT NULL, `therd` bigint(20) NOT NULL, `therd2` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `user` -- CREATE TABLE `user` ( `id` bigint(11) NOT NULL, `username` text NOT NULL, `chatid` bigint(20) NOT NULL, `balance` bigint(20) NOT NULL, `rf` int(11) NOT NULL, `b2` bigint(20) NOT NULL, `ider` bigint(20) NOT NULL, `ph` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Indexes for dumped tables -- -- -- Indexes for table `chj` -- ALTER TABLE `chj` ADD PRIMARY KEY (`id`); -- -- Indexes for table `cht` -- ALTER TABLE `cht` ADD PRIMARY KEY (`id`); -- -- Indexes for table `num` -- ALTER TABLE `num` ADD PRIMARY KEY (`id`); -- -- Indexes for table `p` -- ALTER TABLE `p` ADD PRIMARY KEY (`id`); -- -- Indexes for table `product` -- ALTER TABLE `product` ADD PRIMARY KEY (`id`); -- -- Indexes for table `refral` -- ALTER TABLE `refral` ADD PRIMARY KEY (`id`); -- -- Indexes for table `sender` -- ALTER TABLE `sender` ADD PRIMARY KEY (`id`); -- -- Indexes for table `user` -- ALTER TABLE `user` ADD PRIMARY KEY (`id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `chj` -- ALTER TABLE `chj` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `cht` -- ALTER TABLE `cht` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `num` -- ALTER TABLE `num` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `p` -- ALTER TABLE `p` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `product` -- ALTER TABLE `product` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `refral` -- ALTER TABLE `refral` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `sender` -- ALTER TABLE `sender` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `user` -- ALTER TABLE `user` MODIFY `id` bigint(11) NOT NULL AUTO_INCREMENT; COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
true
5eb63b31ea87b353c7b8faca9d36e07cb6605160
SQL
LupitaSantos4/Reinscripciones
/inscricionesAPI/tec.sql
UTF-8
4,817
3.203125
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `tec` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `tec`; -- MySQL dump 10.13 Distrib 5.6.17, for Win32 (x86) -- -- Host: 127.0.0.1 Database: tec -- ------------------------------------------------------ -- Server version 5.5.5-10.1.34-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- -- Table structure for table `alumno` -- DROP TABLE IF EXISTS `alumno`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `alumno` ( `id_alumno` int(10) unsigned NOT NULL, `nombre_al` varchar(60) NOT NULL, `nocontrol` char(8) NOT NULL, `contrasena` varchar(45) NOT NULL, `carrera_id` tinyint(3) NOT NULL, PRIMARY KEY (`id_alumno`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `alumno` -- LOCK TABLES `alumno` WRITE; /*!40000 ALTER TABLE `alumno` DISABLE KEYS */; INSERT INTO `alumno` VALUES (1,'Emmanuel','14640045','emmanuel1',1),(2,'Victor','15789003','elvitor123',1),(3,'Yaru','17890556','layare69',2),(4,'Juan','14770900','junito123',3),(5,'Alejandro','19007624','elgato189',3); /*!40000 ALTER TABLE `alumno` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `carrera` -- DROP TABLE IF EXISTS `carrera`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `carrera` ( `id_carrera` int(10) unsigned NOT NULL, `nombre_ca` varchar(60) NOT NULL, `creditos_ca` char(8) NOT NULL, PRIMARY KEY (`id_carrera`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `carrera` -- LOCK TABLES `carrera` WRITE; /*!40000 ALTER TABLE `carrera` DISABLE KEYS */; INSERT INTO `carrera` VALUES (1,'Ingenieria de la Informacion y las Comunicaciones','260'),(2,'Ingenieria en Sistemas Computacionales','250'),(3,'Ingenieria en Administracion','10'); /*!40000 ALTER TABLE `carrera` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `docente` -- DROP TABLE IF EXISTS `docente`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `docente` ( `id_docente` int(11) unsigned NOT NULL AUTO_INCREMENT, `nombre_do` varchar(60) NOT NULL, PRIMARY KEY (`id_docente`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `docente` -- LOCK TABLES `docente` WRITE; /*!40000 ALTER TABLE `docente` DISABLE KEYS */; INSERT INTO `docente` VALUES (1,'Heriberto Flores'),(2,'Isela Navarro'),(3,'Tellez Tellez'),(4,'Teresa Pichardo'); /*!40000 ALTER TABLE `docente` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `materia` -- DROP TABLE IF EXISTS `materia`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `materia` ( `id_materia` int(11) unsigned NOT NULL AUTO_INCREMENT, `nombre_ma` varchar(45) NOT NULL, `creditos_ma` char(8) NOT NULL, `docente_id` tinyint(3) NOT NULL, `carrera_id` tinyint(3) NOT NULL, PRIMARY KEY (`id_materia`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `materia` -- LOCK TABLES `materia` WRITE; /*!40000 ALTER TABLE `materia` DISABLE KEYS */; INSERT INTO `materia` VALUES (1,'Servicios Web','4',1),(2,'Electricidad y Magnetismo','5',3),(3,'Seguridad en Redes','4',4),(4,'Programacion Java I','5',2); /*!40000 ALTER TABLE `materia` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -- Dump completed on 2020-04-28 8:42:58
true
d67c5b00396b15564c2dc1ed92edfc95315d9e9e
SQL
edoardoc/openspcoop2ondocker
/openspcoop2img/dist/sql/OpenSPCoop2.sql
UTF-8
84,703
2.96875
3
[ "MIT" ]
permissive
-- OpenSPCoop2 -- OpenSPCoop2 -- **** Repository Buste **** CREATE TABLE REPOSITORY_BUSTE ( ID_MESSAGGIO VARCHAR(255) NOT NULL, TIPO VARCHAR(255) NOT NULL, MITTENTE VARCHAR(255) NOT NULL, IDPORTA_MITTENTE VARCHAR(255), TIPO_MITTENTE VARCHAR(255) NOT NULL, IND_TELEMATICO_MITT VARCHAR(255), DESTINATARIO VARCHAR(255) NOT NULL, IDPORTA_DESTINATARIO VARCHAR(255), TIPO_DESTINATARIO VARCHAR(255) NOT NULL, IND_TELEMATICO_DEST VARCHAR(255), VERSIONE_SERVIZIO VARCHAR(255), SERVIZIO VARCHAR(255), TIPO_SERVIZIO VARCHAR(255), AZIONE VARCHAR(255), PROFILO_DI_COLLABORAZIONE VARCHAR(255), SERVIZIO_CORRELATO VARCHAR(255), TIPO_SERVIZIO_CORRELATO VARCHAR(255), COLLABORAZIONE VARCHAR(255), SEQUENZA INT, INOLTRO_SENZA_DUPLICATI INT NOT NULL, CONFERMA_RICEZIONE INT NOT NULL, ORA_REGISTRAZIONE TIMESTAMP, TIPO_ORA_REGISTRAZIONE VARCHAR(255), RIFERIMENTO_MESSAGGIO VARCHAR(255), SCADENZA_BUSTA TIMESTAMP NOT NULL, DUPLICATI INT NOT NULL, -- Dati di integrazione LOCATION_PD VARCHAR(255), SERVIZIO_APPLICATIVO VARCHAR(255), MODULO_IN_ATTESA VARCHAR(255), SCENARIO VARCHAR(255), PROTOCOLLO VARCHAR(255) NOT NULL, -- Booleani che indicano l'attuali modalita' di utilizzo del repository: -- HISTORY: Busta usata per funzionalita di confermaRicezione(OUTBOX)/FiltroDuplicati(INBOX) -- PROFILI: Busta usata per funzionalita di profili di collaborazione -- PDD: Busta usata eventualmente da un PdD -- -- DEFAULT CONTROLLER: 3 interi con semantica booleana (1->true, 0->false) HISTORY INT NOT NULL DEFAULT 0, PROFILO INT NOT NULL DEFAULT 0, PDD INT NOT NULL DEFAULT 0, REPOSITORY_ACCESS INT NOT NULL DEFAULT 0, -- fk/pk columns -- check constraints CONSTRAINT chk_REPOSITORY_BUSTE_1 CHECK (TIPO IN ('INBOX','OUTBOX')), -- fk/pk keys constraints CONSTRAINT pk_REPOSITORY_BUSTE PRIMARY KEY (ID_MESSAGGIO,TIPO) ); -- index CREATE INDEX REP_BUSTE_SEARCH ON REPOSITORY_BUSTE (SCADENZA_BUSTA,TIPO,HISTORY,PROFILO,PDD); CREATE INDEX REP_BUSTE_SEARCH_RA ON REPOSITORY_BUSTE (SCADENZA_BUSTA,TIPO,REPOSITORY_ACCESS); CREATE INDEX REP_BUSTE_SEARCH_TIPO ON REPOSITORY_BUSTE (TIPO,HISTORY,PROFILO,PDD); CREATE INDEX REP_BUSTE_SEARCH_TIPO_RA ON REPOSITORY_BUSTE (TIPO,REPOSITORY_ACCESS); CREATE SEQUENCE seq_LISTA_RISCONTRI start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 CYCLE; CREATE TABLE LISTA_RISCONTRI ( ID_MESSAGGIO VARCHAR(255) NOT NULL, TIPO VARCHAR(255) NOT NULL, ID_RISCONTRO VARCHAR(255), ORA_REGISTRAZIONE TIMESTAMP, TIPO_ORA_REGISTRAZIONE VARCHAR(255), -- fk/pk columns id BIGINT DEFAULT nextval('seq_LISTA_RISCONTRI') NOT NULL, -- check constraints CONSTRAINT chk_LISTA_RISCONTRI_1 CHECK (TIPO IN ('INBOX','OUTBOX')), -- fk/pk keys constraints CONSTRAINT fk_LISTA_RISCONTRI_1 FOREIGN KEY (ID_MESSAGGIO,TIPO) REFERENCES REPOSITORY_BUSTE(ID_MESSAGGIO,TIPO) ON DELETE CASCADE, CONSTRAINT pk_LISTA_RISCONTRI PRIMARY KEY (id) ); -- index CREATE INDEX LISTA_RISC_ID ON LISTA_RISCONTRI (ID_MESSAGGIO,TIPO); CREATE SEQUENCE seq_LISTA_TRASMISSIONI start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 CYCLE; CREATE TABLE LISTA_TRASMISSIONI ( ID_MESSAGGIO VARCHAR(255) NOT NULL, TIPO VARCHAR(255) NOT NULL, ORIGINE VARCHAR(255), TIPO_ORIGINE VARCHAR(255), DESTINAZIONE VARCHAR(255), TIPO_DESTINAZIONE VARCHAR(255), ORA_REGISTRAZIONE TIMESTAMP, TIPO_ORA_REGISTRAZIONE VARCHAR(255), -- fk/pk columns id BIGINT DEFAULT nextval('seq_LISTA_TRASMISSIONI') NOT NULL, -- check constraints CONSTRAINT chk_LISTA_TRASMISSIONI_1 CHECK (TIPO IN ('INBOX','OUTBOX')), -- fk/pk keys constraints CONSTRAINT fk_LISTA_TRASMISSIONI_1 FOREIGN KEY (ID_MESSAGGIO,TIPO) REFERENCES REPOSITORY_BUSTE(ID_MESSAGGIO,TIPO) ON DELETE CASCADE, CONSTRAINT pk_LISTA_TRASMISSIONI PRIMARY KEY (id) ); -- index CREATE INDEX LISTA_TRASM_ID ON LISTA_TRASMISSIONI (ID_MESSAGGIO,TIPO); CREATE SEQUENCE seq_LISTA_ECCEZIONI start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 CYCLE; CREATE TABLE LISTA_ECCEZIONI ( ID_MESSAGGIO VARCHAR(255) NOT NULL, TIPO VARCHAR(255) NOT NULL, VALIDAZIONE INT, CONTESTO VARCHAR(255), CODICE VARCHAR(255), RILEVANZA VARCHAR(255), POSIZIONE TEXT, -- fk/pk columns id BIGINT DEFAULT nextval('seq_LISTA_ECCEZIONI') NOT NULL, -- check constraints CONSTRAINT chk_LISTA_ECCEZIONI_1 CHECK (TIPO IN ('INBOX','OUTBOX')), -- fk/pk keys constraints CONSTRAINT fk_LISTA_ECCEZIONI_1 FOREIGN KEY (ID_MESSAGGIO,TIPO) REFERENCES REPOSITORY_BUSTE(ID_MESSAGGIO,TIPO) ON DELETE CASCADE, CONSTRAINT pk_LISTA_ECCEZIONI PRIMARY KEY (id) ); -- index CREATE INDEX LISTA_ECC_ID ON LISTA_ECCEZIONI (ID_MESSAGGIO,TIPO); CREATE INDEX LISTA_ECC_VALIDAZIONE ON LISTA_ECCEZIONI (ID_MESSAGGIO,TIPO,VALIDAZIONE); CREATE SEQUENCE seq_LISTA_EXT_PROTOCOL_INFO start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 CYCLE; CREATE TABLE LISTA_EXT_PROTOCOL_INFO ( ID_MESSAGGIO VARCHAR(255) NOT NULL, TIPO VARCHAR(255) NOT NULL, NOME VARCHAR(255) NOT NULL, VALORE TEXT NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_LISTA_EXT_PROTOCOL_INFO') NOT NULL, -- check constraints CONSTRAINT chk_LISTA_EXT_PROTOCOL_INFO_1 CHECK (TIPO IN ('INBOX','OUTBOX')), -- fk/pk keys constraints CONSTRAINT fk_LISTA_EXT_PROTOCOL_INFO_1 FOREIGN KEY (ID_MESSAGGIO,TIPO) REFERENCES REPOSITORY_BUSTE(ID_MESSAGGIO,TIPO) ON DELETE CASCADE, CONSTRAINT pk_LISTA_EXT_PROTOCOL_INFO PRIMARY KEY (id) ); -- index CREATE INDEX LISTA_EXT_ID ON LISTA_EXT_PROTOCOL_INFO (ID_MESSAGGIO,TIPO); -- **** Riscontri **** CREATE TABLE RISCONTRI_DA_RICEVERE ( ID_MESSAGGIO VARCHAR(255) NOT NULL, DATA_INVIO TIMESTAMP NOT NULL, -- fk/pk columns -- fk/pk keys constraints CONSTRAINT pk_RISCONTRI_DA_RICEVERE PRIMARY KEY (ID_MESSAGGIO) ); -- index CREATE INDEX RISCONTRI_NON_RICEVUTI ON RISCONTRI_DA_RICEVERE (DATA_INVIO); -- **** Sequenze **** CREATE TABLE SEQUENZA_DA_INVIARE ( MITTENTE VARCHAR(255) NOT NULL, TIPO_MITTENTE VARCHAR(255) NOT NULL, DESTINATARIO VARCHAR(255) NOT NULL, TIPO_DESTINATARIO VARCHAR(255) NOT NULL, SERVIZIO VARCHAR(255) NOT NULL, TIPO_SERVIZIO VARCHAR(255) NOT NULL, AZIONE VARCHAR(255) NOT NULL DEFAULT '', PROSSIMA_SEQUENZA INT NOT NULL, ID_COLLABORAZIONE VARCHAR(255) NOT NULL, -- fk/pk columns -- fk/pk keys constraints CONSTRAINT pk_SEQUENZA_DA_INVIARE PRIMARY KEY (MITTENTE,TIPO_MITTENTE,DESTINATARIO,TIPO_DESTINATARIO,SERVIZIO,TIPO_SERVIZIO,AZIONE) ); CREATE TABLE SEQUENZA_DA_RICEVERE ( ID_COLLABORAZIONE VARCHAR(255) NOT NULL, SEQUENZA_ATTESA INT NOT NULL, -- le informazioni su mitt/dest/servizio/azione servono per un controllo di validazione sulla collaborazione MITTENTE VARCHAR(255) NOT NULL, TIPO_MITTENTE VARCHAR(255) NOT NULL, DESTINATARIO VARCHAR(255) NOT NULL, TIPO_DESTINATARIO VARCHAR(255) NOT NULL, SERVIZIO VARCHAR(255) NOT NULL, TIPO_SERVIZIO VARCHAR(255) NOT NULL, AZIONE VARCHAR(255), -- fk/pk columns -- fk/pk keys constraints CONSTRAINT pk_SEQUENZA_DA_RICEVERE PRIMARY KEY (ID_COLLABORAZIONE) ); -- **** Asincroni **** CREATE TABLE ASINCRONO ( ID_MESSAGGIO VARCHAR(255) NOT NULL, TIPO VARCHAR(255) NOT NULL, ORA_REGISTRAZIONE TIMESTAMP NOT NULL, RICEVUTA_ASINCRONA INT NOT NULL, TIPO_SERVIZIO_CORRELATO VARCHAR(255), SERVIZIO_CORRELATO VARCHAR(255), -- per diversificare il flusso di richiesta/ricevuta da risposta(richiestaStato)/ricevuta(Risposta) IS_RICHIESTA INT NOT NULL, ID_ASINCRONO VARCHAR(255) NOT NULL, ID_COLLABORAZIONE VARCHAR(255), -- 1 se la ricevuta applicativa e' abilitata, 0 se non lo e' RICEVUTA_APPLICATIVA INT NOT NULL, -- serve per la re-spedizione di una risposta asincrona BACKUP_ID_RICHIESTA VARCHAR(255), -- fk/pk columns -- check constraints CONSTRAINT chk_ASINCRONO_1 CHECK (TIPO IN ('INBOX','OUTBOX')), -- fk/pk keys constraints CONSTRAINT pk_ASINCRONO PRIMARY KEY (ID_MESSAGGIO,TIPO) ); -- index CREATE INDEX ASINCRONO_BACKUP_ID ON ASINCRONO (BACKUP_ID_RICHIESTA); CREATE INDEX ASINCRONO_IS_RICEVUTA ON ASINCRONO (ID_MESSAGGIO,TIPO,RICEVUTA_ASINCRONA); CREATE INDEX ASINCRONO_NON_RICEVUTE ON ASINCRONO (ORA_REGISTRAZIONE,TIPO,RICEVUTA_ASINCRONA,RICEVUTA_APPLICATIVA); -- openspcoop2 -- **** Serial for ID **** CREATE TABLE ID_MESSAGGIO ( COUNTER BIGINT NOT NULL, PROTOCOLLO VARCHAR(255) NOT NULL, ora_registrazione TIMESTAMP DEFAULT CURRENT_TIMESTAMP, -- fk/pk columns -- fk/pk keys constraints CONSTRAINT pk_ID_MESSAGGIO PRIMARY KEY (PROTOCOLLO) ); CREATE TABLE ID_MESSAGGIO_RELATIVO ( COUNTER BIGINT NOT NULL, PROTOCOLLO VARCHAR(255) NOT NULL, INFO_ASSOCIATA VARCHAR(255) NOT NULL, ora_registrazione TIMESTAMP DEFAULT CURRENT_TIMESTAMP, -- fk/pk columns -- fk/pk keys constraints CONSTRAINT pk_ID_MESSAGGIO_RELATIVO PRIMARY KEY (PROTOCOLLO,INFO_ASSOCIATA) ); CREATE TABLE ID_MESSAGGIO_PRG ( PROGRESSIVO VARCHAR(255) NOT NULL, PROTOCOLLO VARCHAR(255) NOT NULL, ora_registrazione TIMESTAMP DEFAULT CURRENT_TIMESTAMP, -- fk/pk columns -- fk/pk keys constraints CONSTRAINT pk_ID_MESSAGGIO_PRG PRIMARY KEY (PROTOCOLLO) ); CREATE TABLE ID_MESSAGGIO_RELATIVO_PRG ( PROGRESSIVO VARCHAR(255) NOT NULL, PROTOCOLLO VARCHAR(255) NOT NULL, INFO_ASSOCIATA VARCHAR(255) NOT NULL, ora_registrazione TIMESTAMP DEFAULT CURRENT_TIMESTAMP, -- fk/pk columns -- fk/pk keys constraints CONSTRAINT pk_ID_MESSAGGIO_RELATIVO_PRG PRIMARY KEY (PROTOCOLLO,INFO_ASSOCIATA) ); -- openspcoop2 -- **** Messaggi **** CREATE TABLE MESSAGGI ( ID_MESSAGGIO VARCHAR(255) NOT NULL, TIPO VARCHAR(255) NOT NULL, RIFERIMENTO_MSG VARCHAR(255), ERRORE_PROCESSAMENTO TEXT, -- data dalla quale il msg puo' essere rispedito in caso di errori RISPEDIZIONE TIMESTAMP NOT NULL, ORA_REGISTRAZIONE TIMESTAMP NOT NULL, PROPRIETARIO VARCHAR(255), -- le colonne seguenti servono per il servizio di TransactionManager MOD_RICEZ_CONT_APPLICATIVI VARCHAR(255), MOD_RICEZ_BUSTE VARCHAR(255), MOD_INOLTRO_BUSTE VARCHAR(255), MOD_INOLTRO_RISPOSTE VARCHAR(255), MOD_IMBUSTAMENTO VARCHAR(255), MOD_IMBUSTAMENTO_RISPOSTE VARCHAR(255), MOD_SBUSTAMENTO VARCHAR(255), MOD_SBUSTAMENTO_RISPOSTE VARCHAR(255), -- Thread Pool:impedisce la gestione di messaggi gia schedulati SCHEDULING INT DEFAULT 0, -- permette la riconsegna del messaggio dopo tot tempo REDELIVERY_DELAY TIMESTAMP NOT NULL, -- numero di riconsegne effettuate REDELIVERY_COUNT INT DEFAULT 0, -- id del nodo del cluster che deve gestire questo messaggio. CLUSTER_ID VARCHAR(255), -- memorizza l'ora in cui il messaggio e stato schedulato la prima volta SCHEDULING_TIME TIMESTAMP, -- contiene un messaggio serializzato MSG_BYTES BYTEA, CORRELAZIONE_APPLICATIVA VARCHAR(255), CORRELAZIONE_RISPOSTA VARCHAR(255), PROTOCOLLO VARCHAR(255) NOT NULL, -- fk/pk columns -- check constraints CONSTRAINT chk_MESSAGGI_1 CHECK (TIPO IN ('INBOX','OUTBOX')), -- fk/pk keys constraints CONSTRAINT pk_MESSAGGI PRIMARY KEY (ID_MESSAGGIO,TIPO) ); -- index CREATE INDEX MESSAGGI_SEARCH ON MESSAGGI (ORA_REGISTRAZIONE,RIFERIMENTO_MSG,TIPO,PROPRIETARIO); CREATE INDEX MESSAGGI_RIFMSG ON MESSAGGI (RIFERIMENTO_MSG); CREATE INDEX MESSAGGI_TESTSUITE ON MESSAGGI (PROPRIETARIO,ID_MESSAGGIO,RIFERIMENTO_MSG); CREATE TABLE MSG_SERVIZI_APPLICATIVI ( ID_MESSAGGIO VARCHAR(255) NOT NULL, TIPO VARCHAR(255) NOT NULL DEFAULT 'INBOX', SERVIZIO_APPLICATIVO VARCHAR(255) NOT NULL, SBUSTAMENTO_SOAP INT NOT NULL, SBUSTAMENTO_INFO_PROTOCOL INT NOT NULL, INTEGRATION_MANAGER INT NOT NULL, MOD_CONSEGNA_CONT_APPLICATIVI VARCHAR(255), -- Assume il valore 'Connettore' se la consegna avviente tramite un connettore, -- 'ConnectionReply' se viene ritornato tramite connectionReply, -- 'IntegrationManager' se e' solo ottenibile tramite IntegrationManager TIPO_CONSEGNA VARCHAR(255) NOT NULL, ERRORE_PROCESSAMENTO TEXT, -- data dalla quale il msg puo' essere rispedito in caso di errori RISPEDIZIONE TIMESTAMP NOT NULL, NOME_PORTA VARCHAR(255), -- fk/pk columns -- check constraints CONSTRAINT chk_MSG_SERVIZI_APPLICATIVI_1 CHECK (TIPO IN ('INBOX','OUTBOX')), CONSTRAINT chk_MSG_SERVIZI_APPLICATIVI_2 CHECK (TIPO_CONSEGNA IN ('Connettore','ConnectionReply','IntegrationManager')), -- fk/pk keys constraints CONSTRAINT fk_MSG_SERVIZI_APPLICATIVI_1 FOREIGN KEY (ID_MESSAGGIO,TIPO) REFERENCES MESSAGGI(ID_MESSAGGIO,TIPO) ON DELETE CASCADE, CONSTRAINT pk_MSG_SERVIZI_APPLICATIVI PRIMARY KEY (ID_MESSAGGIO,SERVIZIO_APPLICATIVO) ); -- index CREATE INDEX MSG_SERV_APPL_LIST ON MSG_SERVIZI_APPLICATIVI (SERVIZIO_APPLICATIVO,INTEGRATION_MANAGER); CREATE INDEX MSG_SERV_APPL_TIMEOUT ON MSG_SERVIZI_APPLICATIVI (ID_MESSAGGIO,TIPO_CONSEGNA,INTEGRATION_MANAGER); CREATE TABLE DEFINIZIONE_MESSAGGI ( ID_MESSAGGIO VARCHAR(255) NOT NULL, TIPO VARCHAR(255) NOT NULL, SOAP_ACTION VARCHAR(255), CONTENT_TYPE VARCHAR(255) NOT NULL, CONTENT_LOCATION VARCHAR(255), MSG_BYTES BYTEA, -- fk/pk columns -- check constraints CONSTRAINT chk_DEFINIZIONE_MESSAGGI_1 CHECK (TIPO IN ('INBOX','OUTBOX')), -- fk/pk keys constraints CONSTRAINT fk_DEFINIZIONE_MESSAGGI_1 FOREIGN KEY (ID_MESSAGGIO,TIPO) REFERENCES MESSAGGI(ID_MESSAGGIO,TIPO) ON DELETE CASCADE, CONSTRAINT pk_DEFINIZIONE_MESSAGGI PRIMARY KEY (ID_MESSAGGIO,TIPO) ); -- **** Correlazione Applicativa **** CREATE SEQUENCE seq_CORRELAZIONE_APPLICATIVA start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 CYCLE; CREATE TABLE CORRELAZIONE_APPLICATIVA ( ID_MESSAGGIO VARCHAR(255) NOT NULL, ID_APPLICATIVO VARCHAR(255) NOT NULL, SERVIZIO_APPLICATIVO VARCHAR(255) NOT NULL, TIPO_MITTENTE VARCHAR(255) NOT NULL, MITTENTE VARCHAR(255) NOT NULL, TIPO_DESTINATARIO VARCHAR(255) NOT NULL, DESTINATARIO VARCHAR(255) NOT NULL, TIPO_SERVIZIO VARCHAR(255), SERVIZIO VARCHAR(255), AZIONE VARCHAR(255), SCADENZA TIMESTAMP, ora_registrazione TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, -- fk/pk columns id BIGINT DEFAULT nextval('seq_CORRELAZIONE_APPLICATIVA') NOT NULL, -- fk/pk keys constraints CONSTRAINT pk_CORRELAZIONE_APPLICATIVA PRIMARY KEY (id) ); -- index CREATE INDEX CORR_APPL_SCADUTE ON CORRELAZIONE_APPLICATIVA (SCADENZA); CREATE INDEX CORR_APPL_OLD ON CORRELAZIONE_APPLICATIVA (ora_registrazione); -- openspcoop2 CREATE SEQUENCE seq_db_info start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE db_info ( major_version INT NOT NULL, minor_version INT NOT NULL, notes VARCHAR(255) NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_db_info') NOT NULL, -- fk/pk keys constraints CONSTRAINT pk_db_info PRIMARY KEY (id) ); -- openspcoop2 INSERT INTO db_info (major_version,minor_version,notes) VALUES (2,3,'[OpenSPCoop_tags_2.3_ant_setup Revision N.12244, LastChangedRevision N.12244, 10/04/2016 01:37 PM] Database della Porta di Dominio OpenSPCoop2'); -- **** Porte di Dominio **** CREATE SEQUENCE seq_pdd start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE pdd ( nome VARCHAR(255) NOT NULL, descrizione VARCHAR(255), -- ip pubblico ip VARCHAR(255), -- porta pubblico porta INT, -- protocollo pubblico protocollo VARCHAR(255), -- ip gestione ip_gestione VARCHAR(255), -- porta gestione porta_gestione INT, -- protocollo gestione protocollo_gestione VARCHAR(255), -- Tipo della Porta tipo VARCHAR(255), implementazione VARCHAR(255) DEFAULT 'standard', subject VARCHAR(255), password VARCHAR(255), -- client auth: disabilitato/abilitato client_auth VARCHAR(255), ora_registrazione TIMESTAMP DEFAULT CURRENT_TIMESTAMP, superuser VARCHAR(255), -- fk/pk columns id BIGINT DEFAULT nextval('seq_pdd') NOT NULL, -- check constraints CONSTRAINT chk_pdd_1 CHECK (tipo IN ('operativo','nonoperativo','esterno')), -- unique constraints CONSTRAINT unique_pdd_1 UNIQUE (nome), -- fk/pk keys constraints CONSTRAINT pk_pdd PRIMARY KEY (id) ); -- openspcoop2 -- **** Connettori **** CREATE SEQUENCE seq_connettori start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE connettori ( -- (disabilitato,http,jms) endpointtype VARCHAR(255) NOT NULL, nome_connettore VARCHAR(255) NOT NULL, -- url nel caso http url VARCHAR(255), -- nome coda jms nome VARCHAR(255), -- tipo coda jms (queue,topic) tipo VARCHAR(255), -- utente di una connessione jms utente VARCHAR(255), -- password per una connessione jms password VARCHAR(255), -- context property: initial_content initcont VARCHAR(255), -- context property: url_pkg urlpkg VARCHAR(255), -- context property: provider_url provurl VARCHAR(255), -- ConnectionFactory JMS connection_factory VARCHAR(255), -- Messaggio JMS inviato come text/byte message send_as VARCHAR(255), -- 1/0 (true/false) abilita il debug tramite il connettore debug INT DEFAULT 0, -- 1/0 (true/false) indica se il connettore e' gestito tramite le proprieta' custom custom INT DEFAULT 0, -- fk/pk columns id BIGINT DEFAULT nextval('seq_connettori') NOT NULL, -- unique constraints CONSTRAINT unique_connettori_1 UNIQUE (nome_connettore), -- fk/pk keys constraints CONSTRAINT pk_connettori PRIMARY KEY (id) ); CREATE SEQUENCE seq_connettori_custom start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE connettori_custom ( name VARCHAR(255) NOT NULL, value VARCHAR(255) NOT NULL, id_connettore BIGINT NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_connettori_custom') NOT NULL, -- unique constraints CONSTRAINT unique_connettori_custom_1 UNIQUE (id_connettore,name,value), -- fk/pk keys constraints CONSTRAINT fk_connettori_custom_1 FOREIGN KEY (id_connettore) REFERENCES connettori(id), CONSTRAINT pk_connettori_custom PRIMARY KEY (id) ); CREATE SEQUENCE seq_connettori_properties start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE connettori_properties ( -- nome connettore personalizzato attraverso file properties nome_connettore VARCHAR(255) NOT NULL, -- location del file properties path VARCHAR(255) NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_connettori_properties') NOT NULL, -- unique constraints CONSTRAINT unique_connettori_properties_1 UNIQUE (nome_connettore), -- fk/pk keys constraints CONSTRAINT pk_connettori_properties PRIMARY KEY (id) ); -- openspcoop2 -- **** Connettori Gestione Errore **** CREATE SEQUENCE seq_gestione_errore start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE gestione_errore ( -- accetta/rispedisci comportamento_default VARCHAR(255), cadenza_rispedizione VARCHAR(255), nome VARCHAR(255) NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_gestione_errore') NOT NULL, -- unique constraints CONSTRAINT unique_gestione_errore_1 UNIQUE (nome), -- fk/pk keys constraints CONSTRAINT pk_gestione_errore PRIMARY KEY (id) ); CREATE SEQUENCE seq_gestione_errore_trasporto start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE gestione_errore_trasporto ( id_gestione_errore BIGINT NOT NULL, valore_massimo INT, valore_minimo INT, -- accetta/rispedisci comportamento VARCHAR(255), cadenza_rispedizione VARCHAR(255), -- fk/pk columns id BIGINT DEFAULT nextval('seq_gestione_errore_trasporto') NOT NULL, -- fk/pk keys constraints CONSTRAINT fk_gestione_errore_trasporto_1 FOREIGN KEY (id_gestione_errore) REFERENCES gestione_errore(id), CONSTRAINT pk_gestione_errore_trasporto PRIMARY KEY (id) ); CREATE SEQUENCE seq_gestione_errore_soap start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE gestione_errore_soap ( id_gestione_errore BIGINT NOT NULL, fault_actor VARCHAR(255), fault_code VARCHAR(255), fault_string VARCHAR(255), -- accetta/rispedisci comportamento VARCHAR(255), cadenza_rispedizione VARCHAR(255), -- fk/pk columns id BIGINT DEFAULT nextval('seq_gestione_errore_soap') NOT NULL, -- fk/pk keys constraints CONSTRAINT fk_gestione_errore_soap_1 FOREIGN KEY (id_gestione_errore) REFERENCES gestione_errore(id), CONSTRAINT pk_gestione_errore_soap PRIMARY KEY (id) ); -- openspcoop2 -- **** Soggetti **** CREATE SEQUENCE seq_soggetti start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE soggetti ( nome_soggetto VARCHAR(255) NOT NULL, tipo_soggetto VARCHAR(255) NOT NULL, descrizione VARCHAR(255), identificativo_porta VARCHAR(255), -- 1/0 (true/false) svolge attivita di router is_router INT DEFAULT 0, id_connettore BIGINT NOT NULL, superuser VARCHAR(255), server VARCHAR(255), -- 1/0 (true/false) indica se il soggetto e' privato/pubblico privato INT DEFAULT 0, ora_registrazione TIMESTAMP DEFAULT CURRENT_TIMESTAMP, profilo VARCHAR(255), codice_ipa VARCHAR(255) NOT NULL, pd_url_prefix_rewriter VARCHAR(255), pa_url_prefix_rewriter VARCHAR(255), -- fk/pk columns id BIGINT DEFAULT nextval('seq_soggetti') NOT NULL, -- unique constraints CONSTRAINT unique_soggetti_1 UNIQUE (nome_soggetto,tipo_soggetto), CONSTRAINT unique_soggetti_2 UNIQUE (codice_ipa), -- fk/pk keys constraints CONSTRAINT fk_soggetti_1 FOREIGN KEY (id_connettore) REFERENCES connettori(id), CONSTRAINT pk_soggetti PRIMARY KEY (id) ); -- openspcoop2 -- **** Documenti **** CREATE SEQUENCE seq_documenti start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE documenti ( ruolo VARCHAR(255) NOT NULL, -- tipo (es. xsd,xml...) tipo VARCHAR(255) NOT NULL, -- nome documento nome VARCHAR(255) NOT NULL, -- contenuto documento contenuto BYTEA NOT NULL, -- idOggettoProprietarioDocumento id_proprietario BIGINT NOT NULL, -- tipoProprietario tipo_proprietario VARCHAR(255) NOT NULL, ora_registrazione TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, -- fk/pk columns id BIGINT DEFAULT nextval('seq_documenti') NOT NULL, -- check constraints CONSTRAINT chk_documenti_1 CHECK (ruolo IN ('allegato','specificaSemiformale','specificaLivelloServizio','specificaSicurezza','specificaCoordinamento')), CONSTRAINT chk_documenti_2 CHECK (tipo_proprietario IN ('accordoServizio','accordoCooperazione','servizio')), -- unique constraints CONSTRAINT unique_documenti_1 UNIQUE (ruolo,tipo,nome,id_proprietario,tipo_proprietario), -- fk/pk keys constraints CONSTRAINT pk_documenti PRIMARY KEY (id) ); -- index CREATE INDEX INDEX_DOC_SEARCH ON documenti (id_proprietario); -- **** Accordi di Servizio Parte Comune **** CREATE SEQUENCE seq_accordi start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE accordi ( nome VARCHAR(255) NOT NULL, descrizione VARCHAR(255), profilo_collaborazione VARCHAR(255), wsdl_definitorio TEXT, wsdl_concettuale TEXT, wsdl_logico_erogatore TEXT, wsdl_logico_fruitore TEXT, spec_conv_concettuale TEXT, spec_conv_erogatore TEXT, spec_conv_fruitore TEXT, filtro_duplicati VARCHAR(255), conferma_ricezione VARCHAR(255), identificativo_collaborazione VARCHAR(255), consegna_in_ordine VARCHAR(255), scadenza VARCHAR(255), superuser VARCHAR(255), -- id del soggetto referente id_referente BIGINT DEFAULT 0, versione VARCHAR(255) DEFAULT '', -- 1/0 (vero/falso) indica se questo accordo di servizio e' utilizzabile in mancanza di azioni associate utilizzo_senza_azione INT DEFAULT 1, -- 1/0 (true/false) indica se il soggetto e' privato/pubblico privato INT DEFAULT 0, ora_registrazione TIMESTAMP DEFAULT CURRENT_TIMESTAMP, stato VARCHAR(255) NOT NULL DEFAULT 'finale', -- fk/pk columns id BIGINT DEFAULT nextval('seq_accordi') NOT NULL, -- check constraints CONSTRAINT chk_accordi_1 CHECK (stato IN ('finale','bozza','operativo')), -- unique constraints CONSTRAINT unique_accordi_1 UNIQUE (nome,id_referente,versione), -- fk/pk keys constraints CONSTRAINT pk_accordi PRIMARY KEY (id) ); CREATE SEQUENCE seq_accordi_azioni start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE accordi_azioni ( id_accordo BIGINT NOT NULL, nome VARCHAR(255) NOT NULL, profilo_collaborazione VARCHAR(255), filtro_duplicati VARCHAR(255), conferma_ricezione VARCHAR(255), identificativo_collaborazione VARCHAR(255), consegna_in_ordine VARCHAR(255), scadenza VARCHAR(255), correlata VARCHAR(255), -- ridefinito/default profilo_azione VARCHAR(255), -- fk/pk columns id BIGINT DEFAULT nextval('seq_accordi_azioni') NOT NULL, -- unique constraints CONSTRAINT unique_accordi_azioni_1 UNIQUE (id_accordo,nome), -- fk/pk keys constraints CONSTRAINT fk_accordi_azioni_1 FOREIGN KEY (id_accordo) REFERENCES accordi(id), CONSTRAINT pk_accordi_azioni PRIMARY KEY (id) ); CREATE SEQUENCE seq_port_type start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE port_type ( id_accordo BIGINT NOT NULL, nome VARCHAR(255) NOT NULL, descrizione VARCHAR(255), profilo_collaborazione VARCHAR(255), filtro_duplicati VARCHAR(255), conferma_ricezione VARCHAR(255), identificativo_collaborazione VARCHAR(255), consegna_in_ordine VARCHAR(255), scadenza VARCHAR(255), -- ridefinito/default profilo_pt VARCHAR(255), -- document/RPC soap_style VARCHAR(255), -- fk/pk columns id BIGINT DEFAULT nextval('seq_port_type') NOT NULL, -- unique constraints CONSTRAINT unique_port_type_1 UNIQUE (id_accordo,nome), -- fk/pk keys constraints CONSTRAINT fk_port_type_1 FOREIGN KEY (id_accordo) REFERENCES accordi(id), CONSTRAINT pk_port_type PRIMARY KEY (id) ); CREATE SEQUENCE seq_port_type_azioni start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE port_type_azioni ( id_port_type BIGINT NOT NULL, nome VARCHAR(255) NOT NULL, profilo_collaborazione VARCHAR(255), filtro_duplicati VARCHAR(255), conferma_ricezione VARCHAR(255), identificativo_collaborazione VARCHAR(255), consegna_in_ordine VARCHAR(255), scadenza VARCHAR(255), correlata_servizio VARCHAR(255), correlata VARCHAR(255), -- ridefinito/default profilo_pt_azione VARCHAR(255), -- document/rpc soap_style VARCHAR(255), soap_action VARCHAR(255), -- literal/encoded soap_use_msg_input VARCHAR(255), -- namespace utilizzato per RPC soap_namespace_msg_input VARCHAR(255), -- literal/encoded soap_use_msg_output VARCHAR(255), -- namespace utilizzato per RPC soap_namespace_msg_output VARCHAR(255), -- fk/pk columns id BIGINT DEFAULT nextval('seq_port_type_azioni') NOT NULL, -- unique constraints CONSTRAINT unique_port_type_azioni_1 UNIQUE (id_port_type,nome), -- fk/pk keys constraints CONSTRAINT fk_port_type_azioni_1 FOREIGN KEY (id_port_type) REFERENCES port_type(id), CONSTRAINT pk_port_type_azioni PRIMARY KEY (id) ); CREATE SEQUENCE seq_operation_messages start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE operation_messages ( id_port_type_azione BIGINT NOT NULL, -- true(1)/false(0), true indica un input-message, false un output-message input_message INT DEFAULT 1, name VARCHAR(255) NOT NULL, element_name VARCHAR(255), element_namespace VARCHAR(255), type_name VARCHAR(255), type_namespace VARCHAR(255), -- fk/pk columns id BIGINT DEFAULT nextval('seq_operation_messages') NOT NULL, -- fk/pk keys constraints CONSTRAINT fk_operation_messages_1 FOREIGN KEY (id_port_type_azione) REFERENCES port_type_azioni(id), CONSTRAINT pk_operation_messages PRIMARY KEY (id) ); -- index CREATE INDEX INDEX_OP_MESSAGES ON operation_messages (id_port_type_azione,input_message); -- **** Accordi di Cooperazione **** CREATE SEQUENCE seq_accordi_cooperazione start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE accordi_cooperazione ( nome VARCHAR(255) NOT NULL, descrizione VARCHAR(255), -- id del soggetto referente id_referente BIGINT DEFAULT 0, versione VARCHAR(255) DEFAULT '', stato VARCHAR(255) NOT NULL DEFAULT 'finale', -- 1/0 (true/false) indica se il soggetto e' privato/pubblico privato INT DEFAULT 0, superuser VARCHAR(255), ora_registrazione TIMESTAMP DEFAULT CURRENT_TIMESTAMP, -- fk/pk columns id BIGINT DEFAULT nextval('seq_accordi_cooperazione') NOT NULL, -- check constraints CONSTRAINT chk_accordi_cooperazione_1 CHECK (stato IN ('finale','bozza','operativo')), -- unique constraints CONSTRAINT unique_accordi_cooperazione_1 UNIQUE (nome,versione), -- fk/pk keys constraints CONSTRAINT pk_accordi_cooperazione PRIMARY KEY (id) ); CREATE SEQUENCE seq_accordi_coop_partecipanti start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE accordi_coop_partecipanti ( id_accordo_cooperazione BIGINT NOT NULL, id_soggetto BIGINT NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_accordi_coop_partecipanti') NOT NULL, -- unique constraints CONSTRAINT unique_acc_coop_part_1 UNIQUE (id_accordo_cooperazione,id_soggetto), -- fk/pk keys constraints CONSTRAINT fk_accordi_coop_partecipanti_1 FOREIGN KEY (id_soggetto) REFERENCES soggetti(id), CONSTRAINT fk_accordi_coop_partecipanti_2 FOREIGN KEY (id_accordo_cooperazione) REFERENCES accordi_cooperazione(id), CONSTRAINT pk_accordi_coop_partecipanti PRIMARY KEY (id) ); -- index CREATE INDEX INDEX_AC_COOP_PAR ON accordi_coop_partecipanti (id_accordo_cooperazione); -- **** Accordi di Servizio Parte Specifica **** CREATE SEQUENCE seq_servizi start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE servizi ( nome_servizio VARCHAR(255) NOT NULL, tipo_servizio VARCHAR(255) NOT NULL, id_soggetto BIGINT NOT NULL, id_accordo BIGINT NOT NULL, servizio_correlato VARCHAR(255), id_connettore BIGINT NOT NULL, wsdl_implementativo_erogatore TEXT, wsdl_implementativo_fruitore TEXT, superuser VARCHAR(255), -- 1/0 (true/false) indica se il soggetto e' privato/pubblico privato INT DEFAULT 0, ora_registrazione TIMESTAMP DEFAULT CURRENT_TIMESTAMP, port_type VARCHAR(255), profilo VARCHAR(255), descrizione VARCHAR(255), stato VARCHAR(255) NOT NULL DEFAULT 'finale', -- identificativi accordo di servizio parte specifica aps_nome VARCHAR(255), aps_versione VARCHAR(255), -- fk/pk columns id BIGINT DEFAULT nextval('seq_servizi') NOT NULL, -- check constraints CONSTRAINT chk_servizi_1 CHECK (stato IN ('finale','bozza','operativo')), -- unique constraints CONSTRAINT unique_servizi_1 UNIQUE (nome_servizio,tipo_servizio,id_soggetto), -- fk/pk keys constraints CONSTRAINT fk_servizi_1 FOREIGN KEY (id_connettore) REFERENCES connettori(id), CONSTRAINT fk_servizi_2 FOREIGN KEY (id_soggetto) REFERENCES soggetti(id), CONSTRAINT fk_servizi_3 FOREIGN KEY (id_accordo) REFERENCES accordi(id), CONSTRAINT pk_servizi PRIMARY KEY (id) ); -- index CREATE INDEX INDEX_APS ON servizi (aps_nome,aps_versione,id_soggetto); CREATE SEQUENCE seq_servizi_fruitori start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE servizi_fruitori ( id_servizio BIGINT NOT NULL, id_soggetto BIGINT NOT NULL, id_connettore BIGINT NOT NULL, wsdl_implementativo_erogatore TEXT, wsdl_implementativo_fruitore TEXT, ora_registrazione TIMESTAMP DEFAULT CURRENT_TIMESTAMP, profilo VARCHAR(255), -- client auth: disabilitato/abilitato client_auth VARCHAR(255), stato VARCHAR(255) NOT NULL DEFAULT 'finale', -- fk/pk columns id BIGINT DEFAULT nextval('seq_servizi_fruitori') NOT NULL, -- check constraints CONSTRAINT chk_servizi_fruitori_1 CHECK (stato IN ('finale','bozza','operativo')), -- unique constraints CONSTRAINT unique_servizi_fruitori_1 UNIQUE (id_servizio,id_soggetto), -- fk/pk keys constraints CONSTRAINT fk_servizi_fruitori_1 FOREIGN KEY (id_connettore) REFERENCES connettori(id), CONSTRAINT fk_servizi_fruitori_2 FOREIGN KEY (id_soggetto) REFERENCES soggetti(id), CONSTRAINT fk_servizi_fruitori_3 FOREIGN KEY (id_servizio) REFERENCES servizi(id), CONSTRAINT pk_servizi_fruitori PRIMARY KEY (id) ); CREATE SEQUENCE seq_servizi_azioni start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE servizi_azioni ( nome_azione VARCHAR(255) NOT NULL, id_servizio BIGINT NOT NULL, id_connettore BIGINT NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_servizi_azioni') NOT NULL, -- unique constraints CONSTRAINT unique_servizi_azioni_1 UNIQUE (nome_azione,id_servizio), -- fk/pk keys constraints CONSTRAINT fk_servizi_azioni_1 FOREIGN KEY (id_connettore) REFERENCES connettori(id), CONSTRAINT fk_servizi_azioni_2 FOREIGN KEY (id_servizio) REFERENCES servizi(id), CONSTRAINT pk_servizi_azioni PRIMARY KEY (id) ); -- **** Accordi di Servizio Composti **** CREATE SEQUENCE seq_acc_serv_composti start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE acc_serv_composti ( id_accordo BIGINT NOT NULL, id_accordo_cooperazione BIGINT NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_acc_serv_composti') NOT NULL, -- unique constraints CONSTRAINT unique_acc_serv_composti_1 UNIQUE (id_accordo), -- fk/pk keys constraints CONSTRAINT fk_acc_serv_composti_1 FOREIGN KEY (id_accordo_cooperazione) REFERENCES accordi_cooperazione(id), CONSTRAINT fk_acc_serv_composti_2 FOREIGN KEY (id_accordo) REFERENCES accordi(id), CONSTRAINT pk_acc_serv_composti PRIMARY KEY (id) ); -- index CREATE INDEX INDEX_AC_SC ON acc_serv_composti (id_accordo_cooperazione); CREATE SEQUENCE seq_acc_serv_componenti start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE acc_serv_componenti ( id_servizio_composto BIGINT NOT NULL, id_servizio_componente BIGINT NOT NULL, azione VARCHAR(255), -- fk/pk columns id BIGINT DEFAULT nextval('seq_acc_serv_componenti') NOT NULL, -- fk/pk keys constraints CONSTRAINT fk_acc_serv_componenti_1 FOREIGN KEY (id_servizio_composto) REFERENCES acc_serv_composti(id), CONSTRAINT fk_acc_serv_componenti_2 FOREIGN KEY (id_servizio_componente) REFERENCES servizi(id), CONSTRAINT pk_acc_serv_componenti PRIMARY KEY (id) ); -- index CREATE INDEX INDEX_AC_SC_SC ON acc_serv_componenti (id_servizio_composto); -- openspcoop2 -- **** Servizi Applicativi **** CREATE SEQUENCE seq_servizi_applicativi start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE servizi_applicativi ( nome VARCHAR(255) NOT NULL, descrizione VARCHAR(255), -- * Risposta Asincrona * -- valori 0/1 indicano rispettivamente FALSE/TRUE sbustamentorisp INT DEFAULT 0, getmsgrisp VARCHAR(255), -- FOREIGN KEY (id_gestione_errore_risp) REFERENCES gestione_errore(id) Nota: indica un eventuale tipologia di gestione dell'errore per la risposta asincrona id_gestione_errore_risp BIGINT, tipoauthrisp VARCHAR(255), utenterisp VARCHAR(255), passwordrisp VARCHAR(255), subjectrisp VARCHAR(255), invio_x_rif_risp VARCHAR(255), risposta_x_rif_risp VARCHAR(255), id_connettore_risp BIGINT NOT NULL, sbustamento_protocol_info_risp INT DEFAULT 1, -- * Invocazione Servizio * -- valori 0/1 indicano rispettivamente FALSE/TRUE sbustamentoinv INT DEFAULT 0, getmsginv VARCHAR(255), -- FOREIGN KEY (id_gestione_errore_inv) REFERENCES gestione_errore(id) Nota: indica un eventuale tipologia di gestione dell'errore per l'invocazione servizio id_gestione_errore_inv BIGINT, tipoauthinv VARCHAR(255), utenteinv VARCHAR(255), passwordinv VARCHAR(255), subjectinv VARCHAR(255), invio_x_rif_inv VARCHAR(255), risposta_x_rif_inv VARCHAR(255), id_connettore_inv BIGINT NOT NULL, sbustamento_protocol_info_inv INT DEFAULT 1, -- * SoggettoErogatore * id_soggetto BIGINT NOT NULL, -- * Invocazione Porta * fault VARCHAR(255), fault_actor VARCHAR(255), generic_fault_code VARCHAR(255), prefix_fault_code VARCHAR(255), tipoauth VARCHAR(255), utente VARCHAR(255), password VARCHAR(255), subject VARCHAR(255), invio_x_rif VARCHAR(255), sbustamento_protocol_info INT DEFAULT 1, tipologia_fruizione VARCHAR(255), tipologia_erogazione VARCHAR(255), ora_registrazione TIMESTAMP DEFAULT CURRENT_TIMESTAMP, -- fk/pk columns id BIGINT DEFAULT nextval('seq_servizi_applicativi') NOT NULL, -- unique constraints CONSTRAINT unique_servizi_applicativi_1 UNIQUE (nome,id_soggetto), -- fk/pk keys constraints CONSTRAINT fk_servizi_applicativi_1 FOREIGN KEY (id_connettore_inv) REFERENCES connettori(id), CONSTRAINT fk_servizi_applicativi_2 FOREIGN KEY (id_soggetto) REFERENCES soggetti(id), CONSTRAINT pk_servizi_applicativi PRIMARY KEY (id) ); -- openspcoop2 -- **** Ruoli **** CREATE SEQUENCE seq_ruoli_sa start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE ruoli_sa ( id_accordo BIGINT NOT NULL, servizio_correlato INT NOT NULL, id_servizio_applicativo BIGINT NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_ruoli_sa') NOT NULL, -- unique constraints CONSTRAINT unique_ruoli_sa_1 UNIQUE (id_accordo,servizio_correlato,id_servizio_applicativo), -- fk/pk keys constraints CONSTRAINT fk_ruoli_sa_1 FOREIGN KEY (id_servizio_applicativo) REFERENCES servizi_applicativi(id), CONSTRAINT fk_ruoli_sa_2 FOREIGN KEY (id_accordo) REFERENCES accordi(id), CONSTRAINT pk_ruoli_sa PRIMARY KEY (id) ); -- index CREATE INDEX INDEX_RUOLI ON ruoli_sa (id_accordo,servizio_correlato); CREATE INDEX INDEX_RUOLI_SA ON ruoli_sa (id_servizio_applicativo); -- openspcoop2 -- **** Politiche di Sicurezza **** CREATE SEQUENCE seq_politiche_sicurezza start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE politiche_sicurezza ( id_fruitore BIGINT NOT NULL, id_servizio BIGINT NOT NULL, id_servizio_applicativo BIGINT NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_politiche_sicurezza') NOT NULL, -- unique constraints CONSTRAINT unique_politiche_sicurezza_1 UNIQUE (id_fruitore,id_servizio,id_servizio_applicativo), -- fk/pk keys constraints CONSTRAINT fk_politiche_sicurezza_1 FOREIGN KEY (id_fruitore) REFERENCES soggetti(id), CONSTRAINT fk_politiche_sicurezza_2 FOREIGN KEY (id_servizio_applicativo) REFERENCES servizi_applicativi(id), CONSTRAINT fk_politiche_sicurezza_3 FOREIGN KEY (id_servizio) REFERENCES servizi(id), CONSTRAINT pk_politiche_sicurezza PRIMARY KEY (id) ); -- openspcoop2 -- **** Porte Delegate **** CREATE SEQUENCE seq_porte_delegate start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE porte_delegate ( nome_porta VARCHAR(255) NOT NULL, descrizione VARCHAR(255), -- la location sovrascrive il nome di una porta delegata, nella sua url di invocazione location VARCHAR(255), -- * Soggetto Erogatore * -- tipo/nome per le modalita static -- tipo/pattern per la modalita contentBased/urlBased -- id utilizzato in caso di registryInput id_soggetto_erogatore BIGINT, tipo_soggetto_erogatore VARCHAR(255), nome_soggetto_erogatore VARCHAR(255), mode_soggetto_erogatore VARCHAR(255), pattern_soggetto_erogatore VARCHAR(255), -- * Servizio * -- tipo/nome per le modalita static -- tipo/pattern per la modalita contentBased/urlBased -- id utilizzato in caso di registryInput id_servizio BIGINT, tipo_servizio VARCHAR(255), nome_servizio VARCHAR(255), mode_servizio VARCHAR(255), pattern_servizio VARCHAR(255), id_accordo BIGINT, id_port_type BIGINT, -- * Azione * -- tipo/nome per le modalita static -- tipo/pattern per la modalita contentBased/urlBased -- id utilizzato in caso di registryInput id_azione BIGINT, nome_azione VARCHAR(255), mode_azione VARCHAR(255), pattern_azione VARCHAR(255), -- abilitato/disabilitato force_wsdl_based_azione VARCHAR(255), -- * Configurazione * autenticazione VARCHAR(255), autorizzazione VARCHAR(255), autorizzazione_contenuto VARCHAR(255), -- disable/packaging/unpackaging/verify mtom_request_mode VARCHAR(255), -- disable/packaging/unpackaging/verify mtom_response_mode VARCHAR(255), -- abilitato/disabilitato (se abilitato le WSSproperties sono presenti nelle tabelle ...._ws_request/response) ws_security VARCHAR(255), -- abilitato/disabilitato ws_security_mtom_req VARCHAR(255), -- abilitato/disabilitato ws_security_mtom_res VARCHAR(255), -- abilitato/disabilitato ricevuta_asincrona_sim VARCHAR(255), -- abilitato/disabilitato ricevuta_asincrona_asim VARCHAR(255), -- abilitato/disabilitato/warningOnly validazione_contenuti_stato VARCHAR(255), -- wsdl/openspcoop/xsd validazione_contenuti_tipo VARCHAR(255), -- abilitato/disabilitato validazione_contenuti_mtom VARCHAR(255), -- lista di tipi separati dalla virgola integrazione VARCHAR(255), -- scadenza correlazione applicativa scadenza_correlazione_appl VARCHAR(255), -- abilitato/disabilitato allega_body VARCHAR(255), -- abilitato/disabilitato scarta_body VARCHAR(255), -- abilitato/disabilitato gestione_manifest VARCHAR(255), -- abilitato/disabilitato stateless VARCHAR(255), -- abilitato/disabilitato local_forward VARCHAR(255), -- proprietario porta delegata (Soggetto fruitore) id_soggetto BIGINT NOT NULL, ora_registrazione TIMESTAMP DEFAULT CURRENT_TIMESTAMP, -- fk/pk columns id BIGINT DEFAULT nextval('seq_porte_delegate') NOT NULL, -- unique constraints CONSTRAINT unique_porte_delegate_1 UNIQUE (id_soggetto,nome_porta), -- fk/pk keys constraints CONSTRAINT fk_porte_delegate_1 FOREIGN KEY (id_soggetto) REFERENCES soggetti(id), CONSTRAINT pk_porte_delegate PRIMARY KEY (id) ); CREATE SEQUENCE seq_porte_delegate_sa start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE porte_delegate_sa ( id_porta BIGINT NOT NULL, id_servizio_applicativo BIGINT NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_porte_delegate_sa') NOT NULL, -- unique constraints CONSTRAINT unique_porte_delegate_sa_1 UNIQUE (id_porta,id_servizio_applicativo), -- fk/pk keys constraints CONSTRAINT fk_porte_delegate_sa_1 FOREIGN KEY (id_servizio_applicativo) REFERENCES servizi_applicativi(id), CONSTRAINT fk_porte_delegate_sa_2 FOREIGN KEY (id_porta) REFERENCES porte_delegate(id), CONSTRAINT pk_porte_delegate_sa PRIMARY KEY (id) ); -- index CREATE INDEX INDEX_PD_SA ON porte_delegate_sa (id_porta); CREATE SEQUENCE seq_pd_mtom_request start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE pd_mtom_request ( id_porta BIGINT NOT NULL, nome VARCHAR(255) NOT NULL, pattern TEXT NOT NULL, content_type VARCHAR(255), required INT NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_pd_mtom_request') NOT NULL, -- fk/pk keys constraints CONSTRAINT fk_pd_mtom_request_1 FOREIGN KEY (id_porta) REFERENCES porte_delegate(id), CONSTRAINT pk_pd_mtom_request PRIMARY KEY (id) ); -- index CREATE INDEX INDEX_PD_MTOMTREQ ON pd_mtom_request (id_porta); CREATE SEQUENCE seq_pd_mtom_response start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE pd_mtom_response ( id_porta BIGINT NOT NULL, nome VARCHAR(255) NOT NULL, pattern TEXT NOT NULL, content_type VARCHAR(255), required INT NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_pd_mtom_response') NOT NULL, -- fk/pk keys constraints CONSTRAINT fk_pd_mtom_response_1 FOREIGN KEY (id_porta) REFERENCES porte_delegate(id), CONSTRAINT pk_pd_mtom_response PRIMARY KEY (id) ); -- index CREATE INDEX INDEX_PD_MTOMTRES ON pd_mtom_response (id_porta); CREATE SEQUENCE seq_pd_ws_request start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE pd_ws_request ( id_porta BIGINT NOT NULL, nome VARCHAR(255) NOT NULL, valore TEXT NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_pd_ws_request') NOT NULL, -- fk/pk keys constraints CONSTRAINT fk_pd_ws_request_1 FOREIGN KEY (id_porta) REFERENCES porte_delegate(id), CONSTRAINT pk_pd_ws_request PRIMARY KEY (id) ); -- index CREATE INDEX INDEX_PD_WSSREQ ON pd_ws_request (id_porta); CREATE SEQUENCE seq_pd_ws_response start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE pd_ws_response ( id_porta BIGINT NOT NULL, nome VARCHAR(255) NOT NULL, valore TEXT NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_pd_ws_response') NOT NULL, -- fk/pk keys constraints CONSTRAINT fk_pd_ws_response_1 FOREIGN KEY (id_porta) REFERENCES porte_delegate(id), CONSTRAINT pk_pd_ws_response PRIMARY KEY (id) ); -- index CREATE INDEX INDEX_PD_WSSRES ON pd_ws_response (id_porta); CREATE SEQUENCE seq_pd_correlazione start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE pd_correlazione ( id_porta BIGINT NOT NULL, nome_elemento VARCHAR(255), -- modalita di scelta user input, content-based, url-based, disabilitato mode_correlazione VARCHAR(255), -- pattern utilizzato solo per content/url based pattern TEXT, -- blocca/accetta identificazione_fallita VARCHAR(255), -- abilitato/disabilitato riuso_id VARCHAR(255), -- fk/pk columns id BIGINT DEFAULT nextval('seq_pd_correlazione') NOT NULL, -- fk/pk keys constraints CONSTRAINT fk_pd_correlazione_1 FOREIGN KEY (id_porta) REFERENCES porte_delegate(id), CONSTRAINT pk_pd_correlazione PRIMARY KEY (id) ); CREATE SEQUENCE seq_pd_correlazione_risposta start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE pd_correlazione_risposta ( id_porta BIGINT NOT NULL, nome_elemento VARCHAR(255), -- modalita di scelta user input, content-based, url-based, disabilitato mode_correlazione VARCHAR(255), -- pattern utilizzato solo per content/url based pattern TEXT, -- blocca/accetta identificazione_fallita VARCHAR(255), -- fk/pk columns id BIGINT DEFAULT nextval('seq_pd_correlazione_risposta') NOT NULL, -- fk/pk keys constraints CONSTRAINT fk_pd_correlazione_risposta_1 FOREIGN KEY (id_porta) REFERENCES porte_delegate(id), CONSTRAINT pk_pd_correlazione_risposta PRIMARY KEY (id) ); -- openspcoop2 -- **** Porte Applicative **** CREATE SEQUENCE seq_porte_applicative start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE porte_applicative ( nome_porta VARCHAR(255) NOT NULL, descrizione VARCHAR(255), -- Soggetto Virtuale id_soggetto_virtuale BIGINT, tipo_soggetto_virtuale VARCHAR(255), nome_soggetto_virtuale VARCHAR(255), -- Servizio id_servizio BIGINT, tipo_servizio VARCHAR(255), servizio VARCHAR(255), id_accordo BIGINT, id_port_type BIGINT, -- azione azione VARCHAR(255), -- disable/packaging/unpackaging/verify mtom_request_mode VARCHAR(255), -- disable/packaging/unpackaging/verify mtom_response_mode VARCHAR(255), -- abilitato/disabilitato (se abilitato le WSSproperties sono presenti nelle tabelle ...._ws_request/response) ws_security VARCHAR(255), -- abilitato/disabilitato ws_security_mtom_req VARCHAR(255), -- abilitato/disabilitato ws_security_mtom_res VARCHAR(255), -- abilitato/disabilitato ricevuta_asincrona_sim VARCHAR(255), -- abilitato/disabilitato ricevuta_asincrona_asim VARCHAR(255), -- abilitato/disabilitato/warningOnly validazione_contenuti_stato VARCHAR(255), -- wsdl/openspcoop/xsd validazione_contenuti_tipo VARCHAR(255), -- abilitato/disabilitato validazione_contenuti_mtom VARCHAR(255), -- lista di tipi separati dalla virgola integrazione VARCHAR(255), -- scadenza correlazione applicativa scadenza_correlazione_appl VARCHAR(255), -- abilitato/disabilitato allega_body VARCHAR(255), -- abilitato/disabilitato scarta_body VARCHAR(255), -- abilitato/disabilitato gestione_manifest VARCHAR(255), -- abilitato/disabilitato stateless VARCHAR(255), behaviour VARCHAR(255), autorizzazione_contenuto VARCHAR(255), -- proprietario porta applicativa id_soggetto BIGINT NOT NULL, ora_registrazione TIMESTAMP DEFAULT CURRENT_TIMESTAMP, -- fk/pk columns id BIGINT DEFAULT nextval('seq_porte_applicative') NOT NULL, -- unique constraints CONSTRAINT unique_porte_applicative_1 UNIQUE (id_soggetto,nome_porta), -- fk/pk keys constraints CONSTRAINT fk_porte_applicative_1 FOREIGN KEY (id_soggetto) REFERENCES soggetti(id), CONSTRAINT pk_porte_applicative PRIMARY KEY (id) ); CREATE SEQUENCE seq_porte_applicative_sa start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE porte_applicative_sa ( id_porta BIGINT NOT NULL, id_servizio_applicativo BIGINT NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_porte_applicative_sa') NOT NULL, -- unique constraints CONSTRAINT unique_porte_applicative_sa_1 UNIQUE (id_porta,id_servizio_applicativo), -- fk/pk keys constraints CONSTRAINT fk_porte_applicative_sa_1 FOREIGN KEY (id_servizio_applicativo) REFERENCES servizi_applicativi(id), CONSTRAINT fk_porte_applicative_sa_2 FOREIGN KEY (id_porta) REFERENCES porte_applicative(id), CONSTRAINT pk_porte_applicative_sa PRIMARY KEY (id) ); -- index CREATE INDEX INDEX_PA_SA ON porte_applicative_sa (id_porta); CREATE SEQUENCE seq_pa_properties start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE pa_properties ( id_porta BIGINT NOT NULL, nome VARCHAR(255) NOT NULL, valore VARCHAR(255) NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_pa_properties') NOT NULL, -- unique constraints CONSTRAINT uniq_pa_properties_1 UNIQUE (id_porta,nome,valore), -- fk/pk keys constraints CONSTRAINT fk_pa_properties_1 FOREIGN KEY (id_porta) REFERENCES porte_applicative(id), CONSTRAINT pk_pa_properties PRIMARY KEY (id) ); -- index CREATE INDEX INDEX_PA_PROP ON pa_properties (id_porta); CREATE SEQUENCE seq_pa_mtom_request start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE pa_mtom_request ( id_porta BIGINT NOT NULL, nome VARCHAR(255) NOT NULL, pattern TEXT NOT NULL, content_type VARCHAR(255), required INT NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_pa_mtom_request') NOT NULL, -- fk/pk keys constraints CONSTRAINT fk_pa_mtom_request_1 FOREIGN KEY (id_porta) REFERENCES porte_applicative(id), CONSTRAINT pk_pa_mtom_request PRIMARY KEY (id) ); -- index CREATE INDEX INDEX_PA_MTOMTREQ ON pa_mtom_request (id_porta); CREATE SEQUENCE seq_pa_mtom_response start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE pa_mtom_response ( id_porta BIGINT NOT NULL, nome VARCHAR(255) NOT NULL, pattern TEXT NOT NULL, content_type VARCHAR(255), required INT NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_pa_mtom_response') NOT NULL, -- fk/pk keys constraints CONSTRAINT fk_pa_mtom_response_1 FOREIGN KEY (id_porta) REFERENCES porte_applicative(id), CONSTRAINT pk_pa_mtom_response PRIMARY KEY (id) ); -- index CREATE INDEX INDEX_PA_MTOMTRES ON pa_mtom_response (id_porta); CREATE SEQUENCE seq_pa_ws_request start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE pa_ws_request ( id_porta BIGINT NOT NULL, nome VARCHAR(255) NOT NULL, valore TEXT NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_pa_ws_request') NOT NULL, -- fk/pk keys constraints CONSTRAINT fk_pa_ws_request_1 FOREIGN KEY (id_porta) REFERENCES porte_applicative(id), CONSTRAINT pk_pa_ws_request PRIMARY KEY (id) ); -- index CREATE INDEX INDEX_PA_WSSREQ ON pa_ws_request (id_porta); CREATE SEQUENCE seq_pa_ws_response start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE pa_ws_response ( id_porta BIGINT NOT NULL, nome VARCHAR(255) NOT NULL, valore TEXT NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_pa_ws_response') NOT NULL, -- fk/pk keys constraints CONSTRAINT fk_pa_ws_response_1 FOREIGN KEY (id_porta) REFERENCES porte_applicative(id), CONSTRAINT pk_pa_ws_response PRIMARY KEY (id) ); -- index CREATE INDEX INDEX_PA_WSSRES ON pa_ws_response (id_porta); CREATE SEQUENCE seq_pa_correlazione start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE pa_correlazione ( id_porta BIGINT NOT NULL, nome_elemento VARCHAR(255), -- modalita di scelta user input, content-based, url-based, disabilitato mode_correlazione VARCHAR(255), -- pattern utilizzato solo per content/url based pattern TEXT, -- blocca/accetta identificazione_fallita VARCHAR(255), -- fk/pk columns id BIGINT DEFAULT nextval('seq_pa_correlazione') NOT NULL, -- fk/pk keys constraints CONSTRAINT fk_pa_correlazione_1 FOREIGN KEY (id_porta) REFERENCES porte_applicative(id), CONSTRAINT pk_pa_correlazione PRIMARY KEY (id) ); CREATE SEQUENCE seq_pa_correlazione_risposta start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE pa_correlazione_risposta ( id_porta BIGINT NOT NULL, nome_elemento VARCHAR(255), -- modalita di scelta user input, content-based, url-based, disabilitato mode_correlazione VARCHAR(255), -- pattern utilizzato solo per content/url based pattern TEXT, -- blocca/accetta identificazione_fallita VARCHAR(255), -- fk/pk columns id BIGINT DEFAULT nextval('seq_pa_correlazione_risposta') NOT NULL, -- fk/pk keys constraints CONSTRAINT fk_pa_correlazione_risposta_1 FOREIGN KEY (id_porta) REFERENCES porte_applicative(id), CONSTRAINT pk_pa_correlazione_risposta PRIMARY KEY (id) ); -- openspcoop2 -- **** Audit Appenders **** CREATE SEQUENCE seq_audit_operations start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 CYCLE; CREATE TABLE audit_operations ( tipo_operazione VARCHAR(255) NOT NULL, -- non definito in caso di LOGIN/LOGOUT tipo VARCHAR(255), -- non definito in caso di LOGIN/LOGOUT object_id TEXT, object_old_id TEXT, utente VARCHAR(255) NOT NULL, stato VARCHAR(255) NOT NULL, -- Dettaglio oggetto in gestione (Rappresentazione tramite JSON o XML format) object_details TEXT, -- Class, serve eventualmente per riottenere l'oggetto dal dettaglio -- non definito in caso di LOGIN/LOGOUT object_class VARCHAR(255), -- Eventuale messaggio di errore error TEXT, time_request TIMESTAMP NOT NULL, time_execute TIMESTAMP NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_audit_operations') NOT NULL, -- check constraints CONSTRAINT chk_audit_operations_1 CHECK (tipo_operazione IN ('LOGIN','LOGOUT','ADD','CHANGE','DEL')), CONSTRAINT chk_audit_operations_2 CHECK (stato IN ('requesting','error','completed')), -- fk/pk keys constraints CONSTRAINT pk_audit_operations PRIMARY KEY (id) ); -- index CREATE INDEX audit_filter_time ON audit_operations (time_request); CREATE INDEX audit_filter ON audit_operations (tipo_operazione,tipo,utente,stato); CREATE SEQUENCE seq_audit_binaries start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 CYCLE; CREATE TABLE audit_binaries ( binary_id VARCHAR(255) NOT NULL, checksum BIGINT NOT NULL, id_audit_operation BIGINT NOT NULL, time_rec TIMESTAMP DEFAULT CURRENT_TIMESTAMP, -- fk/pk columns id BIGINT DEFAULT nextval('seq_audit_binaries') NOT NULL, -- unique constraints CONSTRAINT unique_audit_binaries_1 UNIQUE (binary_id,id_audit_operation), -- fk/pk keys constraints CONSTRAINT fk_audit_binaries_1 FOREIGN KEY (id_audit_operation) REFERENCES audit_operations(id), CONSTRAINT pk_audit_binaries PRIMARY KEY (id) ); -- openspcoop2 -- **** Audit Configuration **** CREATE SEQUENCE seq_audit_conf start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE audit_conf ( audit_engine INT NOT NULL DEFAULT 0, enabled INT NOT NULL DEFAULT 0, dump INT NOT NULL DEFAULT 0, dump_format VARCHAR(255) NOT NULL DEFAULT 'JSON', -- fk/pk columns id BIGINT DEFAULT nextval('seq_audit_conf') NOT NULL, -- fk/pk keys constraints CONSTRAINT pk_audit_conf PRIMARY KEY (id) ); CREATE SEQUENCE seq_audit_filters start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE audit_filters ( -- Filter username VARCHAR(255), tipo_operazione VARCHAR(255), tipo VARCHAR(255), stato VARCHAR(255), -- Filtri basati su contenuto utilizzabili solo se il dump della configurazione generale e' abilitato dump_search VARCHAR(255), -- 1(espressione regolare)/0(semplice stringa da ricercare) dump_expr INT NOT NULL DEFAULT 0, -- Action enabled INT NOT NULL DEFAULT 0, dump INT NOT NULL DEFAULT 0, -- Tempo di registrazione ora_registrazione TIMESTAMP DEFAULT CURRENT_TIMESTAMP, -- fk/pk columns id BIGINT DEFAULT nextval('seq_audit_filters') NOT NULL, -- check constraints CONSTRAINT chk_audit_filters_1 CHECK (tipo_operazione IN ('ADD','CHANGE','DEL')), CONSTRAINT chk_audit_filters_2 CHECK (stato IN ('requesting','error','completed')), -- fk/pk keys constraints CONSTRAINT pk_audit_filters PRIMARY KEY (id) ); CREATE SEQUENCE seq_audit_appender start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE audit_appender ( name VARCHAR(255) NOT NULL, class VARCHAR(255) NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_audit_appender') NOT NULL, -- unique constraints CONSTRAINT unique_audit_appender_1 UNIQUE (name), -- fk/pk keys constraints CONSTRAINT pk_audit_appender PRIMARY KEY (id) ); CREATE SEQUENCE seq_audit_appender_prop start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE audit_appender_prop ( name VARCHAR(255) NOT NULL, value VARCHAR(255) NOT NULL, id_audit_appender BIGINT NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_audit_appender_prop') NOT NULL, -- fk/pk keys constraints CONSTRAINT fk_audit_appender_prop_1 FOREIGN KEY (id_audit_appender) REFERENCES audit_appender(id), CONSTRAINT pk_audit_appender_prop PRIMARY KEY (id) ); -- openspcoop2 -- **** Operations **** CREATE SEQUENCE seq_operations start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 CYCLE; CREATE TABLE operations ( operation VARCHAR(255) NOT NULL, tipo VARCHAR(255) NOT NULL, superuser VARCHAR(255) NOT NULL, hostname VARCHAR(255) NOT NULL, status VARCHAR(255) NOT NULL, details TEXT, timereq TIMESTAMP NOT NULL, timexecute TIMESTAMP NOT NULL, deleted INT NOT NULL DEFAULT 0, -- fk/pk columns id BIGINT DEFAULT nextval('seq_operations') NOT NULL, -- fk/pk keys constraints CONSTRAINT pk_operations PRIMARY KEY (id) ); -- index CREATE INDEX operations_superuser ON operations (superuser); CREATE INDEX operations_precedenti ON operations (id,deleted,hostname,timereq); CREATE SEQUENCE seq_parameters start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 CYCLE; CREATE TABLE parameters ( id_operations BIGINT NOT NULL, name VARCHAR(255) NOT NULL, value VARCHAR(255), -- fk/pk columns id BIGINT DEFAULT nextval('seq_parameters') NOT NULL, -- fk/pk keys constraints CONSTRAINT fk_parameters_1 FOREIGN KEY (id_operations) REFERENCES operations(id), CONSTRAINT pk_parameters PRIMARY KEY (id) ); -- index CREATE INDEX parameters_index ON parameters (name,value); -- openspcoop2 -- **** Utenti **** CREATE SEQUENCE seq_users start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE users ( login VARCHAR(255) NOT NULL, password VARCHAR(255) NOT NULL, tipo_interfaccia VARCHAR(255) NOT NULL, permessi VARCHAR(255) NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_users') NOT NULL, -- unique constraints CONSTRAINT unique_users_1 UNIQUE (login), -- fk/pk keys constraints CONSTRAINT pk_users PRIMARY KEY (id) ); -- openspcoop2 CREATE SEQUENCE seq_db_info_console start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE db_info_console ( major_version INT NOT NULL, minor_version INT NOT NULL, notes VARCHAR(255) NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_db_info_console') NOT NULL, -- fk/pk keys constraints CONSTRAINT pk_db_info_console PRIMARY KEY (id) ); -- openspcoop2 INSERT INTO audit_appender (name,class) VALUES ('dbAppender','org.openspcoop2.web.lib.audit.appender.AuditDBAppender'); INSERT INTO audit_appender_prop (name,value,id_audit_appender) VALUES ('datasource','org.openspcoop2.dataSource.pddConsole',(select id from audit_appender where name='dbAppender')); INSERT INTO audit_appender_prop (name,value,id_audit_appender) VALUES ('tipoDatabase','postgresql',(select id from audit_appender where name='dbAppender')); -- openspcoop2 INSERT INTO audit_appender (name,class) VALUES ('log4jAppender','org.openspcoop2.web.lib.audit.appender.AuditLog4JAppender'); INSERT INTO audit_appender_prop (name,value,id_audit_appender) VALUES ('fileConfigurazione','console.audit.log4j2.properties',(select id from audit_appender where name='log4jAppender')); INSERT INTO audit_appender_prop (name,value,id_audit_appender) VALUES ('nomeFileLoaderInstance','console_local.audit.log4j2.properties',(select id from audit_appender where name='log4jAppender')); INSERT INTO audit_appender_prop (name,value,id_audit_appender) VALUES ('nomeProprietaLoaderInstance','OPENSPCOOP2_CONSOLE_AUDIT_LOG_PROPERTIES',(select id from audit_appender where name='log4jAppender')); INSERT INTO audit_appender_prop (name,value,id_audit_appender) VALUES ('category','audit',(select id from audit_appender where name='log4jAppender')); INSERT INTO audit_appender_prop (name,value,id_audit_appender) VALUES ('xml','true',(select id from audit_appender where name='log4jAppender')); -- openspcoop2 INSERT INTO audit_conf (audit_engine,enabled,dump,dump_format) VALUES (1,1,0,'JSON'); -- openspcoop2 -- users -- INSERT INTO users (login, password, tipo_interfaccia, permessi) VALUES ('super', '$1$.bquKJDS$yZ4EYC3354HqEjmSRL/sR0','STANDARD','U'); -- INSERT INTO users (login, password, tipo_interfaccia, permessi) VALUES ('amministratore', '$1$.bquKJDS$yZ4EYC3354HqEjmSRL/sR0','STANDARD','SDCMA'); -- openspcoop2 INSERT INTO db_info_console (major_version,minor_version,notes) VALUES (2,3,'[OpenSPCoop_tags_2.3_ant_setup Revision N.12244, LastChangedRevision N.12244, 10/04/2016 01:37 PM] Database della Console di Gestione della Porta di Dominio OpenSPCoop2'); -- **** Configurazione **** CREATE SEQUENCE seq_registri start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE registri ( nome VARCHAR(255) NOT NULL, location VARCHAR(255) NOT NULL, tipo VARCHAR(255) NOT NULL, utente VARCHAR(255), password VARCHAR(255), -- fk/pk columns id BIGINT DEFAULT nextval('seq_registri') NOT NULL, -- unique constraints CONSTRAINT unique_registri_1 UNIQUE (nome), -- fk/pk keys constraints CONSTRAINT pk_registri PRIMARY KEY (id) ); CREATE SEQUENCE seq_routing start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE routing ( tipo VARCHAR(255), nome VARCHAR(255), -- registro/gateway tiporotta VARCHAR(255) NOT NULL, tiposoggrotta VARCHAR(255), nomesoggrotta VARCHAR(255), -- foreign key per i registri(id) registrorotta BIGINT, is_default BIGINT NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_routing') NOT NULL, -- fk/pk keys constraints CONSTRAINT pk_routing PRIMARY KEY (id) ); CREATE SEQUENCE seq_configurazione start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE configurazione ( -- Cadenza inoltro Riscontri/BusteAsincrone cadenza_inoltro VARCHAR(255) NOT NULL, -- Validazione Buste validazione_stato VARCHAR(255), validazione_controllo VARCHAR(255), validazione_profilo VARCHAR(255), validazione_manifest VARCHAR(255), -- Validazione Contenuti Applicativi -- abilitato/disabilitato/warningOnly validazione_contenuti_stato VARCHAR(255), -- wsdl/openspcoop/xsd validazione_contenuti_tipo VARCHAR(255), -- abilitato/disabilitato validazione_contenuti_mtom VARCHAR(255), -- Livello Log Messaggi Diagnostici msg_diag_severita VARCHAR(255) NOT NULL, msg_diag_severita_log4j VARCHAR(255) NOT NULL, -- Tracciamento Buste tracciamento_buste VARCHAR(255), tracciamento_dump VARCHAR(255), tracciamento_dump_bin_pd VARCHAR(255), tracciamento_dump_bin_pa VARCHAR(255), -- Autenticazione IntegrationManager auth_integration_manager VARCHAR(255), -- Cache per l'accesso ai registri statocache VARCHAR(255), dimensionecache VARCHAR(255), algoritmocache VARCHAR(255), idlecache VARCHAR(255), lifecache VARCHAR(255), -- Cache per l'accesso alla configurazione config_statocache VARCHAR(255), config_dimensionecache VARCHAR(255), config_algoritmocache VARCHAR(255), config_idlecache VARCHAR(255), config_lifecache VARCHAR(255), -- Cache per l'accesso ai dati di autorizzazione auth_statocache VARCHAR(255), auth_dimensionecache VARCHAR(255), auth_algoritmocache VARCHAR(255), auth_idlecache VARCHAR(255), auth_lifecache VARCHAR(255), -- connessione su cui vengono inviate le risposte -- reply: connessione esistente (es. http reply) -- new: nuova connessione mod_risposta VARCHAR(255), -- Gestione dell'indirizzo indirizzo_telematico VARCHAR(255), -- Gestione Manifest gestione_manifest VARCHAR(255), -- Routing Table routing_enabled VARCHAR(255) NOT NULL, -- Gestione errore di default per la Porta di Dominio -- FOREIGN KEY (id_ge_cooperazione) REFERENCES gestione_errore(id) Nota: indica un eventuale tipologia di gestione dell'errore di default durante l'utilizzo di un connettore id_ge_cooperazione BIGINT, -- FOREIGN KEY (id_ge_integrazione) REFERENCES gestione_errore(id) Nota: indica un eventuale tipologia di gestione dell'errore di default durante l'utilizzo di un connettore id_ge_integrazione BIGINT, -- fk/pk columns id BIGINT DEFAULT nextval('seq_configurazione') NOT NULL, -- fk/pk keys constraints CONSTRAINT pk_configurazione PRIMARY KEY (id) ); -- **** Messaggi diagnostici Appender **** CREATE SEQUENCE seq_msgdiag_appender start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE msgdiag_appender ( tipo VARCHAR(255) NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_msgdiag_appender') NOT NULL, -- fk/pk keys constraints CONSTRAINT pk_msgdiag_appender PRIMARY KEY (id) ); CREATE SEQUENCE seq_msgdiag_appender_prop start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE msgdiag_appender_prop ( id_appender BIGINT NOT NULL, nome VARCHAR(255) NOT NULL, valore VARCHAR(255) NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_msgdiag_appender_prop') NOT NULL, -- unique constraints CONSTRAINT uniq_msgdiag_app_prop_1 UNIQUE (id_appender,nome,valore), -- fk/pk keys constraints CONSTRAINT fk_msgdiag_appender_prop_1 FOREIGN KEY (id_appender) REFERENCES msgdiag_appender(id), CONSTRAINT pk_msgdiag_appender_prop PRIMARY KEY (id) ); -- **** Tracciamento Appender **** CREATE SEQUENCE seq_tracce_appender start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE tracce_appender ( tipo VARCHAR(255) NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_tracce_appender') NOT NULL, -- fk/pk keys constraints CONSTRAINT pk_tracce_appender PRIMARY KEY (id) ); CREATE SEQUENCE seq_tracce_appender_prop start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE tracce_appender_prop ( id_appender BIGINT NOT NULL, nome VARCHAR(255) NOT NULL, valore VARCHAR(255) NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_tracce_appender_prop') NOT NULL, -- unique constraints CONSTRAINT uniq_tracce_app_prop_1 UNIQUE (id_appender,nome,valore), -- fk/pk keys constraints CONSTRAINT fk_tracce_appender_prop_1 FOREIGN KEY (id_appender) REFERENCES tracce_appender(id), CONSTRAINT pk_tracce_appender_prop PRIMARY KEY (id) ); -- **** Datasources dove reperire i messaggi diagnostici salvati **** CREATE SEQUENCE seq_msgdiag_ds start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE msgdiag_ds ( nome VARCHAR(255) NOT NULL, nome_jndi VARCHAR(255) NOT NULL, tipo_database VARCHAR(255) NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_msgdiag_ds') NOT NULL, -- unique constraints CONSTRAINT unique_msgdiag_ds_1 UNIQUE (nome), -- fk/pk keys constraints CONSTRAINT pk_msgdiag_ds PRIMARY KEY (id) ); CREATE SEQUENCE seq_msgdiag_ds_prop start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE msgdiag_ds_prop ( id_prop BIGINT NOT NULL, nome VARCHAR(255) NOT NULL, valore VARCHAR(255) NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_msgdiag_ds_prop') NOT NULL, -- unique constraints CONSTRAINT unique_msgdiag_ds_prop_1 UNIQUE (id_prop,nome,valore), -- fk/pk keys constraints CONSTRAINT fk_msgdiag_ds_prop_1 FOREIGN KEY (id_prop) REFERENCES msgdiag_ds(id), CONSTRAINT pk_msgdiag_ds_prop PRIMARY KEY (id) ); -- **** Datasources dove reperire le tracce salvate **** CREATE SEQUENCE seq_tracce_ds start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE tracce_ds ( nome VARCHAR(255) NOT NULL, nome_jndi VARCHAR(255) NOT NULL, tipo_database VARCHAR(255) NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_tracce_ds') NOT NULL, -- unique constraints CONSTRAINT unique_tracce_ds_1 UNIQUE (nome), -- fk/pk keys constraints CONSTRAINT pk_tracce_ds PRIMARY KEY (id) ); CREATE SEQUENCE seq_tracce_ds_prop start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE tracce_ds_prop ( id_prop BIGINT NOT NULL, nome VARCHAR(255) NOT NULL, valore VARCHAR(255) NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_tracce_ds_prop') NOT NULL, -- unique constraints CONSTRAINT unique_tracce_ds_prop_1 UNIQUE (id_prop,nome,valore), -- fk/pk keys constraints CONSTRAINT fk_tracce_ds_prop_1 FOREIGN KEY (id_prop) REFERENCES tracce_ds(id), CONSTRAINT pk_tracce_ds_prop PRIMARY KEY (id) ); -- **** Stato dei servizi attivi sulla Porta di Dominio **** CREATE SEQUENCE seq_servizi_pdd start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE servizi_pdd ( componente VARCHAR(255) NOT NULL, -- Stato dei servizi attivi sulla Porta di Dominio stato INT DEFAULT 1, -- fk/pk columns id BIGINT DEFAULT nextval('seq_servizi_pdd') NOT NULL, -- unique constraints CONSTRAINT unique_servizi_pdd_1 UNIQUE (componente), -- fk/pk keys constraints CONSTRAINT pk_servizi_pdd PRIMARY KEY (id) ); CREATE SEQUENCE seq_servizi_pdd_filtri start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE servizi_pdd_filtri ( id_servizio_pdd BIGINT NOT NULL, tipo_filtro VARCHAR(255) NOT NULL, tipo_soggetto_fruitore VARCHAR(255), soggetto_fruitore VARCHAR(255), identificativo_porta_fruitore VARCHAR(255), tipo_soggetto_erogatore VARCHAR(255), soggetto_erogatore VARCHAR(255), identificativo_porta_erogatore VARCHAR(255), tipo_servizio VARCHAR(255), servizio VARCHAR(255), azione VARCHAR(255), -- fk/pk columns id BIGINT DEFAULT nextval('seq_servizi_pdd_filtri') NOT NULL, -- check constraints CONSTRAINT chk_servizi_pdd_filtri_1 CHECK (tipo_filtro IN ('abilitazione','disabilitazione')), -- fk/pk keys constraints CONSTRAINT fk_servizi_pdd_filtri_1 FOREIGN KEY (id_servizio_pdd) REFERENCES servizi_pdd(id), CONSTRAINT pk_servizi_pdd_filtri PRIMARY KEY (id) ); -- **** PddSystemProperties **** CREATE SEQUENCE seq_pdd_sys_props start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE; CREATE TABLE pdd_sys_props ( nome VARCHAR(255) NOT NULL, valore VARCHAR(255) NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_pdd_sys_props') NOT NULL, -- unique constraints CONSTRAINT unique_pdd_sys_props_1 UNIQUE (nome,valore), -- fk/pk keys constraints CONSTRAINT pk_pdd_sys_props PRIMARY KEY (id) ); -- openspcoop2 CREATE SEQUENCE seq_tracce start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 CYCLE; CREATE TABLE tracce ( gdo TIMESTAMP NOT NULL, gdo_int BIGINT NOT NULL, pdd_codice VARCHAR(255) NOT NULL, pdd_tipo_soggetto VARCHAR(255) NOT NULL, pdd_nome_soggetto VARCHAR(255) NOT NULL, pdd_ruolo VARCHAR(255) NOT NULL, tipo_messaggio VARCHAR(255) NOT NULL, esito_elaborazione VARCHAR(255) NOT NULL, dettaglio_esito_elaborazione TEXT, mittente VARCHAR(255), tipo_mittente VARCHAR(255), idporta_mittente VARCHAR(255), indirizzo_mittente VARCHAR(255), destinatario VARCHAR(255), tipo_destinatario VARCHAR(255), idporta_destinatario VARCHAR(255), indirizzo_destinatario VARCHAR(255), profilo_collaborazione VARCHAR(255), profilo_collaborazione_meta VARCHAR(255), servizio_correlato VARCHAR(255), tipo_servizio_correlato VARCHAR(255), collaborazione VARCHAR(255), versione_servizio INT, servizio VARCHAR(255), tipo_servizio VARCHAR(255), azione VARCHAR(255), id_messaggio VARCHAR(255), ora_registrazione TIMESTAMP, tipo_ora_reg VARCHAR(255), tipo_ora_reg_meta VARCHAR(255), rif_messaggio VARCHAR(255), scadenza TIMESTAMP, inoltro VARCHAR(255), inoltro_meta VARCHAR(255), conferma_ricezione INT, sequenza INT, -- Dati di integrazione location VARCHAR(255), correlazione_applicativa VARCHAR(255), correlazione_risposta VARCHAR(255), sa_fruitore VARCHAR(255), sa_erogatore VARCHAR(255), -- Protocollo protocollo VARCHAR(255) NOT NULL, -- Testsuite is_arrived INT DEFAULT 0, soap_element TEXT, digest TEXT, -- fk/pk columns id BIGINT DEFAULT nextval('seq_tracce') NOT NULL, -- check constraints CONSTRAINT chk_tracce_1 CHECK (pdd_ruolo IN ('delegata','applicativa','integrationManager','router')), CONSTRAINT chk_tracce_2 CHECK (tipo_messaggio IN ('Richiesta','Risposta')), CONSTRAINT chk_tracce_3 CHECK (esito_elaborazione IN ('INVIATO','RICEVUTO','ERRORE')), -- fk/pk keys constraints CONSTRAINT pk_tracce PRIMARY KEY (id) ); -- index CREATE INDEX TRACCE_SEARCH_ID ON tracce (id_messaggio,pdd_codice); CREATE INDEX TRACCE_SEARCH_RIF ON tracce (rif_messaggio,pdd_codice); CREATE INDEX TRACCE_SEARCH_ID_SOGGETTO ON tracce (id_messaggio,pdd_tipo_soggetto,pdd_nome_soggetto); CREATE INDEX TRACCE_SEARCH_RIF_SOGGETTO ON tracce (rif_messaggio,pdd_tipo_soggetto,pdd_nome_soggetto); CREATE SEQUENCE seq_tracce_riscontri start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 CYCLE; CREATE TABLE tracce_riscontri ( idtraccia BIGINT NOT NULL, riscontro VARCHAR(255), ora_registrazione TIMESTAMP, tipo_ora_reg VARCHAR(255), tipo_ora_reg_meta VARCHAR(255), -- fk/pk columns id BIGINT DEFAULT nextval('seq_tracce_riscontri') NOT NULL, -- fk/pk keys constraints CONSTRAINT fk_tracce_riscontri_1 FOREIGN KEY (idtraccia) REFERENCES tracce(id) ON DELETE CASCADE, CONSTRAINT pk_tracce_riscontri PRIMARY KEY (id) ); -- index CREATE INDEX TRACCE_RIS ON tracce_riscontri (idtraccia); CREATE SEQUENCE seq_tracce_trasmissioni start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 CYCLE; CREATE TABLE tracce_trasmissioni ( idtraccia BIGINT NOT NULL, origine VARCHAR(255), tipo_origine VARCHAR(255), indirizzo_origine VARCHAR(255), idporta_origine VARCHAR(255), destinazione VARCHAR(255), tipo_destinazione VARCHAR(255), indirizzo_destinazione VARCHAR(255), idporta_destinazione VARCHAR(255), ora_registrazione TIMESTAMP, tipo_ora_reg VARCHAR(255), tipo_ora_reg_meta VARCHAR(255), -- fk/pk columns id BIGINT DEFAULT nextval('seq_tracce_trasmissioni') NOT NULL, -- fk/pk keys constraints CONSTRAINT fk_tracce_trasmissioni_1 FOREIGN KEY (idtraccia) REFERENCES tracce(id) ON DELETE CASCADE, CONSTRAINT pk_tracce_trasmissioni PRIMARY KEY (id) ); -- index CREATE INDEX TRACCE_TR ON tracce_trasmissioni (idtraccia); CREATE SEQUENCE seq_tracce_eccezioni start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 CYCLE; CREATE TABLE tracce_eccezioni ( idtraccia BIGINT NOT NULL, contesto_codifica VARCHAR(255), contesto_codifica_meta VARCHAR(255), codice_eccezione VARCHAR(255), codice_eccezione_meta INT, subcodice_eccezione_meta INT, rilevanza VARCHAR(255), rilevanza_meta VARCHAR(255), posizione TEXT, -- fk/pk columns id BIGINT DEFAULT nextval('seq_tracce_eccezioni') NOT NULL, -- fk/pk keys constraints CONSTRAINT fk_tracce_eccezioni_1 FOREIGN KEY (idtraccia) REFERENCES tracce(id) ON DELETE CASCADE, CONSTRAINT pk_tracce_eccezioni PRIMARY KEY (id) ); -- index CREATE INDEX TRACCE_ECC ON tracce_eccezioni (idtraccia); CREATE SEQUENCE seq_tracce_allegati start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 CYCLE; CREATE TABLE tracce_allegati ( idtraccia BIGINT NOT NULL, content_id VARCHAR(255), content_location VARCHAR(255), content_type VARCHAR(255), digest TEXT, -- fk/pk columns id BIGINT DEFAULT nextval('seq_tracce_allegati') NOT NULL, -- fk/pk keys constraints CONSTRAINT fk_tracce_allegati_1 FOREIGN KEY (idtraccia) REFERENCES tracce(id) ON DELETE CASCADE, CONSTRAINT pk_tracce_allegati PRIMARY KEY (id) ); -- index CREATE INDEX TRACCE_ALLEGATI_INDEX ON tracce_allegati (idtraccia); CREATE SEQUENCE seq_tracce_ext_protocol_info start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 CYCLE; CREATE TABLE tracce_ext_protocol_info ( idtraccia BIGINT NOT NULL, name VARCHAR(255) NOT NULL, value TEXT, -- fk/pk columns id BIGINT DEFAULT nextval('seq_tracce_ext_protocol_info') NOT NULL, -- fk/pk keys constraints CONSTRAINT fk_tracce_ext_protocol_info_1 FOREIGN KEY (idtraccia) REFERENCES tracce(id) ON DELETE CASCADE, CONSTRAINT pk_tracce_ext_protocol_info PRIMARY KEY (id) ); -- index CREATE INDEX TRACCE_EXT_INFO ON tracce_ext_protocol_info (idtraccia); -- openspcoop2 CREATE SEQUENCE seq_msgdiagnostici start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 CYCLE; CREATE TABLE msgdiagnostici ( gdo TIMESTAMP NOT NULL, pdd_codice VARCHAR(255) NOT NULL, pdd_tipo_soggetto VARCHAR(255) NOT NULL, pdd_nome_soggetto VARCHAR(255) NOT NULL, idfunzione VARCHAR(255) NOT NULL, severita INT NOT NULL, messaggio TEXT NOT NULL, -- Eventuale id della richiesta in gestione (informazione non definita dalla specifica) idmessaggio VARCHAR(255), -- Eventuale id della risposta correlata alla richiesta (informazione non definita dalla specifica) idmessaggio_risposta VARCHAR(255), -- Codice del diagnostico emesso codice VARCHAR(255) NOT NULL, -- Protocollo (puo' non essere presente per i diagnostici di 'servizio' della porta) protocollo VARCHAR(255), -- fk/pk columns id BIGINT DEFAULT nextval('seq_msgdiagnostici') NOT NULL, -- check constraints CONSTRAINT chk_msgdiagnostici_1 CHECK (severita IN (0,1,2,3,4,5,6,7)), -- fk/pk keys constraints CONSTRAINT pk_msgdiagnostici PRIMARY KEY (id) ); -- index CREATE INDEX MSG_DIAG_ID ON msgdiagnostici (idmessaggio); CREATE INDEX MSG_DIAG_GDO ON msgdiagnostici (gdo); CREATE SEQUENCE seq_msgdiag_correlazione start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 CYCLE; CREATE TABLE msgdiag_correlazione ( -- Dati di Correlazione con i messaggi diagnostici idmessaggio VARCHAR(255) NOT NULL, pdd_codice VARCHAR(255) NOT NULL, pdd_tipo_soggetto VARCHAR(255) NOT NULL, pdd_nome_soggetto VARCHAR(255) NOT NULL, -- Data di registrazione gdo TIMESTAMP NOT NULL, -- nome porta delegata/applicativa porta VARCHAR(255), -- (1/0 true/false) True se siamo in un contesto di porta delegata, False se in un contesto di porta applicativa delegata INT NOT NULL, tipo_fruitore VARCHAR(255) NOT NULL, fruitore VARCHAR(255) NOT NULL, tipo_erogatore VARCHAR(255) NOT NULL, erogatore VARCHAR(255) NOT NULL, tipo_servizio VARCHAR(255) NOT NULL, servizio VARCHAR(255) NOT NULL, versione_servizio INT NOT NULL, azione VARCHAR(255), -- Identificatore correlazione applicativa id_correlazione_applicativa VARCHAR(255), id_correlazione_risposta VARCHAR(255), -- Protocollo protocollo VARCHAR(255) NOT NULL, -- fk/pk columns id BIGINT DEFAULT nextval('seq_msgdiag_correlazione') NOT NULL, -- fk/pk keys constraints CONSTRAINT pk_msgdiag_correlazione PRIMARY KEY (id) ); -- index CREATE INDEX MSG_CORR_INDEX ON msgdiag_correlazione (idmessaggio,delegata); CREATE INDEX MSG_CORR_GDO ON msgdiag_correlazione (gdo); CREATE INDEX MSG_CORR_APP ON msgdiag_correlazione (id_correlazione_applicativa,delegata); CREATE TABLE msgdiag_correlazione_sa ( id_correlazione BIGINT NOT NULL, -- Identita ServizioApplicativo servizio_applicativo VARCHAR(255) NOT NULL, -- fk/pk columns -- fk/pk keys constraints CONSTRAINT fk_msgdiag_correlazione_sa_1 FOREIGN KEY (id_correlazione) REFERENCES msgdiag_correlazione(id) ON DELETE CASCADE, CONSTRAINT pk_msgdiag_correlazione_sa PRIMARY KEY (id_correlazione,servizio_applicativo) ); -- openspcoop2 -- Configurazione INSERT INTO configurazione (cadenza_inoltro, validazione_stato, validazione_controllo, msg_diag_severita, msg_diag_severita_log4j, auth_integration_manager,validazione_profilo, mod_risposta, indirizzo_telematico, routing_enabled, validazione_manifest, gestione_manifest, tracciamento_buste, tracciamento_dump, tracciamento_dump_bin_pd, tracciamento_dump_bin_pa, statocache,dimensionecache,algoritmocache,lifecache, config_statocache,config_dimensionecache,config_algoritmocache,config_lifecache,auth_statocache,auth_dimensionecache,auth_algoritmocache,auth_lifecache) VALUES( '60', 'abilitato', 'rigido', 'infoIntegration', 'infoIntegration', 'basic,ssl', 'disabilitato','reply','disabilitato','disabilitato', 'abilitato', 'disabilitato', 'abilitato', 'disabilitato', 'disabilitato', 'disabilitato', 'abilitato','10000','lru','7200','abilitato','10000','lru','7200','abilitato','5000','lru','7200'); -- Rotta di default per routing insert INTO routing (tiporotta,registrorotta,is_default) VALUES ('registro',0,1); -- Registro locale insert INTO registri (nome,location,tipo) VALUES ('RegistroDB','org.openspcoop2.dataSource.pddConsole','db'); -- Porta di Dominio locale INSERT INTO pdd (nome,tipo,superuser) VALUES ('PddOpenSPCoop','operativo','amministratore'); -- openspcoop2 -- users -- INSERT INTO users (login, password, tipo_interfaccia, permessi) VALUES ('operatore', '$1$.bquKJDS$yZ4EYC3354HqEjmSRL/sR0','STANDARD','D'); -- openspcoop2 -- Tracciamento INSERT INTO tracce_appender (tipo) VALUES ('protocol'); INSERT INTO tracce_appender_prop (id_appender,nome,valore) VALUES ((select id from tracce_appender where tipo='protocol'),'datasource','org.openspcoop2.dataSource'); INSERT INTO tracce_appender_prop (id_appender,nome,valore) VALUES ((select id from tracce_appender where tipo='protocol'),'tipoDatabase','postgresql'); INSERT INTO tracce_appender_prop (id_appender,nome,valore) VALUES ((select id from tracce_appender where tipo='protocol'),'usePdDConnection','true'); -- MsgDiagnostici INSERT INTO msgdiag_appender (tipo) VALUES ('protocol'); INSERT INTO msgdiag_appender_prop (id_appender,nome,valore) VALUES ((select id from msgdiag_appender where tipo='protocol'),'datasource','org.openspcoop2.dataSource'); INSERT INTO msgdiag_appender_prop (id_appender,nome,valore) VALUES ((select id from msgdiag_appender where tipo='protocol'),'usePdDConnection','true'); -- PdD UPDATE pdd set nome='PdDsoggettopdd1'; UPDATE pdd set superuser='amministratore'; -- Configurazione Cache Registro UPDATE configurazione set statocache='abilitato'; UPDATE configurazione set dimensionecache='10000'; UPDATE configurazione set algoritmocache='lru'; UPDATE configurazione set lifecache='7200'; -- Configurazione Cache Dati Configurazione UPDATE configurazione set config_statocache='abilitato'; UPDATE configurazione set config_dimensionecache='10000'; UPDATE configurazione set config_algoritmocache='lru'; UPDATE configurazione set config_lifecache='7200'; -- Configurazione Cache Dati Autorizzazione UPDATE configurazione set auth_statocache='abilitato'; UPDATE configurazione set auth_dimensionecache='5000'; UPDATE configurazione set auth_algoritmocache='lru'; UPDATE configurazione set auth_lifecache='7200'; -- Protocol spcoop INSERT INTO connettori (endpointtype,nome_connettore,debug,custom) VALUES ('disabilitato','CNT_SPC_soggettopdd1',0,0); INSERT INTO soggetti (nome_soggetto,tipo_soggetto,descrizione,identificativo_porta,is_router,id_connettore,superuser,server,privato,profilo,codice_ipa) VALUES ('soggettopdd1','SPC',null,'soggettopdd1SPCoopIT',0, (select id from connettori where nome_connettore='CNT_SPC_soggettopdd1'), 'amministratore','PdDsoggettopdd1',0,'eGov1.1-lineeGuida1.1','o=soggettopdd1,c=it'); -- Protocol trasparente INSERT INTO connettori (endpointtype,nome_connettore,debug,custom) VALUES ('disabilitato','CNT_PROXY_soggettopdd1',0,0); INSERT INTO soggetti (nome_soggetto,tipo_soggetto,descrizione,identificativo_porta,is_router,id_connettore,superuser,server,privato,profilo,codice_ipa) VALUES ('soggettopdd1','PROXY',null,'soggettopdd1PdD',0, (select id from connettori where nome_connettore='CNT_PROXY_soggettopdd1'), 'amministratore','PdDsoggettopdd1',0,'1.0','o=PROXYsoggettopdd1,c=it'); -- Utenza pddConsole INSERT INTO users (login, password, tipo_interfaccia, permessi) VALUES ('amministratore','$1$oF$3XgUnO3nuJjORWyeyFTeD0','STANDARD','SDCMAU');
true
baa7124b2e449f8581b509b3209f297272aa587b
SQL
gableisure/easy_personal
/backend/db/sql.sql
UTF-8
3,552
3.671875
4
[]
no_license
CREATE TABLE tbl_usuario ( int_idausuario SERIAL PRIMARY KEY NOT NULL, vhr_email VARCHAR(30) NOT NULL UNIQUE, vhr_senha VARCHAR(60) NOT NULL, vhr_nome VARCHAR(20) NOT NULL, vhr_sobrenome VARCHAR(20) NOT NULL, dtt_nascimento VARCHAR(20) NOT NULL, int_genero INT NOT NULL, vhr_whatsapp VARCHAR(20) NOT NULL, int_tipo INT NOT NULL, changedpasswordat BIGINT DEFAULT NULL, vhr_descricao VARCHAR(120) DEFAULT NULL ); CREATE TABLE tbr_aluno ( int_idfaluno INT NOT NULL UNIQUE, num_peso DECIMAL NOT NULL, num_altura DECIMAL NOT NULL, FOREIGN KEY (int_idfaluno) REFERENCES tbl_usuario (int_idausuario) ON UPDATE CASCADE ON DELETE CASCADE ); CREATE TABLE tbr_professor ( int_idfprofessor INT NOT NULL UNIQUE, vhr_cref VARCHAR(20) NOT NULL, vhr_token VARCHAR(12) NOT NULL, FOREIGN KEY (int_idfprofessor) REFERENCES tbl_usuario (int_idausuario) ON UPDATE CASCADE ON DELETE CASCADE ); CREATE TABLE resetpasswordtokens ( user_id INT NOT NULL, token TEXT NOT NULL, expiresin BIGINT NOT NULL, FOREIGN KEY(user_id) REFERENCES tbl_usuario (int_idausuario) ON UPDATE CASCADE ON DELETE CASCADE ); CREATE TABLE user_instructors ( user_id INT NOT NULL, instructor_id INT NOT NULL, FOREIGN KEY(user_id) REFERENCES tbr_aluno (int_idfaluno), FOREIGN KEY(instructor_id) REFERENCES tbr_professor (int_idfprofessor) ON UPDATE CASCADE ON DELETE CASCADE ); CREATE TABLE tbl_treino ( int_idatreino SERIAL PRIMARY KEY NOT NULL, vhr_nome VARCHAR(80) NOT NULL, dtt_inicio DATE NOT NULL, dtt_fim DATE NOT NULL, vhr_observacao TEXT, int_estaarquivado INT DEFAULT 0 NOT NULL, int_idftipotreino INT NOT NULL, int_idfprofessor INT NOT NULL, FOREIGN KEY(int_idftipotreino) REFERENCES tbr_tipotreino (int_idatipotreino) ON UPDATE CASCADE ON DELETE CASCADE, FOREIGN KEY(int_idfprofessor) REFERENCES tbl_usuario (int_idausuario) ON UPDATE CASCADE ON DELETE CASCADE ); CREATE TABLE tbr_tipotreino ( int_idatipotreino SERIAL PRIMARY KEY NOT NULL, vhr_nome VARCHAR(14) NOT NULL, vhr_descricao VARCHAR(54) NOT NULL ); CREATE TABLE tbr_categoria ( int_idacategoria SERIAL PRIMARY KEY NOT NULL, vhr_nome VARCHAR(30) NOT NULL, vhr_descricao VARCHAR(200) NOT NULL ); CREATE TABLE tbl_exercicio ( int_idaexercicio SERIAL PRIMARY KEY NOT NULL, vhr_nome VARCHAR(100) NOT NULL, int_intervalor INT NOT NULL, vhr_seriesrepeticoes VARCHAR(5) NOT NULL, int_idfcategoria INT NOT NULL, int_idfprofessor INT NOT NULL, FOREIGN KEY(int_idfcategoria) REFERENCES tbr_categoria (int_idacategoria) ON UPDATE CASCADE ON DELETE CASCADE, FOREIGN KEY(int_idfprofessor) REFERENCES tbl_usuario (int_idausuario) ON UPDATE CASCADE ON DELETE CASCADE ); CREATE TABLE tbl_treinoexercicio ( int_idatreinoexercicio SERIAL PRIMARY KEY NOT NULL, int_idfexercicio INT NOT NULL, int_idftreino INT NOT NULL, FOREIGN KEY(int_idfexercicio) REFERENCES tbl_exercicio (int_idaexercicio) ON UPDATE CASCADE ON DELETE CASCADE, FOREIGN KEY(int_idftreino) REFERENCES tbl_treino (int_idatreino) ON UPDATE CASCADE ON DELETE CASCADE ); CREATE TABLE tbl_alunotreino ( int_idfaluno INT NOT NULL, int_idftreino INT NOT NULL, int_estaemvigor INT NOT NULL DEFAULT 0, FOREIGN KEY(int_idfaluno) REFERENCES tbr_aluno (int_idfaluno) ON UPDATE CASCADE ON DELETE CASCADE, FOREIGN KEY(int_idftreino) REFERENCES tbl_treino (int_idatreino) ON UPDATE CASCADE ON DELETE CASCADE );
true
290ffd00ea47ad90a11754b5a94046d6cf5bfc23
SQL
UCLALibrary/sql-scripts
/Voyager/Circulation/SEL Geology Circ Report -2 RR-627.sql
UTF-8
2,503
3.71875
4
[]
no_license
SELECT DISTINCT mm.display_call_no, ib.item_barcode, --bt.bib_format, --bt.record_status, --bt.encoding_level, bt.title, mi.item_enum, bt.author, bt.pub_dates_combined as pub_date, bt.series, ucladb.getallbibtag(bt.bib_id, '650') AS subjects, --bt.begin_pub_date as pub_date, --bt.bib_id, (SELECT REPLACE(normal_heading, 'UCOCLC', '') FROM bib_index WHERE bib_id = bt.bib_id AND index_code = '0350' AND normal_heading LIKE 'UCOCLC%' AND ROWNUM < 2 ) AS oclc_number, bt.bib_id, i.historical_charges as total_charges, max(ct.charge_date)as last_charge_date, ( select listagg(l2.location_code, ', ') within group (order by l2.location_code) from bib_location bl inner join location l2 on bl.location_id = l2.location_id where bl.bib_id = bt.bib_id and l2.location_code != l.location_code ) as other_locs, ista.item_status_desc --mi.item_enum --i.enumeration FROM ucla_BIBTEXT_vw bt INNER join BIB_MFHD bmf ON bt.BIB_ID = bmf.BIB_ID INNER join MFHD_MASTER mm ON bmf.MFHD_ID = mm.MFHD_ID inner join LOCATION l ON mm.LOCATION_ID = l.LOCATION_ID inner join MFHD_ITEM mi ON mm.MFHD_ID = mi.MFHD_ID inner join ITEM i ON mi.ITEM_ID = i.ITEM_ID inner join item_barcode ib on i.item_id = ib.item_id inner join ITEM_TYPE it ON i.ITEM_TYPE_ID = it.ITEM_TYPE_ID INNER JOIN ITEM_STATUS ist ON i.ITEM_ID = ist.ITEM_ID INNER JOIN ITEM_STATUS_TYPE ista ON ist.ITEM_STATUS = ista.ITEM_STATUS_TYPE left outer join CIRC_TRANS_archive ct ON i.ITEM_ID = ct.ITEM_ID WHERE bt.bib_format = 'as' and bt.record_status = 'c' and l.location_code in ('sgujnl', 'sgper', 'sgperwt', 'sgdi', 'sgdisp', 'sgdispwt', 'sgnews', 'sgnewltr', 'scujnl') -- = 'sgmi' --in ('sgrf', 'sgrfabst', 'sgrfatlslo', 'sgrfatlssh', 'sgrfelec') -- ('sgrf', 'sgrfabst', 'sgrfatlslo', 'sgrfatlssh', 'sgrfelec') group by mm.display_call_no, ib.item_barcode, bt.bib_format, bt.title, bt.author, --bt.begin_pub_date, --bt.bib_id, --(SELECT REPLACE(normal_heading, 'UCOCLC', '') -- FROM bib_index WHERE bib_id = bt.bib_id AND index_code = '0350' AND normal_heading LIKE 'UCOCLC%' AND ROWNUM < 2 --), bt.bib_id, i.historical_charges, ct.charge_date, l.location_code, bt.record_status, bt.encoding_level, bt.series, ista.item_status_desc, mi.item_enum, --ista.item_status_desc --mi.item_enum --i.enumeration bt.pub_dates_combined order by mm.display_call_no
true
860bfc6cce08e1fa9f8733de993b1caa5f35a770
SQL
chenshanghao/RestartJobHunting
/Database Exercise/Leetcode181_Employees Earning More Than Their Managers /mySolution.sql
UTF-8
258
3.71875
4
[]
no_license
# Write your MySQL query statement below Select E3.Name as Employee From ( Select E1.Id, E1.Name, E1.Salary, E1.ManagerId, E2.Salary as ManagerSalary From Employee E1 left join Employee E2 On E1.ManagerId = E2. Id ) as E3 Where E3.Salary > E3.ManagerSalary;
true
1cd9891a7dfdfee3d09f3ff54208dbcaeddbdf5d
SQL
ClickHouse/ClickHouse
/tests/queries/0_stateless/00586_removing_unused_columns_from_subquery.sql
UTF-8
2,629
3.765625
4
[ "Apache-2.0", "BSL-1.0" ]
permissive
SET any_join_distinct_right_table_keys = 1; SET joined_subquery_requires_alias = 0; DROP TABLE IF EXISTS local_statements; DROP TABLE IF EXISTS statements; CREATE TABLE local_statements ( statementId String, eventDate Date, eventHour DateTime, eventTime DateTime, verb String, objectId String, onCourse UInt8, courseId UInt16, contextRegistration String, resultScoreRaw Float64, resultScoreMin Float64, resultScoreMax Float64, resultSuccess UInt8, resultCompletition UInt8, resultDuration UInt32, resultResponse String, learnerId String, learnerHash String, contextId UInt16) ENGINE = MergeTree ORDER BY tuple(); CREATE TABLE statements ( statementId String, eventDate Date, eventHour DateTime, eventTime DateTime, verb String, objectId String, onCourse UInt8, courseId UInt16, contextRegistration String, resultScoreRaw Float64, resultScoreMin Float64, resultScoreMax Float64, resultSuccess UInt8, resultCompletition UInt8, resultDuration UInt32, resultResponse String, learnerId String, learnerHash String, contextId UInt16) ENGINE = Distributed(test_shard_localhost, currentDatabase(), 'local_statements', sipHash64(learnerHash)); INSERT INTO local_statements FORMAT CSV "2b3b04ee-0bb8-4200-906f-d47c48e56bd0","2016-08-25","2016-08-25 14:00:00","2016-08-25 14:43:34","http://adlnet.gov/expapi/verbs/passed","https://crmm.ru/xapi/courses/spp/2/0/3/2/8",0,1,"c13d788c-26e0-40e3-bacb-a1ff78ee1518",100,0,0,0,0,0,"","https://sberbank-school.ru/xapi/accounts/userid/94312","6f696f938a69b5e173093718e1c2bbf2",0 SELECT avg(diff) FROM ( SELECT * FROM ( SELECT learnerHash, passed - eventTime AS diff FROM statements GLOBAL SEMI LEFT JOIN ( SELECT learnerHash, argMax(eventTime, resultScoreRaw) AS passed FROM ( SELECT learnerHash, eventTime, resultScoreRaw FROM statements WHERE (courseId = 1) AND (onCourse = 0) AND (verb = 'http://adlnet.gov/expapi/verbs/passed') AND (objectId = 'https://crmm.ru/xapi/courses/spp/1/1/0-1') ORDER BY eventTime ASC ) GROUP BY learnerHash ) USING (learnerHash) WHERE (courseId = 1) AND (onCourse = 0) AND (verb = 'http://adlnet.gov/expapi/verbs/interacted') AND (eventTime <= passed) AND (diff > 0) ORDER BY eventTime DESC LIMIT 1 BY learnerHash ) ORDER BY diff DESC LIMIT 7, 126 ); DROP TABLE local_statements; DROP TABLE statements;
true
1c23c1486bdacb61e31f38093248ef5d54d523d8
SQL
iaueos/lang
/sql/GetAllAppQuery.sql
UTF-8
770
4.25
4
[ "MIT" ]
permissive
SELECT des.[program_name], des.login_name, des.host_name -- , , dec.most_recent_sql_handle , t.text -- COUNT(des.session_id) [Connections] FROM sys.dm_exec_sessions des INNER JOIN sys.dm_exec_connections DEC ON des.session_id = DEC.session_id CROSS APPLY sys.dm_exec_sql_text(dec.most_recent_sql_handle) AS t WHERE des.is_user_process = 1 -- AND des.status != 'running' and CHARINDEX('SQL Workbench', des.[program_name]) < 1 and CHARINDEX('SQLAgent', des.[program_name]) < 1 and CHARINDEX('Microsoft SQL Server', des.[program_name]) < 1 and CHARINDEX('SQL Server', des.[program_name]) < 1 -- GROUP BY des.program_name, -- des.login_name, --- des.host_name -- ,der.database_id --- HAVING COUNT(des.session_id) > 2 -- ORDER BY COUNT(des.session_id) DESC
true
2fc163871176e1741a37166294a41fe5e61e92b6
SQL
MikolD/medaase
/twitter.sql
UTF-8
15,510
2.96875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 13, 2021 at 03:16 PM -- Server version: 10.4.13-MariaDB -- PHP Version: 7.4.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `twitter` -- -- -------------------------------------------------------- -- -- Table structure for table `comments` -- CREATE TABLE `comments` ( `id` int(11) NOT NULL, `comment` varchar(140) COLLATE utf16_unicode_ci NOT NULL, `user_id` int(11) NOT NULL, `post_id` int(11) NOT NULL, `time` datetime NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci; -- -- Dumping data for table `comments` -- INSERT INTO `comments` (`id`, `comment`, `user_id`, `post_id`, `time`) VALUES (44, 'great work', 25, 574, '2021-05-01 02:21:10'), (45, 'sasa', 2, 712, '2021-05-01 05:31:56'); -- -------------------------------------------------------- -- -- Table structure for table `follow` -- CREATE TABLE `follow` ( `id` int(11) NOT NULL, `follower_id` int(11) NOT NULL, `following_id` int(11) NOT NULL, `time` datetime NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci; -- -- Dumping data for table `follow` -- INSERT INTO `follow` (`id`, `follower_id`, `following_id`, `time`) VALUES (15, 40, 2, '2021-04-19 18:30:06'), (16, 33, 2, '2021-04-19 18:30:56'), (41, 37, 2, '2021-04-20 20:19:49'), (43, 5, 2, '2021-04-20 20:20:32'), (44, 27, 2, '2021-04-20 20:21:18'), (45, 34, 2, '2021-04-20 20:22:07'), (90, 41, 2, '2021-04-25 18:20:22'), (94, 25, 27, '2021-04-27 07:07:27'), (98, 42, 2, '2021-04-29 06:30:41'), (99, 43, 2, '2021-04-29 06:32:50'), (100, 44, 2, '2021-04-29 18:17:25'), (101, 2, 25, '2021-04-30 02:16:24'), (102, 25, 2, '2021-04-30 22:56:21'), (120, 54, 2, '2021-05-01 06:57:13'), (121, 55, 2, '2021-05-12 16:18:45'), (126, 56, 2, '2021-05-12 16:35:31'), (128, 57, 2, '2021-05-12 18:23:30'), (129, 58, 2, '2021-05-13 14:52:58'); -- -------------------------------------------------------- -- -- Table structure for table `likes` -- CREATE TABLE `likes` ( `id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `post_id` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci; -- -- Dumping data for table `likes` -- INSERT INTO `likes` (`id`, `user_id`, `post_id`) VALUES (192, 2, 362), (209, 25, 573), (211, 2, 573), (214, 2, 574), (224, 25, 635), (225, 25, 712), (227, 2, 711); -- -------------------------------------------------------- -- -- Table structure for table `notifications` -- CREATE TABLE `notifications` ( `id` int(11) NOT NULL, `notify_for` int(11) NOT NULL, `notify_from` int(11) NOT NULL, `target` int(11) NOT NULL, `type` enum('follow','like','retweet','qoute','comment','reply','mention') COLLATE utf16_unicode_ci NOT NULL, `time` datetime NOT NULL, `count` int(11) NOT NULL, `status` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci; -- -- Dumping data for table `notifications` -- INSERT INTO `notifications` (`id`, `notify_for`, `notify_from`, `target`, `type`, `time`, `count`, `status`) VALUES (30, 2, 25, 635, 'like', '2021-04-29 05:50:12', 1, 0), (32, 2, 42, 0, 'follow', '2021-04-29 06:30:41', 1, 0), (34, 2, 25, 711, 'qoute', '2021-04-29 18:29:24', 1, 0), (35, 25, 2, 712, 'qoute', '2021-04-29 18:29:55', 1, 0), (36, 2, 25, 712, 'like', '2021-04-29 18:31:11', 1, 0), (37, 2, 25, 712, 'retweet', '2021-04-29 18:31:19', 1, 0), (38, 25, 2, 0, 'follow', '2021-04-30 02:16:24', 1, 0), (39, 2, 25, 0, 'follow', '2021-04-30 22:56:20', 1, 0), (53, 2, 25, 574, 'comment', '2021-05-01 02:21:10', 1, 0), (54, 25, 2, 574, 'reply', '2021-05-01 02:21:51', 1, 0), (55, 2, 42, 725, 'mention', '2021-05-01 02:25:37', 1, 0), (58, 25, 2, 711, 'like', '2021-05-01 04:32:36', 1, 0), (67, 2, 54, 0, 'follow', '2021-05-01 06:57:13', 1, 0), (68, 2, 55, 0, 'follow', '2021-05-12 16:18:46', 1, 0), (73, 2, 56, 0, 'follow', '2021-05-12 16:35:31', 1, 0), (75, 2, 57, 0, 'follow', '2021-05-12 18:23:30', 1, 0), (76, 2, 58, 0, 'follow', '2021-05-13 14:52:58', 1, 0); -- -------------------------------------------------------- -- -- Table structure for table `posts` -- CREATE TABLE `posts` ( `id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `post_on` datetime NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci; -- -- Dumping data for table `posts` -- INSERT INTO `posts` (`id`, `user_id`, `post_on`) VALUES (362, 2, '2021-02-06 08:31:07'), (573, 2, '2021-04-02 03:03:39'), (574, 2, '2021-04-02 03:04:53'), (635, 2, '2021-04-15 09:03:32'), (654, 2, '2021-04-25 02:19:45'), (711, 25, '2021-04-29 18:29:24'), (712, 2, '2021-04-29 18:29:55'); -- -------------------------------------------------------- -- -- Table structure for table `replies` -- CREATE TABLE `replies` ( `id` int(11) NOT NULL, `comment_id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `reply` varchar(140) COLLATE utf16_unicode_ci NOT NULL, `time` datetime NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci; -- -- Dumping data for table `replies` -- INSERT INTO `replies` (`id`, `comment_id`, `user_id`, `reply`, `time`) VALUES (11, 44, 2, 'ty', '2021-05-01 02:21:51'); -- -------------------------------------------------------- -- -- Table structure for table `retweets` -- CREATE TABLE `retweets` ( `post_id` int(11) NOT NULL, `retweet_msg` varchar(140) COLLATE utf16_unicode_ci DEFAULT NULL, `tweet_id` int(11) DEFAULT NULL, `retweet_id` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci; -- -- Dumping data for table `retweets` -- INSERT INTO `retweets` (`post_id`, `retweet_msg`, `tweet_id`, `retweet_id`) VALUES (711, 'good job', 654, NULL), (712, '&lt;3', NULL, 711); -- -------------------------------------------------------- -- -- Table structure for table `trends` -- CREATE TABLE `trends` ( `id` int(11) NOT NULL, `hashtag` varchar(140) COLLATE utf16_unicode_ci NOT NULL, `created_on` datetime NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci; -- -- Dumping data for table `trends` -- INSERT INTO `trends` (`id`, `hashtag`, `created_on`) VALUES (1, 'php', '2021-01-06 05:57:43'), (4, 'hi', '2021-01-25 21:42:35'), (5, 'alex', '2021-01-25 21:42:36'), (6, '7oda', '2021-03-20 23:40:12'), (9, 'js', '2021-04-02 03:24:28'), (12, 'bro', '2021-04-02 03:31:38'); -- -------------------------------------------------------- -- -- Table structure for table `tweets` -- CREATE TABLE `tweets` ( `post_id` int(11) NOT NULL, `status` varchar(140) COLLATE utf16_unicode_ci DEFAULT NULL, `img` text COLLATE utf16_unicode_ci DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci; -- -- Dumping data for table `tweets` -- INSERT INTO `tweets` (`post_id`, `status`, `img`) VALUES (362, '@amin hello it\'s amin here!', NULL), (573, 'one day!', 'tweet-60666d6b426a1.jpg'), (574, '#php is fun', NULL), (635, '', 'tweet-6077e54477f73.jpeg'), (654, 'it\'s all about big dreams!', NULL); -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE `users` ( `id` int(11) NOT NULL, `username` varchar(40) COLLATE utf16_unicode_ci NOT NULL, `email` varchar(255) COLLATE utf16_unicode_ci NOT NULL, `password` varchar(32) COLLATE utf16_unicode_ci NOT NULL, `name` varchar(40) COLLATE utf16_unicode_ci NOT NULL, `img` varchar(255) COLLATE utf16_unicode_ci NOT NULL DEFAULT 'default.jpg', `imgCover` varchar(255) COLLATE utf16_unicode_ci NOT NULL DEFAULT 'cover.png', `bio` varchar(140) COLLATE utf16_unicode_ci NOT NULL DEFAULT '', `location` varchar(255) COLLATE utf16_unicode_ci NOT NULL DEFAULT '', `website` varchar(255) COLLATE utf16_unicode_ci NOT NULL DEFAULT '' ) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci; -- -- Dumping data for table `users` -- INSERT INTO `users` (`id`, `username`, `email`, `password`, `name`, `img`, `imgCover`, `bio`, `location`, `website`) VALUES (2, 'amin', 'amin@twitter.com', '8e4e9b7ac6fc0df9e06f57f1c366cf8a', 'Amin.', 'user-608b4b4187b5c.JPG', 'user-607ef530bdeab.jpg', 'Undergraduate Software Engineer.', 'Alexandria,Egypt', 'https://github.com/aminyasser'), (5, 'bodatolba', 'tolba@twitter.com', 'e10adc3949ba59abbe56e057f20f883e', 'Tolba', 'default.jpg', 'cover.png', '', '', ''), (25, '7oda', '7oda@twitter.com', 'e10adc3949ba59abbe56e057f20f883e', '7oda', 'default.jpg', 'cover.png', '', '', ''), (27, 'hasona', 'hasona@twitter.com', 'e10adc3949ba59abbe56e057f20f883e', 'hassan', 'default.jpg', 'cover.png', '', '', ''), (33, '7odawael', 'wael@twitter.com', 'e10adc3949ba59abbe56e057f20f883e', 'Mahmoud', 'default.jpg', 'cover.png', '', '', ''), (34, 'haidy', 'haidy@twitter.com', 'e10adc3949ba59abbe56e057f20f883e', 'haidy', 'default.jpg', 'cover.png', '', '', ''), (37, 'aminn', 'amin1@twitter.com', 'e10adc3949ba59abbe56e057f20f883e', 'Amin Yasser', 'default.jpg', 'cover.png', '', '', ''), (40, 'mohanadyasser', 'mohanad@twitter.com', 'e10adc3949ba59abbe56e057f20f883e', 'Mohanad', 'default.jpg', 'cover.png', '', '', ''), (41, 'khaled0', 'khaled@twitter.com', 'e10adc3949ba59abbe56e057f20f883e', 'Khalid', 'default.jpg', 'cover.png', '', '', ''), (42, 'ahmed0', 'ahmed@twitter.com', 'e10adc3949ba59abbe56e057f20f883e', 'Ahmed', 'default.jpg', 'user-609be2968c0b9.png', '', '', ''), (43, 'samy', 'samy@twitter.com', 'e10adc3949ba59abbe56e057f20f883e', 'Samy', 'default.jpg', 'cover.png', '', '', ''), (44, 'remo', 'remo@twitter.com', 'e10adc3949ba59abbe56e057f20f883e', 'Ramez', 'default.jpg', 'cover.png', '', '', ''), (54, 'aminyasser', 'amino@twitter.com', 'e10adc3949ba59abbe56e057f20f883e', 'Amin Yasser', 'default.jpg', 'cover.png', '', '', ''), (55, 'sasaa', 'aminsss@twitter.com', 'e10adc3949ba59abbe56e057f20f883e', 'Amin Yasser', 'user-609be3deec8e5.jpg', 'cover.png', '', '', ''), (56, 'nbnbkj', 'nn@twittt.com', 'e10adc3949ba59abbe56e057f20f883e', 'Markting', 'default.jpg', 'cover.png', '', '', ''), (57, 'sas', 'amin@ydar.com', 'e10adc3949ba59abbe56e057f20f883e', 'Amin Yasser', 'default.jpg', 'cover.png', '', '', ''), (58, '201', 'amin111@twitter.com', 'e10adc3949ba59abbe56e057f20f883e', 'Amin1', 'default.jpg', 'cover.png', 'Hey', '', ''); -- -- Indexes for dumped tables -- -- -- Indexes for table `comments` -- ALTER TABLE `comments` ADD PRIMARY KEY (`id`), ADD KEY `post_id` (`post_id`), ADD KEY `user_id` (`user_id`); -- -- Indexes for table `follow` -- ALTER TABLE `follow` ADD PRIMARY KEY (`id`), ADD KEY `follower_id` (`follower_id`), ADD KEY `following_id` (`following_id`); -- -- Indexes for table `likes` -- ALTER TABLE `likes` ADD PRIMARY KEY (`id`), ADD KEY `user_id` (`user_id`), ADD KEY `likes_ibfk_2` (`post_id`); -- -- Indexes for table `notifications` -- ALTER TABLE `notifications` ADD PRIMARY KEY (`id`), ADD KEY `notifications_ibfk_1` (`notify_for`), ADD KEY `notifications_ibfk_2` (`notify_from`); -- -- Indexes for table `posts` -- ALTER TABLE `posts` ADD PRIMARY KEY (`id`), ADD KEY `user_id` (`user_id`); -- -- Indexes for table `replies` -- ALTER TABLE `replies` ADD PRIMARY KEY (`id`), ADD KEY `comment_id` (`comment_id`), ADD KEY `user_id` (`user_id`); -- -- Indexes for table `retweets` -- ALTER TABLE `retweets` ADD PRIMARY KEY (`post_id`) USING BTREE, ADD KEY `retweet_id` (`retweet_id`), ADD KEY `retweets_ibfk_2` (`tweet_id`); -- -- Indexes for table `trends` -- ALTER TABLE `trends` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `hashtag` (`hashtag`); -- -- Indexes for table `tweets` -- ALTER TABLE `tweets` ADD PRIMARY KEY (`post_id`); -- -- Indexes for table `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `comments` -- ALTER TABLE `comments` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=46; -- -- AUTO_INCREMENT for table `follow` -- ALTER TABLE `follow` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=136; -- -- AUTO_INCREMENT for table `likes` -- ALTER TABLE `likes` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=228; -- -- AUTO_INCREMENT for table `notifications` -- ALTER TABLE `notifications` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=83; -- -- AUTO_INCREMENT for table `posts` -- ALTER TABLE `posts` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=726; -- -- AUTO_INCREMENT for table `replies` -- ALTER TABLE `replies` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12; -- -- AUTO_INCREMENT for table `trends` -- ALTER TABLE `trends` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13; -- -- AUTO_INCREMENT for table `users` -- ALTER TABLE `users` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=59; -- -- Constraints for dumped tables -- -- -- Constraints for table `comments` -- ALTER TABLE `comments` ADD CONSTRAINT `comments_ibfk_1` FOREIGN KEY (`post_id`) REFERENCES `posts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `comments_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `follow` -- ALTER TABLE `follow` ADD CONSTRAINT `follow_ibfk_1` FOREIGN KEY (`follower_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `follow_ibfk_2` FOREIGN KEY (`following_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `likes` -- ALTER TABLE `likes` ADD CONSTRAINT `likes_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `likes_ibfk_2` FOREIGN KEY (`post_id`) REFERENCES `posts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `notifications` -- ALTER TABLE `notifications` ADD CONSTRAINT `notifications_ibfk_1` FOREIGN KEY (`notify_for`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `notifications_ibfk_2` FOREIGN KEY (`notify_from`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `posts` -- ALTER TABLE `posts` ADD CONSTRAINT `posts_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `replies` -- ALTER TABLE `replies` ADD CONSTRAINT `replies_ibfk_1` FOREIGN KEY (`comment_id`) REFERENCES `comments` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `replies_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `retweets` -- ALTER TABLE `retweets` ADD CONSTRAINT `retweets_ibfk_1` FOREIGN KEY (`post_id`) REFERENCES `posts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `retweets_ibfk_2` FOREIGN KEY (`tweet_id`) REFERENCES `tweets` (`post_id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `retweets_ibfk_3` FOREIGN KEY (`retweet_id`) REFERENCES `retweets` (`post_id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `tweets` -- ALTER TABLE `tweets` ADD CONSTRAINT `tweets_ibfk_1` FOREIGN KEY (`post_id`) REFERENCES `posts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
true
69d1f55dba48b63162e20fe1b32d727f93d0ee2c
SQL
KagisoRKA/SQL
/SQL scripts/Part2/Part2.sql
UTF-8
1,136
3.515625
4
[]
no_license
--Part2: QUERYING A DATABASE --01. SELECT * FROM customers; --02. SELECT first_name FROM customers; --03. SELECT first_name, last_name FROM customers WHERE customerid=1; --04. UPDATE Customers SET first_name= 'Lerato', last_name= 'Mabitso' WHERE customerid=1; --05. DELETE FROM customers WHERE customerid=2; --06. SELECT COUNT(DISTINCT status) FROM orders; --07. SELECT MAX(amount) FROM payments; --08. SELECT * FROM customers ORDER BY country; --09. SELECT * FROM products WHERE buyprice>100 AND buyprice<600; --10. SELECT * FROM customers WHERE country='Germany' AND city='Berlin'; --11. SELECT * FROM customers WHERE city='Cape Town' OR city='Durban'; --12. SELECT * FROM products WHERE buyprice>500; --13. SELECT SUM(amount) FROM payments; --14. SELECT COUNT(status) FROM orders WHERE status='Shipped'; --15. > SELECT AVG(amount) FROM payments; -- > SELECT AVG(amount*12) FROM payments; --16. SELECT payments.paymentid, customers.first_name FROM payments INNER JOIN customers ON payments.customerid = customers.customerid; --17. SELECT * FROM products WHERE description LIKE 'Turnable front wheels%';
true
179d7a170084fba7f5e71f4124d5f89b2dcb75d5
SQL
ninedev90/cit225
/oracle/lab2/apply_oracle_lab2.sql
UTF-8
51,926
4
4
[]
no_license
-- ---------------------------------------------------------------------- -- Instructions: -- ---------------------------------------------------------------------- -- The two scripts contain spooling commands, which is why there -- isn't a spooling command in this script. When you run this file -- you first connect to the Oracle database with this syntax: -- -- sqlplus student/student@xe -- -- Then, you call this script with the following syntax: -- -- sql> @apply_oracle_lab2.sql -- -- ---------------------------------------------------------------------- -- Run the prior lab script. @/home/student/Data/cit225/oracle/lib/cleanup_oracle.sql @/home/student/Data/cit225/oracle/lib/create_oracle_store.sql -- Add your lab here: -- ---------------------------------------------------------------------- -- Open log file. SPOOL apply_oracle_lab2.log -- Set SQL*Plus environmnet variables. SET ECHO ON SET FEEDBACK ON SET NULL '<Null>' SET PAGESIZE 999 SET SERVEROUTPUT ON SIZE UNLIMITED -- ------------------------------------------------------------------ -- Create and assign bind variable for table name. -- ------------------------------------------------------------------ VARIABLE table_name VARCHAR2(30) BEGIN :table_name := UPPER('system_user_lab'); END; / -- Verify table name. SELECT :table_name FROM dual; -- ------------------------------------------------------------------ -- Conditionally drop table. -- ------------------------------------------------------------------ DECLARE /* Dynamic cursor. */ CURSOR c (cv_object_name VARCHAR2) IS SELECT o.object_type , o.object_name FROM user_objects o WHERE o.object_name LIKE UPPER(cv_object_name||'%'); BEGIN FOR i IN c(:table_name) LOOP IF i.object_type = 'SEQUENCE' THEN EXECUTE IMMEDIATE 'DROP '||i.object_type||' '||i.object_name; ELSIF i.object_type = 'TABLE' THEN EXECUTE IMMEDIATE 'DROP '||i.object_type||' '||i.object_name||' CASCADE CONSTRAINTS'; END IF; END LOOP; END; / -- Create table. CREATE TABLE system_user_lab ( system_user_lab_id NUMBER , system_user_lab_name VARCHAR2(20) CONSTRAINT nn_system_user_lab_1 NOT NULL , system_user_lab_group_id NUMBER CONSTRAINT nn_system_user_lab_2 NOT NULL , system_user_lab_type NUMBER CONSTRAINT nn_system_user_lab_3 NOT NULL , first_name VARCHAR2(20) , middle_name VARCHAR2(20) , last_name VARCHAR2(20) , created_by NUMBER CONSTRAINT nn_system_user_lab_4 NOT NULL , creation_date DATE CONSTRAINT nn_system_user_lab_5 NOT NULL , last_updated_by NUMBER CONSTRAINT nn_system_user_lab_6 NOT NULL , last_update_date DATE CONSTRAINT nn_system_user_lab_7 NOT NULL , CONSTRAINT pk_system_user_lab_1 PRIMARY KEY(system_user_lab_id) , CONSTRAINT fk_system_user_lab_1 FOREIGN KEY(created_by) REFERENCES system_user_lab(system_user_lab_id) , CONSTRAINT fk_system_user_lab_2 FOREIGN KEY(last_updated_by) REFERENCES system_user_lab(system_user_lab_id)); -- Display the table organization. SET NULL '' COLUMN table_name FORMAT A16 COLUMN column_id FORMAT 9999 COLUMN column_name FORMAT A22 COLUMN data_type FORMAT A12 SELECT table_name , column_id , column_name , CASE WHEN nullable = 'N' THEN 'NOT NULL' ELSE '' END AS nullable , CASE WHEN data_type IN ('CHAR','VARCHAR2','NUMBER') THEN data_type||'('||data_length||')' ELSE data_type END AS data_type FROM user_tab_columns WHERE table_name = 'SYSTEM_USER_LAB' ORDER BY 2; -- Display non-unique constraints. COLUMN constraint_name FORMAT A22 COLUMN search_condition FORMAT A36 COLUMN constraint_type FORMAT A1 SELECT uc.constraint_name , uc.search_condition , uc.constraint_type FROM user_constraints uc INNER JOIN user_cons_columns ucc ON uc.table_name = ucc.table_name AND uc.constraint_name = ucc.constraint_name WHERE uc.table_name = UPPER('system_user_lab') AND uc.constraint_type = UPPER('c') ORDER BY uc.constraint_name; -- Display foreign key constraints. COL constraint_source FORMAT A38 HEADING "Constraint Name:| Table.Column" COL references_column FORMAT A40 HEADING "References:| Table.Column" SELECT uc.constraint_name||CHR(10) || '('||ucc1.table_name||'.'||ucc1.column_name||')' constraint_source , 'REFERENCES'||CHR(10) || '('||ucc2.table_name||'.'||ucc2.column_name||')' references_column FROM user_constraints uc , user_cons_columns ucc1 , user_cons_columns ucc2 WHERE uc.constraint_name = ucc1.constraint_name AND uc.r_constraint_name = ucc2.constraint_name AND ucc1.position = ucc2.position -- Correction for multiple column primary keys. AND uc.constraint_type = 'R' AND ucc1.table_name = 'SYSTEM_USER_LAB' ORDER BY ucc1.table_name , uc.constraint_name; -- Create unique index. CREATE UNIQUE INDEX uq_system_user_lab_1 ON system_user_lab (system_user_lab_name); -- Display unique indexes. COLUMN index_name FORMAT A20 HEADING "Index Name" SELECT index_name FROM user_indexes WHERE TABLE_NAME = UPPER('system_user_lab'); -- Create sequence. CREATE SEQUENCE system_user_lab_s1 START WITH 1001 NOCACHE; -- Display sequence. COLUMN sequence_name FORMAT A20 HEADING "Sequence Name" SELECT sequence_name FROM user_sequences WHERE sequence_name = UPPER('system_user_lab_s1'); -- ------------------------------------------------------------------ -- Create COMMON_LOOKUP_LAB table and sequence and seed data. -- ------------------------------------------------------------------ -- Conditionally drop table and sequence. BEGIN FOR i IN (SELECT null FROM user_tables WHERE table_name = 'COMMON_LOOKUP_LAB') LOOP EXECUTE IMMEDIATE 'DROP TABLE common_lookup_lab CASCADE CONSTRAINTS'; END LOOP; FOR i IN (SELECT null FROM user_sequences WHERE sequence_name = 'COMMON_LOOKUP_LAB_S1') LOOP EXECUTE IMMEDIATE 'DROP SEQUENCE common_lookup_lab_s1'; END LOOP; END; / -- Create table. CREATE TABLE common_lookup_lab ( common_lookup_lab_id NUMBER , common_lookup_lab_context VARCHAR2(30) CONSTRAINT nn_clookup_lab_1 NOT NULL , common_lookup_lab_type VARCHAR2(30) CONSTRAINT nn_clookup_lab_2 NOT NULL , common_lookup_lab_meaning VARCHAR2(30) CONSTRAINT nn_clookup_lab_3 NOT NULL , created_by NUMBER CONSTRAINT nn_clookup_lab_4 NOT NULL , creation_date DATE CONSTRAINT nn_clookup_lab_5 NOT NULL , last_updated_by NUMBER CONSTRAINT nn_clookup_lab_6 NOT NULL , last_update_date DATE CONSTRAINT nn_clookup_lab_7 NOT NULL , CONSTRAINT pk_clookup_lab_1 PRIMARY KEY(common_lookup_lab_id) , CONSTRAINT fk_clookup_lab_1 FOREIGN KEY(created_by) REFERENCES system_user_lab(system_user_lab_id) , CONSTRAINT fk_clookup_lab_2 FOREIGN KEY(last_updated_by) REFERENCES system_user_lab(system_user_lab_id)); -- Display the table organization. SET NULL '' COLUMN table_name FORMAT A16 COLUMN column_id FORMAT 9999 COLUMN column_name FORMAT A22 COLUMN data_type FORMAT A12 SELECT table_name , column_id , column_name , CASE WHEN nullable = 'N' THEN 'NOT NULL' ELSE '' END AS nullable , CASE WHEN data_type IN ('CHAR','VARCHAR2','NUMBER') THEN data_type||'('||data_length||')' ELSE data_type END AS data_type FROM user_tab_columns WHERE table_name = 'COMMON_LOOKUP_LAB' ORDER BY 2; -- Display non-unique constraints. COLUMN constraint_name FORMAT A22 COLUMN search_condition FORMAT A36 COLUMN constraint_type FORMAT A1 SELECT uc.constraint_name , uc.search_condition , uc.constraint_type FROM user_constraints uc INNER JOIN user_cons_columns ucc ON uc.table_name = ucc.table_name AND uc.constraint_name = ucc.constraint_name WHERE uc.table_name = UPPER('common_lookup_lab') AND uc.constraint_type IN (UPPER('c'),UPPER('p')) ORDER BY uc.constraint_type DESC , uc.constraint_name; -- Display foreign key constraints. COL constraint_source FORMAT A38 HEADING "Constraint Name:| Table.Column" COL references_column FORMAT A40 HEADING "References:| Table.Column" SELECT uc.constraint_name||CHR(10) || '('||ucc1.table_name||'.'||ucc1.column_name||')' constraint_source , 'REFERENCES'||CHR(10) || '('||ucc2.table_name||'.'||ucc2.column_name||')' references_column FROM user_constraints uc , user_cons_columns ucc1 , user_cons_columns ucc2 WHERE uc.constraint_name = ucc1.constraint_name AND uc.r_constraint_name = ucc2.constraint_name AND ucc1.position = ucc2.position -- Correction for multiple column primary keys. AND uc.constraint_type = 'R' AND ucc1.table_name = 'COMMON_LOOKUP_LAB' ORDER BY ucc1.table_name , uc.constraint_name; -- Create a non-unique index. CREATE INDEX common_lookup_lab_n1 ON common_lookup_lab(common_lookup_lab_context); -- Create a unique index. CREATE UNIQUE INDEX common_lookup_lab_u2 ON common_lookup_lab(common_lookup_lab_context,common_lookup_lab_type); -- Display unique and non-unique indexes. COLUMN sequence_name FORMAT A22 HEADING "Sequence Name" COLUMN column_position FORMAT 999 HEADING "Column|Position" COLUMN column_name FORMAT A22 HEADING "Column|Name" SELECT ui.index_name , uic.column_position , uic.column_name FROM user_indexes ui INNER JOIN user_ind_columns uic ON ui.index_name = uic.index_name AND ui.table_name = uic.table_name WHERE ui.table_name = UPPER('common_lookup_lab') ORDER BY ui.index_name , uic.column_position; -- Add a constraint to the SYSTEM_USER_LAB table dependent on the COMMON_LOOKUP_LAB table. ALTER TABLE system_user_lab ADD CONSTRAINT fk_system_user_lab_3 FOREIGN KEY(system_user_lab_group_id) REFERENCES common_lookup_lab(common_lookup_lab_id); ALTER TABLE system_user_lab ADD CONSTRAINT fk_system_user_lab_4 FOREIGN KEY(system_user_lab_type) REFERENCES common_lookup_lab(common_lookup_lab_id); -- Display foreign key constraints. COL constraint_source FORMAT A38 HEADING "Constraint Name:| Table.Column" COL references_column FORMAT A40 HEADING "References:| Table.Column" SELECT uc.constraint_name||CHR(10) || '('||ucc1.table_name||'.'||ucc1.column_name||')' constraint_source , 'REFERENCES'||CHR(10) || '('||ucc2.table_name||'.'||ucc2.column_name||')' references_column FROM user_constraints uc , user_cons_columns ucc1 , user_cons_columns ucc2 WHERE uc.constraint_name = ucc1.constraint_name AND uc.r_constraint_name = ucc2.constraint_name AND ucc1.position = ucc2.position -- Correction for multiple column primary keys. AND uc.constraint_type = 'R' AND ucc1.table_name = 'SYSTEM_USER_LAB' ORDER BY ucc1.table_name , uc.constraint_name; -- Create a sequence. CREATE SEQUENCE common_lookup_lab_s1 START WITH 1001; -- Display sequence. COLUMN sequence_name FORMAT A20 HEADING "Sequence Name" SELECT sequence_name FROM user_sequences WHERE sequence_name = UPPER('common_lookup_lab_s1'); -- ------------------------------------------------------------------ -- Create MEMBER_LAB table and sequence and seed data. -- ------------------------------------------------------------------ -- Conditionally drop table and sequence. BEGIN FOR i IN (SELECT null FROM user_tables WHERE table_name = 'MEMBER_LAB') LOOP EXECUTE IMMEDIATE 'DROP TABLE member_lab CASCADE CONSTRAINTS'; END LOOP; FOR i IN (SELECT null FROM user_sequences WHERE sequence_name = 'MEMBER_LAB_S1') LOOP EXECUTE IMMEDIATE 'DROP SEQUENCE member_lab_s1'; END LOOP; END; / -- Create table. CREATE TABLE member_lab ( member_lab_id NUMBER , member_lab_type NUMBER , account_number VARCHAR2(10) CONSTRAINT nn_member_lab_2 NOT NULL , credit_card_number VARCHAR2(19) CONSTRAINT nn_member_lab_3 NOT NULL , credit_card_type NUMBER CONSTRAINT nn_member_lab_4 NOT NULL , created_by NUMBER CONSTRAINT nn_member_lab_5 NOT NULL , creation_date DATE CONSTRAINT nn_member_lab_6 NOT NULL , last_updated_by NUMBER CONSTRAINT nn_member_lab_7 NOT NULL , last_update_date DATE CONSTRAINT nn_member_lab_8 NOT NULL , CONSTRAINT pk_member_lab_1 PRIMARY KEY(member_lab_id) , CONSTRAINT fk_member_lab_1 FOREIGN KEY(member_lab_type) REFERENCES common_lookup_lab(common_lookup_lab_id) , CONSTRAINT fk_member_lab_2 FOREIGN KEY(credit_card_type) REFERENCES common_lookup_lab(common_lookup_lab_id) , CONSTRAINT fk_member_lab_3 FOREIGN KEY(created_by) REFERENCES system_user_lab(system_user_lab_id) , CONSTRAINT fk_member_lab_4 FOREIGN KEY(last_updated_by) REFERENCES system_user_lab(system_user_lab_id)); -- Display the table organization. SET NULL '' COLUMN table_name FORMAT A16 COLUMN column_id FORMAT 9999 COLUMN column_name FORMAT A22 COLUMN data_type FORMAT A12 SELECT table_name , column_id , column_name , CASE WHEN nullable = 'N' THEN 'NOT NULL' ELSE '' END AS nullable , CASE WHEN data_type IN ('CHAR','VARCHAR2','NUMBER') THEN data_type||'('||data_length||')' ELSE data_type END AS data_type FROM user_tab_columns WHERE table_name = 'MEMBER_LAB' ORDER BY 2; -- Display non-unique constraints. COLUMN constraint_name FORMAT A22 COLUMN search_condition FORMAT A36 COLUMN constraint_type FORMAT A1 SELECT uc.constraint_name , uc.search_condition , uc.constraint_type FROM user_constraints uc INNER JOIN user_cons_columns ucc ON uc.table_name = ucc.table_name AND uc.constraint_name = ucc.constraint_name WHERE uc.table_name = UPPER('member_lab') AND uc.constraint_type IN (UPPER('c'),UPPER('p')) ORDER BY uc.constraint_type DESC , uc.constraint_name; -- Display foreign key constraints. COL constraint_source FORMAT A38 HEADING "Constraint Name:| Table.Column" COL references_column FORMAT A40 HEADING "References:| Table.Column" SELECT uc.constraint_name||CHR(10) || '('||ucc1.table_name||'.'||ucc1.column_name||')' constraint_source , 'REFERENCES'||CHR(10) || '('||ucc2.table_name||'.'||ucc2.column_name||')' references_column FROM user_constraints uc , user_cons_columns ucc1 , user_cons_columns ucc2 WHERE uc.constraint_name = ucc1.constraint_name AND uc.r_constraint_name = ucc2.constraint_name AND ucc1.position = ucc2.position -- Correction for multiple column primary keys. AND uc.constraint_type = 'R' AND ucc1.table_name = 'MEMBER_LAB' ORDER BY ucc1.table_name , uc.constraint_name; -- Create a non-unique index. CREATE INDEX member_lab_n1 ON member_lab(credit_card_type); -- Display the non-unique index. COLUMN sequence_name FORMAT A22 HEADING "Sequence Name" COLUMN column_position FORMAT 999 HEADING "Column|Position" COLUMN column_name FORMAT A22 HEADING "Column|Name" SELECT ui.index_name , uic.column_position , uic.column_name FROM user_indexes ui INNER JOIN user_ind_columns uic ON ui.index_name = uic.index_name AND ui.table_name = uic.table_name WHERE ui.table_name = UPPER('member_lab') AND NOT ui.index_name IN (SELECT constraint_name FROM user_constraints) ORDER BY ui.index_name , uic.column_position; -- Create a sequence. CREATE SEQUENCE member_lab_s1 START WITH 1001 NOCACHE; COLUMN sequence_name FORMAT A20 HEADING "Sequence Name" SELECT sequence_name FROM user_sequences WHERE sequence_name = UPPER('member_lab_s1'); -- ------------------------------------------------------------------ -- Create CONTACT_LAB table and sequence and seed data. -- ------------------------------------------------------------------ -- Conditionally drop objects. BEGIN FOR i IN (SELECT null FROM user_tables WHERE table_name = 'CONTACT_LAB') LOOP EXECUTE IMMEDIATE 'DROP TABLE contact_lab CASCADE CONSTRAINTS'; END LOOP; FOR i IN (SELECT null FROM user_sequences WHERE sequence_name = 'CONTACT_LAB_S1') LOOP EXECUTE IMMEDIATE 'DROP SEQUENCE contact_lab_s1'; END LOOP; END; / CREATE TABLE contact_lab ( contact_lab_id NUMBER , member_lab_id NUMBER CONSTRAINT nn_contact_lab_1 NOT NULL , contact_lab_type NUMBER CONSTRAINT nn_contact_lab_2 NOT NULL , first_name VARCHAR2(20) CONSTRAINT nn_contact_lab_3 NOT NULL , middle_name VARCHAR2(20) , last_name VARCHAR2(20) CONSTRAINT nn_contact_lab_4 NOT NULL , created_by NUMBER CONSTRAINT nn_contact_lab_5 NOT NULL , creation_date DATE CONSTRAINT nn_contact_lab_6 NOT NULL , last_updated_by NUMBER CONSTRAINT nn_contact_lab_7 NOT NULL , last_update_date DATE CONSTRAINT nn_contact_lab_8 NOT NULL , CONSTRAINT pk_contact_lab_1 PRIMARY KEY(contact_lab_id) , CONSTRAINT fk_contact_lab_1 FOREIGN KEY(member_lab_id) REFERENCES member_lab(member_lab_id) , CONSTRAINT fk_contact_lab_2 FOREIGN KEY(contact_lab_type) REFERENCES common_lookup_lab(common_lookup_lab_id) , CONSTRAINT fk_contact_lab_3 FOREIGN KEY(created_by) REFERENCES system_user_lab(system_user_lab_id) , CONSTRAINT fk_contact_lab_4 FOREIGN KEY(last_updated_by) REFERENCES system_user_lab(system_user_lab_id)); -- Display the table organization. SET NULL '' COLUMN table_name FORMAT A16 COLUMN column_id FORMAT 9999 COLUMN column_name FORMAT A22 COLUMN data_type FORMAT A12 SELECT table_name , column_id , column_name , CASE WHEN nullable = 'N' THEN 'NOT NULL' ELSE '' END AS nullable , CASE WHEN data_type IN ('CHAR','VARCHAR2','NUMBER') THEN data_type||'('||data_length||')' ELSE data_type END AS data_type FROM user_tab_columns WHERE table_name = 'CONTACT_LAB' ORDER BY 2; -- Display non-unique constraints. COLUMN constraint_name FORMAT A22 COLUMN search_condition FORMAT A36 COLUMN constraint_type FORMAT A1 SELECT uc.constraint_name , uc.search_condition , uc.constraint_type FROM user_constraints uc INNER JOIN user_cons_columns ucc ON uc.table_name = ucc.table_name AND uc.constraint_name = ucc.constraint_name WHERE uc.table_name = UPPER('contact_lab') AND uc.constraint_type IN (UPPER('c'),UPPER('p')) ORDER BY uc.constraint_type DESC , uc.constraint_name; -- Display foreign key constraints. COL constraint_source FORMAT A38 HEADING "Constraint Name:| Table.Column" COL references_column FORMAT A40 HEADING "References:| Table.Column" SELECT uc.constraint_name||CHR(10) || '('||ucc1.table_name||'.'||ucc1.column_name||')' constraint_source , 'REFERENCES'||CHR(10) || '('||ucc2.table_name||'.'||ucc2.column_name||')' references_column FROM user_constraints uc , user_cons_columns ucc1 , user_cons_columns ucc2 WHERE uc.constraint_name = ucc1.constraint_name AND uc.r_constraint_name = ucc2.constraint_name AND ucc1.position = ucc2.position -- Correction for multiple column primary keys. AND uc.constraint_type = 'R' AND ucc1.table_name = 'CONTACT_LAB' ORDER BY ucc1.table_name , uc.constraint_name; -- Create non-unique indexes. CREATE INDEX contact_lab_n1 ON contact_lab(member_lab_id); CREATE INDEX contact_lab_n2 ON contact_lab(contact_lab_type); -- Display the non-unique index. COLUMN sequence_name FORMAT A22 HEADING "Sequence Name" COLUMN column_position FORMAT 999 HEADING "Column|Position" COLUMN column_name FORMAT A22 HEADING "Column|Name" SELECT ui.index_name , uic.column_position , uic.column_name FROM user_indexes ui INNER JOIN user_ind_columns uic ON ui.index_name = uic.index_name AND ui.table_name = uic.table_name WHERE ui.table_name = UPPER('contact_lab') AND NOT ui.index_name IN (SELECT constraint_name FROM user_constraints) ORDER BY ui.index_name , uic.column_position; -- Create sequence. CREATE SEQUENCE contact_lab_s1 START WITH 1001 NOCACHE; -- Display sequence value. COLUMN sequence_name FORMAT A20 HEADING "Sequence Name" SELECT sequence_name FROM user_sequences WHERE sequence_name = UPPER('contact_lab_s1'); -- ------------------------------------------------------------------ -- Create ADDRESS_LAB table and sequence. -- ------------------------------------------------------------------ -- Conditionally drop objects. BEGIN FOR i IN (SELECT null FROM user_tables WHERE table_name = 'ADDRESS_LAB') LOOP EXECUTE IMMEDIATE 'DROP TABLE address_lab CASCADE CONSTRAINTS'; END LOOP; FOR i IN (SELECT null FROM user_sequences WHERE sequence_name = 'ADDRESS_LAB_S1') LOOP EXECUTE IMMEDIATE 'DROP SEQUENCE address_lab_s1'; END LOOP; END; / -- create table CREATE TABLE address_lab ( address_lab_id NUMBER , contact_lab_id NUMBER CONSTRAINT nn_address_lab_1 NOT NULL , address_lab_type NUMBER CONSTRAINT nn_address_lab_2 NOT NULL , city VARCHAR2(30) CONSTRAINT nn_address_lab_3 NOT NULL , state_province VARCHAR2(30) CONSTRAINT nn_address_lab_4 NOT NULL , postal_code VARCHAR2(20) CONSTRAINT nn_address_lab_5 NOT NULL , created_by NUMBER CONSTRAINT nn_address_lab_6 NOT NULL , creation_date DATE CONSTRAINT nn_address_lab_7 NOT NULL , last_updated_by NUMBER CONSTRAINT nn_address_lab_8 NOT NULL , last_update_date DATE CONSTRAINT nn_address_lab_9 NOT NULL , CONSTRAINT pk_address_lab_1 PRIMARY KEY(address_lab_id) , CONSTRAINT fk_address_lab_1 FOREIGN KEY(contact_lab_id) REFERENCES contact_lab(contact_lab_id) , CONSTRAINT fk_address_lab_2 FOREIGN KEY(address_lab_type) REFERENCES common_lookup_lab(common_lookup_lab_id) , CONSTRAINT fk_address_lab_3 FOREIGN KEY(created_by) REFERENCES system_user_lab(system_user_lab_id) , CONSTRAINT fk_address_lab_4 FOREIGN KEY(last_updated_by) REFERENCES system_user_lab(system_user_lab_id)); -- Display the table organization. SET NULL '' COLUMN table_name FORMAT A16 COLUMN column_id FORMAT 9999 COLUMN column_name FORMAT A22 COLUMN data_type FORMAT A12 SELECT table_name , column_id , column_name , CASE WHEN nullable = 'N' THEN 'NOT NULL' ELSE '' END AS nullable , CASE WHEN data_type IN ('CHAR','VARCHAR2','NUMBER') THEN data_type||'('||data_length||')' ELSE data_type END AS data_type FROM user_tab_columns WHERE table_name = 'ADDRESS_LAB' ORDER BY 2; -- Display non-unique constraints. COLUMN constraint_name FORMAT A22 COLUMN search_condition FORMAT A36 COLUMN constraint_type FORMAT A1 SELECT uc.constraint_name , uc.search_condition , uc.constraint_type FROM user_constraints uc INNER JOIN user_cons_columns ucc ON uc.table_name = ucc.table_name AND uc.constraint_name = ucc.constraint_name WHERE uc.table_name = UPPER('address_lab') AND uc.constraint_type IN (UPPER('c'),UPPER('p')) ORDER BY uc.constraint_type DESC , uc.constraint_name; -- Display foreign key constraints. COL constraint_source FORMAT A38 HEADING "Constraint Name:| Table.Column" COL references_column FORMAT A40 HEADING "References:| Table.Column" SELECT uc.constraint_name||CHR(10) || '('||ucc1.table_name||'.'||ucc1.column_name||')' constraint_source , 'REFERENCES'||CHR(10) || '('||ucc2.table_name||'.'||ucc2.column_name||')' references_column FROM user_constraints uc , user_cons_columns ucc1 , user_cons_columns ucc2 WHERE uc.constraint_name = ucc1.constraint_name AND uc.r_constraint_name = ucc2.constraint_name AND ucc1.position = ucc2.position -- Correction for multiple column primary keys. AND uc.constraint_type = 'R' AND ucc1.table_name = 'ADDRESS_LAB' ORDER BY ucc1.table_name , uc.constraint_name; -- Create a non-unique index. CREATE INDEX address_lab_n1 ON address_lab(contact_lab_id); CREATE INDEX address_lab_n2 ON address_lab(address_lab_type); -- Display the non-unique index. COLUMN sequence_name FORMAT A22 HEADING "Sequence Name" COLUMN column_position FORMAT 999 HEADING "Column|Position" COLUMN column_name FORMAT A22 HEADING "Column|Name" SELECT ui.index_name , uic.column_position , uic.column_name FROM user_indexes ui INNER JOIN user_ind_columns uic ON ui.index_name = uic.index_name AND ui.table_name = uic.table_name WHERE ui.table_name = UPPER('address_lab') AND NOT ui.index_name IN (SELECT constraint_name FROM user_constraints) ORDER BY ui.index_name , uic.column_position; -- Create a sequence. CREATE SEQUENCE address_lab_s1 START WITH 1001 NOCACHE; -- Display sequence value. COLUMN sequence_name FORMAT A20 HEADING "Sequence Name" SELECT sequence_name FROM user_sequences WHERE sequence_name = UPPER('address_lab_s1'); -- ------------------------------------------------------------------ -- Create STREET_ADDRESS_LAB table and sequence. -- ------------------------------------------------------------------ -- Conditionally drop table and sequence. BEGIN FOR i IN (SELECT null FROM user_tables WHERE table_name = 'STREET_ADDRESS_LAB') LOOP EXECUTE IMMEDIATE 'DROP TABLE street_address_lab CASCADE CONSTRAINTS'; END LOOP; FOR i IN (SELECT null FROM user_sequences WHERE sequence_name = 'STREET_ADDRESS_LAB_S1') LOOP EXECUTE IMMEDIATE 'DROP SEQUENCE street_address_lab_s1'; END LOOP; END; / -- Create table. CREATE TABLE street_address_lab ( street_address_lab_id NUMBER , address_lab_id NUMBER CONSTRAINT nn_saddress_lab_1 NOT NULL , street_address_lab VARCHAR2(30) CONSTRAINT nn_saddress_lab_2 NOT NULL , created_by NUMBER CONSTRAINT nn_saddress_lab_3 NOT NULL , creation_date DATE CONSTRAINT nn_saddress_lab_4 NOT NULL , last_updated_by NUMBER CONSTRAINT nn_saddress_lab_5 NOT NULL , last_update_date DATE CONSTRAINT nn_saddress_lab_6 NOT NULL , CONSTRAINT pk_s_address_lab_1 PRIMARY KEY(street_address_lab_id) , CONSTRAINT fk_s_address_lab_1 FOREIGN KEY(address_lab_id) REFERENCES address_lab(address_lab_id) , CONSTRAINT fk_s_address_lab_3 FOREIGN KEY(created_by) REFERENCES system_user_lab(system_user_lab_id) , CONSTRAINT fk_s_address_lab_4 FOREIGN KEY(last_updated_by) REFERENCES system_user_lab(system_user_lab_id)); -- Display the table organization. SET NULL '' COLUMN table_name FORMAT A16 COLUMN column_id FORMAT 9999 COLUMN column_name FORMAT A22 COLUMN data_type FORMAT A12 SELECT table_name , column_id , column_name , CASE WHEN nullable = 'N' THEN 'NOT NULL' ELSE '' END AS nullable , CASE WHEN data_type IN ('CHAR','VARCHAR2','NUMBER') THEN data_type||'('||data_length||')' ELSE data_type END AS data_type FROM user_tab_columns WHERE table_name = 'STREET_ADDRESS_LAB' ORDER BY 2; -- Display non-unique constraints. COLUMN constraint_name FORMAT A22 COLUMN search_condition FORMAT A36 COLUMN constraint_type FORMAT A1 SELECT uc.constraint_name , uc.search_condition , uc.constraint_type FROM user_constraints uc INNER JOIN user_cons_columns ucc ON uc.table_name = ucc.table_name AND uc.constraint_name = ucc.constraint_name WHERE uc.table_name = UPPER('street_address_lab') AND uc.constraint_type IN (UPPER('c'),UPPER('p')) ORDER BY uc.constraint_type DESC , uc.constraint_name; -- Display foreign key constraints. COL constraint_source FORMAT A38 HEADING "Constraint Name:| Table.Column" COL references_column FORMAT A40 HEADING "References:| Table.Column" SELECT uc.constraint_name||CHR(10) || '('||ucc1.table_name||'.'||ucc1.column_name||')' constraint_source , 'REFERENCES'||CHR(10) || '('||ucc2.table_name||'.'||ucc2.column_name||')' references_column FROM user_constraints uc , user_cons_columns ucc1 , user_cons_columns ucc2 WHERE uc.constraint_name = ucc1.constraint_name AND uc.r_constraint_name = ucc2.constraint_name AND ucc1.position = ucc2.position -- Correction for multiple column primary keys. AND uc.constraint_type = 'R' AND ucc1.table_name = 'STREET_ADDRESS_LAB' ORDER BY ucc1.table_name , uc.constraint_name; -- Create sequence. CREATE SEQUENCE street_address_lab_s1 START WITH 1001 NOCACHE; -- Display sequence value. COLUMN sequence_name FORMAT A20 HEADING "Sequence Name" SELECT sequence_name FROM user_sequences WHERE sequence_name = UPPER('street_address_lab_s1'); -- ------------------------------------------------------------------ -- Create TELEPHONE_LAB table and sequence. -- ------------------------------------------------------------------ -- Conditionally drop table and sequence. BEGIN FOR i IN (SELECT null FROM user_tables WHERE table_name = 'TELEPHONE_LAB') LOOP EXECUTE IMMEDIATE 'DROP TABLE telephone_lab CASCADE CONSTRAINTS'; END LOOP; FOR i IN (SELECT null FROM user_sequences WHERE sequence_name = 'TELEPHONE_LAB_S1') LOOP EXECUTE IMMEDIATE 'DROP SEQUENCE telephone_lab_s1'; END LOOP; END; / -- Create table. CREATE TABLE telephone_lab ( telephone_lab_id NUMBER , contact_lab_id NUMBER CONSTRAINT nn_telephone_lab_1 NOT NULL , address_lab_id NUMBER , telephone_lab_type NUMBER CONSTRAINT nn_telephone_lab_2 NOT NULL , country_code VARCHAR2(3) CONSTRAINT nn_telephone_lab_3 NOT NULL , area_code VARCHAR2(6) CONSTRAINT nn_telephone_lab_4 NOT NULL , telephone_lab_number VARCHAR2(10) CONSTRAINT nn_telephone_lab_5 NOT NULL , created_by NUMBER CONSTRAINT nn_telephone_lab_6 NOT NULL , creation_date DATE CONSTRAINT nn_telephone_lab_7 NOT NULL , last_updated_by NUMBER CONSTRAINT nn_telephone_lab_8 NOT NULL , last_update_date DATE CONSTRAINT nn_telephone_lab_9 NOT NULL , CONSTRAINT pk_telephone_lab_1 PRIMARY KEY(telephone_lab_id) , CONSTRAINT fk_telephone_lab_1 FOREIGN KEY(contact_lab_id) REFERENCES contact_lab(contact_lab_id) , CONSTRAINT fk_telephone_lab_2 FOREIGN KEY(telephone_lab_type) REFERENCES common_lookup_lab(common_lookup_lab_id) , CONSTRAINT fk_telephone_lab_3 FOREIGN KEY(created_by) REFERENCES system_user_lab(system_user_lab_id) , CONSTRAINT fk_telephone_lab_4 FOREIGN KEY(last_updated_by) REFERENCES system_user_lab(system_user_lab_id)); -- Display the table organization. SET NULL '' COLUMN table_name FORMAT A16 COLUMN column_id FORMAT 9999 COLUMN column_name FORMAT A22 COLUMN data_type FORMAT A12 SELECT table_name , column_id , column_name , CASE WHEN nullable = 'N' THEN 'NOT NULL' ELSE '' END AS nullable , CASE WHEN data_type IN ('CHAR','VARCHAR2','NUMBER') THEN data_type||'('||data_length||')' ELSE data_type END AS data_type FROM user_tab_columns WHERE table_name = 'TELEPHONE_LAB' ORDER BY 2; -- Display non-unique constraints. COLUMN constraint_name FORMAT A22 COLUMN search_condition FORMAT A36 COLUMN constraint_type FORMAT A1 SELECT uc.constraint_name , uc.search_condition , uc.constraint_type FROM user_constraints uc INNER JOIN user_cons_columns ucc ON uc.table_name = ucc.table_name AND uc.constraint_name = ucc.constraint_name WHERE uc.table_name = UPPER('telephone_lab') AND uc.constraint_type IN (UPPER('c'),UPPER('p')) ORDER BY uc.constraint_type DESC , uc.constraint_name; -- Display foreign key constraints. COL constraint_source FORMAT A38 HEADING "Constraint Name:| Table.Column" COL references_column FORMAT A40 HEADING "References:| Table.Column" SELECT uc.constraint_name||CHR(10) || '('||ucc1.table_name||'.'||ucc1.column_name||')' constraint_source , 'REFERENCES'||CHR(10) || '('||ucc2.table_name||'.'||ucc2.column_name||')' references_column FROM user_constraints uc , user_cons_columns ucc1 , user_cons_columns ucc2 WHERE uc.constraint_name = ucc1.constraint_name AND uc.r_constraint_name = ucc2.constraint_name AND ucc1.position = ucc2.position -- Correction for multiple column primary keys. AND uc.constraint_type = 'R' AND ucc1.table_name = 'TELEPHONE_LAB' ORDER BY ucc1.table_name , uc.constraint_name; -- Create non-unique indexes. CREATE INDEX telephone_lab_n1 ON telephone_lab(contact_lab_id,address_lab_id); CREATE INDEX telephone_lab_n2 ON telephone_lab(address_lab_id); CREATE INDEX telephone_lab_n3 ON telephone_lab(telephone_lab_type); -- Display the non-unique index. COLUMN sequence_name FORMAT A22 HEADING "Sequence Name" COLUMN column_position FORMAT 999 HEADING "Column|Position" COLUMN column_name FORMAT A22 HEADING "Column|Name" SELECT ui.index_name , uic.column_position , uic.column_name FROM user_indexes ui INNER JOIN user_ind_columns uic ON ui.index_name = uic.index_name AND ui.table_name = uic.table_name WHERE ui.table_name = UPPER('telephone_lab') AND NOT ui.index_name IN (SELECT constraint_name FROM user_constraints) ORDER BY ui.index_name , uic.column_position; -- Create sequence. CREATE SEQUENCE telephone_lab_s1 START WITH 1001 NOCACHE; -- Display sequence value. COLUMN sequence_name FORMAT A20 HEADING "Sequence Name" SELECT sequence_name FROM user_sequences WHERE sequence_name = UPPER('telephone_lab_s1'); -- ------------------------------------------------------------------ -- Create RENTAL_LAB table and sequence. -- ------------------------------------------------------------------ -- Conditionally drop table and sequence. BEGIN FOR i IN (SELECT null FROM user_tables WHERE table_name = 'RENTAL_LAB') LOOP EXECUTE IMMEDIATE 'DROP TABLE rental_lab CASCADE CONSTRAINTS'; END LOOP; FOR i IN (SELECT null FROM user_sequences WHERE sequence_name = 'RENTAL_LAB_S1') LOOP EXECUTE IMMEDIATE 'DROP SEQUENCE rental_lab_s1'; END LOOP; END; / -- Create table. CREATE TABLE rental_lab ( rental_lab_id NUMBER , customer_id NUMBER CONSTRAINT nn_rental_lab_1 NOT NULL , check_out_date DATE CONSTRAINT nn_rental_lab_2 NOT NULL , return_date DATE CONSTRAINT nn_rental_lab_3 NOT NULL , created_by NUMBER CONSTRAINT nn_rental_lab_4 NOT NULL , creation_date DATE CONSTRAINT nn_rental_lab_5 NOT NULL , last_updated_by NUMBER CONSTRAINT nn_rental_lab_6 NOT NULL , last_update_date DATE CONSTRAINT nn_rental_lab_7 NOT NULL , CONSTRAINT pk_rental_lab_1 PRIMARY KEY(rental_lab_id) , CONSTRAINT fk_rental_lab_1 FOREIGN KEY(customer_id) REFERENCES contact_lab(contact_lab_id) , CONSTRAINT fk_rental_lab_2 FOREIGN KEY(created_by) REFERENCES system_user_lab(system_user_lab_id) , CONSTRAINT fk_rental_lab_3 FOREIGN KEY(last_updated_by) REFERENCES system_user_lab(system_user_lab_id)); -- Display the table organization. SET NULL '' COLUMN table_name FORMAT A16 COLUMN column_id FORMAT 9999 COLUMN column_name FORMAT A22 COLUMN data_type FORMAT A12 SELECT table_name , column_id , column_name , CASE WHEN nullable = 'N' THEN 'NOT NULL' ELSE '' END AS nullable , CASE WHEN data_type IN ('CHAR','VARCHAR2','NUMBER') THEN data_type||'('||data_length||')' ELSE data_type END AS data_type FROM user_tab_columns WHERE table_name = 'RENTAL_LAB' ORDER BY 2; -- Display non-unique constraints. COLUMN constraint_name FORMAT A22 COLUMN search_condition FORMAT A36 COLUMN constraint_type FORMAT A1 SELECT uc.constraint_name , uc.search_condition , uc.constraint_type FROM user_constraints uc INNER JOIN user_cons_columns ucc ON uc.table_name = ucc.table_name AND uc.constraint_name = ucc.constraint_name WHERE uc.table_name = UPPER('rental_lab') AND uc.constraint_type IN (UPPER('c'),UPPER('p')) ORDER BY uc.constraint_type DESC , uc.constraint_name; -- Display foreign key constraints. COL constraint_source FORMAT A38 HEADING "Constraint Name:| Table.Column" COL references_column FORMAT A40 HEADING "References:| Table.Column" SELECT uc.constraint_name||CHR(10) || '('||ucc1.table_name||'.'||ucc1.column_name||')' constraint_source , 'REFERENCES'||CHR(10) || '('||ucc2.table_name||'.'||ucc2.column_name||')' references_column FROM user_constraints uc , user_cons_columns ucc1 , user_cons_columns ucc2 WHERE uc.constraint_name = ucc1.constraint_name AND uc.r_constraint_name = ucc2.constraint_name AND ucc1.position = ucc2.position -- Correction for multiple column primary keys. AND uc.constraint_type = 'R' AND ucc1.table_name = 'RENTAL_LAB' ORDER BY ucc1.table_name , uc.constraint_name; -- Create a sequence. CREATE SEQUENCE rental_lab_s1 START WITH 1001 NOCACHE; -- Display sequence value. COLUMN sequence_name FORMAT A20 HEADING "Sequence Name" SELECT sequence_name FROM user_sequences WHERE sequence_name = UPPER('rental_lab_s1'); -- ------------------------------------------------------------------ -- Create ITEM_LAB table and sequence. -- ------------------------------------------------------------------ -- Conditionally drop objects. BEGIN FOR i IN (SELECT null FROM user_tables WHERE table_name = 'ITEM_LAB') LOOP EXECUTE IMMEDIATE 'DROP TABLE item_lab CASCADE CONSTRAINTS'; END LOOP; FOR i IN (SELECT null FROM user_sequences WHERE sequence_name = 'ITEM_LAB_S1') LOOP EXECUTE IMMEDIATE 'DROP SEQUENCE item_lab_s1'; END LOOP; END; / -- Create a table. CREATE TABLE item_lab ( item_lab_id NUMBER , item_lab_barcode VARCHAR2(14) CONSTRAINT nn_item_lab_1 NOT NULL , item_lab_type NUMBER CONSTRAINT nn_item_lab_2 NOT NULL , item_lab_title VARCHAR2(60) CONSTRAINT nn_item_lab_3 NOT NULL , item_lab_subtitle VARCHAR2(60) , item_lab_rating VARCHAR2(8) CONSTRAINT nn_item_lab_4 NOT NULL , item_lab_release_date DATE CONSTRAINT nn_item_lab_5 NOT NULL , created_by NUMBER CONSTRAINT nn_item_lab_6 NOT NULL , creation_date DATE CONSTRAINT nn_item_lab_7 NOT NULL , last_updated_by NUMBER CONSTRAINT nn_item_lab_8 NOT NULL , last_update_date DATE CONSTRAINT nn_item_lab_9 NOT NULL , CONSTRAINT pk_item_lab_1 PRIMARY KEY(item_lab_id) , CONSTRAINT fk_item_lab_1 FOREIGN KEY(item_lab_type) REFERENCES common_lookup_lab(common_lookup_lab_id) , CONSTRAINT fk_item_lab_2 FOREIGN KEY(created_by) REFERENCES system_user_lab(system_user_lab_id) , CONSTRAINT fk_item_lab_3 FOREIGN KEY(last_updated_by) REFERENCES system_user_lab(system_user_lab_id)); -- Display the table organization. SET NULL '' COLUMN table_name FORMAT A16 COLUMN column_id FORMAT 9999 COLUMN column_name FORMAT A22 COLUMN data_type FORMAT A12 SELECT table_name , column_id , column_name , CASE WHEN nullable = 'N' THEN 'NOT NULL' ELSE '' END AS nullable , CASE WHEN data_type IN ('CHAR','VARCHAR2','NUMBER') THEN data_type||'('||data_length||')' ELSE data_type END AS data_type FROM user_tab_columns WHERE table_name = 'ITEM_LAB' ORDER BY 2; -- Display non-unique constraints. COLUMN constraint_name FORMAT A22 COLUMN search_condition FORMAT A36 COLUMN constraint_type FORMAT A1 SELECT uc.constraint_name , uc.search_condition , uc.constraint_type FROM user_constraints uc INNER JOIN user_cons_columns ucc ON uc.table_name = ucc.table_name AND uc.constraint_name = ucc.constraint_name WHERE uc.table_name = UPPER('item_lab') AND uc.constraint_type IN (UPPER('c'),UPPER('p')) ORDER BY uc.constraint_type DESC , uc.constraint_name; -- Display foreign key constraints. COL constraint_source FORMAT A38 HEADING "Constraint Name:| Table.Column" COL references_column FORMAT A40 HEADING "References:| Table.Column" SELECT uc.constraint_name||CHR(10) || '('||ucc1.table_name||'.'||ucc1.column_name||')' constraint_source , 'REFERENCES'||CHR(10) || '('||ucc2.table_name||'.'||ucc2.column_name||')' references_column FROM user_constraints uc , user_cons_columns ucc1 , user_cons_columns ucc2 WHERE uc.constraint_name = ucc1.constraint_name AND uc.r_constraint_name = ucc2.constraint_name AND ucc1.position = ucc2.position -- Correction for multiple column primary keys. AND uc.constraint_type = 'R' AND ucc1.table_name = 'ITEM_LAB' ORDER BY ucc1.table_name , uc.constraint_name; -- Create a sequence. CREATE SEQUENCE item_lab_s1 START WITH 1001 NOCACHE; -- Display sequence value. COLUMN sequence_name FORMAT A20 HEADING "Sequence Name" SELECT sequence_name FROM user_sequences WHERE sequence_name = UPPER('item_lab_s1'); -- ------------------------------------------------------------------ -- Create RENTAL_ITEM_LAB table and sequence. -- ------------------------------------------------------------------ -- Conditionally drop table and sequence. BEGIN FOR i IN (SELECT null FROM user_tables WHERE table_name = 'RENTAL_ITEM_LAB') LOOP EXECUTE IMMEDIATE 'DROP TABLE rental_item_lab CASCADE CONSTRAINTS'; END LOOP; FOR i IN (SELECT null FROM user_sequences WHERE sequence_name = 'RENTAL_ITEM_LAB_S1') LOOP EXECUTE IMMEDIATE 'DROP SEQUENCE rental_item_lab_s1'; END LOOP; END; / -- Create table. CREATE TABLE rental_item_lab ( rental_item_lab_id NUMBER , rental_lab_id NUMBER CONSTRAINT nn_rental_item_lab_1 NOT NULL , item_lab_id NUMBER CONSTRAINT nn_rental_item_lab_2 NOT NULL , created_by NUMBER CONSTRAINT nn_rental_item_lab_3 NOT NULL , creation_date DATE CONSTRAINT nn_rental_item_lab_4 NOT NULL , last_updated_by NUMBER CONSTRAINT nn_rental_item_lab_5 NOT NULL , last_update_date DATE CONSTRAINT nn_rental_item_lab_6 NOT NULL , CONSTRAINT pk_rental_item_lab_1 PRIMARY KEY(rental_item_lab_id) , CONSTRAINT fk_rental_item_lab_1 FOREIGN KEY(rental_lab_id) REFERENCES rental_lab(rental_lab_id) , CONSTRAINT fk_rental_item_lab_2 FOREIGN KEY(item_lab_id) REFERENCES item_lab(item_lab_id) , CONSTRAINT fk_rental_item_lab_3 FOREIGN KEY(created_by) REFERENCES system_user_lab(system_user_lab_id) , CONSTRAINT fk_rental_item_lab_4 FOREIGN KEY(last_updated_by) REFERENCES system_user_lab(system_user_lab_id)); -- Display the table organization. SET NULL '' COLUMN table_name FORMAT A16 COLUMN column_id FORMAT 9999 COLUMN column_name FORMAT A22 COLUMN data_type FORMAT A12 SELECT table_name , column_id , column_name , CASE WHEN nullable = 'N' THEN 'NOT NULL' ELSE '' END AS nullable , CASE WHEN data_type IN ('CHAR','VARCHAR2','NUMBER') THEN data_type||'('||data_length||')' ELSE data_type END AS data_type FROM user_tab_columns WHERE table_name = 'RENTAL_ITEM_LAB' ORDER BY 2; -- Display non-unique constraints. COLUMN constraint_name FORMAT A22 COLUMN search_condition FORMAT A36 COLUMN constraint_type FORMAT A1 SELECT uc.constraint_name , uc.search_condition , uc.constraint_type FROM user_constraints uc INNER JOIN user_cons_columns ucc ON uc.table_name = ucc.table_name AND uc.constraint_name = ucc.constraint_name WHERE uc.table_name = UPPER('rental_item_lab') AND uc.constraint_type IN (UPPER('c'),UPPER('p')) ORDER BY uc.constraint_type DESC , uc.constraint_name; -- Display foreign key constraints. COL constraint_source FORMAT A38 HEADING "Constraint Name:| Table.Column" COL references_column FORMAT A40 HEADING "References:| Table.Column" SELECT uc.constraint_name||CHR(10) || '('||ucc1.table_name||'.'||ucc1.column_name||')' constraint_source , 'REFERENCES'||CHR(10) || '('||ucc2.table_name||'.'||ucc2.column_name||')' references_column FROM user_constraints uc , user_cons_columns ucc1 , user_cons_columns ucc2 WHERE uc.constraint_name = ucc1.constraint_name AND uc.r_constraint_name = ucc2.constraint_name AND ucc1.position = ucc2.position -- Correction for multiple column primary keys. AND uc.constraint_type = 'R' AND ucc1.table_name = 'RENTAL_LAB_ITEM_LAB' ORDER BY ucc1.table_name , uc.constraint_name; -- Create a sequence. CREATE SEQUENCE rental_item_lab_s1 START WITH 1001 NOCACHE; -- Display sequence value. COLUMN sequence_name FORMAT A20 HEADING "Sequence Name" SELECT sequence_name FROM user_sequences WHERE sequence_name = UPPER('rental_item_lab_s1'); -- CONFIRMATION DETAIL TABLES COLUMN table_name_base FORMAT A30 HEADING "Base Tables" COLUMN table_name_lab FORMAT A30 HEADING "Lab Tables" SELECT a.table_name_base , b.table_name_lab FROM (SELECT table_name AS table_name_base FROM user_tables WHERE table_name IN ('SYSTEM_USER' ,'COMMON_LOOKUP' ,'MEMBER' ,'CONTACT' ,'ADDRESS' ,'STREET_ADDRESS' ,'TELEPHONE' ,'ITEM' ,'RENTAL' ,'RENTAL_ITEM')) a INNER JOIN (SELECT table_name AS table_name_lab FROM user_tables WHERE table_name IN ('SYSTEM_USER_LAB' ,'COMMON_LOOKUP_LAB' ,'MEMBER_LAB' ,'CONTACT_LAB' ,'ADDRESS_LAB' ,'STREET_ADDRESS_LAB' ,'TELEPHONE_LAB' ,'ITEM_LAB' ,'RENTAL_LAB' ,'RENTAL_ITEM_LAB')) b ON a.table_name_base = SUBSTR( b.table_name_lab, 1, REGEXP_INSTR(table_name_lab,'_LAB') - 1) ORDER BY CASE WHEN table_name_base LIKE 'SYSTEM_USER%' THEN 0 WHEN table_name_base LIKE 'COMMON_LOOKUP%' THEN 1 WHEN table_name_base LIKE 'MEMBER%' THEN 2 WHEN table_name_base LIKE 'CONTACT%' THEN 3 WHEN table_name_base LIKE 'ADDRESS%' THEN 4 WHEN table_name_base LIKE 'STREET_ADDRESS%' THEN 5 WHEN table_name_base LIKE 'TELEPHONE%' THEN 6 WHEN table_name_base LIKE 'ITEM%' THEN 7 WHEN table_name_base LIKE 'RENTAL%' AND NOT table_name_base LIKE 'RENTAL_ITEM%' THEN 8 WHEN table_name_base LIKE 'RENTAL_ITEM%' THEN 9 END; -- CONFIRMATION DETAILS SEQUENCES COLUMN sequence_name_base FORMAT A30 HEADING "Base Sequences" COLUMN sequence_name_lab FORMAT A30 HEADING "Lab Sequences" SELECT a.sequence_name_base , b.sequence_name_lab FROM (SELECT sequence_name AS sequence_name_base FROM user_sequences WHERE sequence_name IN ('SYSTEM_USER_S1' ,'COMMON_LOOKUP_S1' ,'MEMBER_S1' ,'CONTACT_S1' ,'ADDRESS_S1' ,'STREET_ADDRESS_S1' ,'TELEPHONE_S1' ,'ITEM_S1' ,'RENTAL_S1' ,'RENTAL_ITEM_S1')) a INNER JOIN (SELECT sequence_name AS sequence_name_lab FROM user_sequences WHERE sequence_name IN ('SYSTEM_USER_LAB_S1' ,'COMMON_LOOKUP_LAB_S1' ,'MEMBER_LAB_S1' ,'CONTACT_LAB_S1' ,'ADDRESS_LAB_S1' ,'STREET_ADDRESS_LAB_S1' ,'TELEPHONE_LAB_S1' ,'ITEM_LAB_S1' ,'RENTAL_LAB_S1' ,'RENTAL_ITEM_LAB_S1')) b ON SUBSTR(a.sequence_name_base, 1, REGEXP_INSTR(a.sequence_name_base,'_S1') - 1) = SUBSTR( b.sequence_name_lab, 1, REGEXP_INSTR(b.sequence_name_lab,'_LAB_S1') - 1) ORDER BY CASE WHEN sequence_name_base LIKE 'SYSTEM_USER%' THEN 0 WHEN sequence_name_base LIKE 'COMMON_LOOKUP%' THEN 1 WHEN sequence_name_base LIKE 'MEMBER%' THEN 2 WHEN sequence_name_base LIKE 'CONTACT%' THEN 3 WHEN sequence_name_base LIKE 'ADDRESS%' THEN 4 WHEN sequence_name_base LIKE 'STREET_ADDRESS%' THEN 5 WHEN sequence_name_base LIKE 'TELEPHONE%' THEN 6 WHEN sequence_name_base LIKE 'ITEM%' THEN 7 WHEN sequence_name_base LIKE 'RENTAL%' AND NOT sequence_name_base LIKE 'RENTAL_ITEM%' THEN 8 WHEN sequence_name_base LIKE 'RENTAL_ITEM%' THEN 9 END; -- Close log file. SPOOL OFF
true
51afcdfa91709e377bca04043bcdeec4418b7573
SQL
AlifJamain/kindergarten-result-system
/tadika.sql
UTF-8
13,360
2.90625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 24, 2019 at 09:55 PM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.3.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `tadika` -- -- -------------------------------------------------------- -- -- Table structure for table `tblgabung` -- CREATE TABLE `tblgabung` ( `id` int(255) NOT NULL, `id_kelas` int(255) NOT NULL, `id_subjek` int(255) NOT NULL, `status` int(1) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `tblgabung` -- INSERT INTO `tblgabung` (`id`, `id_kelas`, `id_subjek`, `status`) VALUES (1, 1, 1, 1), (2, 1, 2, 1), (3, 1, 3, 1), (4, 1, 4, 1), (5, 1, 5, 1), (6, 1, 6, 1), (7, 1, 7, 1), (8, 1, 8, 1), (9, 1, 9, 1), (10, 1, 10, 1), (11, 1, 11, 1), (12, 1, 12, 1), (13, 1, 13, 1), (14, 1, 14, 1), (15, 1, 15, 1), (16, 2, 1, 1), (17, 2, 2, 1), (18, 2, 3, 1), (19, 2, 4, 1), (20, 2, 5, 1), (21, 2, 6, 1), (22, 2, 7, 1), (23, 2, 8, 1), (24, 2, 9, 1), (25, 2, 10, 1), (26, 2, 11, 1), (27, 2, 12, 1), (28, 2, 13, 1), (29, 2, 14, 1), (30, 2, 15, 1); -- -------------------------------------------------------- -- -- Table structure for table `tblgabung2` -- CREATE TABLE `tblgabung2` ( `id` int(255) NOT NULL, `id_kelas` int(255) NOT NULL, `id_psikomotor` int(255) NOT NULL, `status` int(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `tblgabung2` -- INSERT INTO `tblgabung2` (`id`, `id_kelas`, `id_psikomotor`, `status`) VALUES (1, 1, 1, 1), (2, 1, 2, 1), (3, 1, 3, 1), (4, 1, 4, 1), (5, 1, 5, 1), (6, 2, 1, 1), (7, 2, 2, 1), (8, 2, 3, 1), (9, 2, 4, 1), (10, 2, 5, 1); -- -------------------------------------------------------- -- -- Table structure for table `tblgabung3` -- CREATE TABLE `tblgabung3` ( `id` int(255) NOT NULL, `id_kelas` int(255) NOT NULL, `id_sosial` int(255) NOT NULL, `status` int(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `tblgabung3` -- INSERT INTO `tblgabung3` (`id`, `id_kelas`, `id_sosial`, `status`) VALUES (1, 1, 1, 1), (2, 1, 2, 1), (3, 1, 3, 1), (4, 1, 4, 1), (5, 1, 5, 1), (6, 2, 1, 1), (7, 2, 2, 1), (8, 2, 3, 1), (9, 2, 4, 1), (10, 2, 5, 1); -- -------------------------------------------------------- -- -- Table structure for table `tblguru` -- CREATE TABLE `tblguru` ( `id_guru` int(255) NOT NULL, `emel_guru` varchar(255) NOT NULL, `katalaluan_guru` varchar(255) NOT NULL, `nama_guru` varchar(255) NOT NULL, `kp_guru` varchar(255) NOT NULL, `tarikh_lahir_guru` varchar(255) NOT NULL, `status_perkahwinan` varchar(255) NOT NULL, `alamat_guru` varchar(255) NOT NULL, `tahap_pendidikan` varchar(255) NOT NULL, `tarikh_mula_bekerja` varchar(255) NOT NULL, `nama_bank` varchar(255) NOT NULL, `no_acc_bank` varchar(255) NOT NULL, `nama_waris` varchar(255) NOT NULL, `hubungan_waris` varchar(255) NOT NULL, `no_tel_waris` varchar(255) NOT NULL, `alamat_waris` varchar(255) NOT NULL, `status` int(1) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `tblguru` -- INSERT INTO `tblguru` (`id_guru`, `emel_guru`, `katalaluan_guru`, `nama_guru`, `kp_guru`, `tarikh_lahir_guru`, `status_perkahwinan`, `alamat_guru`, `tahap_pendidikan`, `tarikh_mula_bekerja`, `nama_bank`, `no_acc_bank`, `nama_waris`, `hubungan_waris`, `no_tel_waris`, `alamat_waris`, `status`) VALUES (1, 'alifjamain@gmail.com', 'alifjamain', 'alifjamain', '', '', '', '', '', '', '', '', '', '', '', '', 1), (2, 'aaa', 'aaa', 'aaa', '', '', '', '', '', '', '', '', '', '', '', '', 1); -- -------------------------------------------------------- -- -- Table structure for table `tblkelas` -- CREATE TABLE `tblkelas` ( `id` int(255) NOT NULL, `nama_kelas` varchar(255) NOT NULL, `empid` int(1) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `tblkelas` -- INSERT INTO `tblkelas` (`id`, `nama_kelas`, `empid`) VALUES (1, '5 Pelangi', 1), (2, '6 Pelangi', 2); -- -------------------------------------------------------- -- -- Table structure for table `tblkeputusan` -- CREATE TABLE `tblkeputusan` ( `id` int(255) NOT NULL, `id_pelajar` int(255) DEFAULT NULL, `id_kelas` int(255) DEFAULT NULL, `id_subjek` int(255) DEFAULT NULL, `marks` int(255) NOT NULL, `empid` int(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `tblkeputusan2` -- CREATE TABLE `tblkeputusan2` ( `id` int(255) NOT NULL, `id_pelajar` int(255) NOT NULL, `id_kelas` int(255) NOT NULL, `id_psikomotor` int(255) NOT NULL, `marks` varchar(255) NOT NULL, `empid` int(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `tblkeputusan2` -- INSERT INTO `tblkeputusan2` (`id`, `id_pelajar`, `id_kelas`, `id_psikomotor`, `marks`, `empid`) VALUES (1, 1, 1, 1, '80', 1), (2, 1, 1, 2, '90', 1), (3, 1, 1, 5, '100', 1), (4, 1, 1, 3, '30', 1), (5, 1, 1, 4, '60', 1); -- -------------------------------------------------------- -- -- Table structure for table `tblkeputusan3` -- CREATE TABLE `tblkeputusan3` ( `id` int(255) NOT NULL, `id_pelajar` int(255) NOT NULL, `id_kelas` int(255) NOT NULL, `id_sosial` int(255) NOT NULL, `marks` int(255) NOT NULL, `empid` int(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `tblkeputusan3` -- INSERT INTO `tblkeputusan3` (`id`, `id_pelajar`, `id_kelas`, `id_sosial`, `marks`, `empid`) VALUES (1, 1, 1, 5, 50, 1), (2, 1, 1, 4, 50, 1), (3, 1, 1, 3, 50, 1), (4, 1, 1, 2, 50, 1), (5, 1, 1, 1, 70, 1); -- -------------------------------------------------------- -- -- Table structure for table `tblnotifikasi` -- CREATE TABLE `tblnotifikasi` ( `id_notifikasi` int(255) NOT NULL, `nama_notifikasi` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `tblnotifikasi` -- INSERT INTO `tblnotifikasi` (`id_notifikasi`, `nama_notifikasi`) VALUES (1, 'tiada perjumpaan'); -- -------------------------------------------------------- -- -- Table structure for table `tblpelajar` -- CREATE TABLE `tblpelajar` ( `id_pelajar` int(255) NOT NULL, `nama_pelajar` varchar(255) NOT NULL, `mykid_pelajar` varchar(255) NOT NULL, `tarikh_lahir_pelajar` varchar(255) NOT NULL, `tarikh_daftar_tadika` varchar(255) NOT NULL, `id_kelas` int(255) NOT NULL, `jantina_pelajar` varchar(255) NOT NULL, `alamat_pelajar` varchar(255) NOT NULL, `nama_penjaga` varchar(255) NOT NULL, `hubungan_penjaga` varchar(255) NOT NULL, `no_tel_penjaga` varchar(255) NOT NULL, `alamat_penjaga` varchar(255) NOT NULL, `empid` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `tblpelajar` -- INSERT INTO `tblpelajar` (`id_pelajar`, `nama_pelajar`, `mykid_pelajar`, `tarikh_lahir_pelajar`, `tarikh_daftar_tadika`, `id_kelas`, `jantina_pelajar`, `alamat_pelajar`, `nama_penjaga`, `hubungan_penjaga`, `no_tel_penjaga`, `alamat_penjaga`, `empid`) VALUES (1, 'Muhammad Alif Fariq Bin Jamain', '961213235085', '13/12/1996', '13/12/1996', 1, 'Lelaki', 'No. 24, Jalan Universiti 17, Taman Universiti, 86400. Parit Raja, Johor', 'Jamain Bin Saikon', 'Bapa', '0137754323', 'C18, Jalan Kiambang, Kampung Rahmat, 81030, Kulai, Johor', 1), (2, 'aaa', 'aaa', 'aaa', 'aaa', 2, 'aaa', 'aaa', 'aaa', 'Ibu', 'aaa', 'aaa', 2); -- -------------------------------------------------------- -- -- Table structure for table `tblpentadbir` -- CREATE TABLE `tblpentadbir` ( `id_pentadbir` int(255) NOT NULL, `emel_pentadbir` varchar(255) NOT NULL, `katalaluan_pentadbir` varchar(255) NOT NULL, `nama_pentadbir` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `tblpentadbir` -- INSERT INTO `tblpentadbir` (`id_pentadbir`, `emel_pentadbir`, `katalaluan_pentadbir`, `nama_pentadbir`) VALUES (1, 'admin', 'admin', 'admin'); -- -------------------------------------------------------- -- -- Table structure for table `tblpsikomotor` -- CREATE TABLE `tblpsikomotor` ( `id` int(255) NOT NULL, `nama_psikomotor` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `tblpsikomotor` -- INSERT INTO `tblpsikomotor` (`id`, `nama_psikomotor`) VALUES (1, 'Kemahiran Kenal Anggota Badan'), (2, 'Kemahiran Kenal Jari Tangan\r\n'), (3, 'Kemahiran Seimbang Badan\r\n'), (4, 'Senaman'), (5, 'Kemahiran Merentasi Halangan'); -- -------------------------------------------------------- -- -- Table structure for table `tblsosial` -- CREATE TABLE `tblsosial` ( `id` int(255) NOT NULL, `nama_sosial` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `tblsosial` -- INSERT INTO `tblsosial` (`id`, `nama_sosial`) VALUES (1, 'Kemahiran Pergaulan\r\n'), (2, 'Kemahiran Mengawal Emosi\r\n'), (3, 'Kemahiran Mematuhi Peraturan\r\n'), (4, 'Kemahiran Kepimpinan\r\n'), (5, 'Aktiviti Kebudayaan\r\n'); -- -------------------------------------------------------- -- -- Table structure for table `tblsubjek` -- CREATE TABLE `tblsubjek` ( `id` int(255) NOT NULL, `nama_subjek` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `tblsubjek` -- INSERT INTO `tblsubjek` (`id`, `nama_subjek`) VALUES (1, 'Bahasa Melayu'), (2, 'Bahasa Inggeris'), (3, 'Matematik'), (4, 'Sains'), (5, 'Pendidikan Islam'); -- -- Indexes for dumped tables -- -- -- Indexes for table `tblgabung` -- ALTER TABLE `tblgabung` ADD PRIMARY KEY (`id`); -- -- Indexes for table `tblgabung2` -- ALTER TABLE `tblgabung2` ADD PRIMARY KEY (`id`); -- -- Indexes for table `tblgabung3` -- ALTER TABLE `tblgabung3` ADD PRIMARY KEY (`id`); -- -- Indexes for table `tblguru` -- ALTER TABLE `tblguru` ADD PRIMARY KEY (`id_guru`); -- -- Indexes for table `tblkelas` -- ALTER TABLE `tblkelas` ADD PRIMARY KEY (`id`); -- -- Indexes for table `tblkeputusan` -- ALTER TABLE `tblkeputusan` ADD PRIMARY KEY (`id`); -- -- Indexes for table `tblkeputusan2` -- ALTER TABLE `tblkeputusan2` ADD PRIMARY KEY (`id`); -- -- Indexes for table `tblkeputusan3` -- ALTER TABLE `tblkeputusan3` ADD PRIMARY KEY (`id`); -- -- Indexes for table `tblnotifikasi` -- ALTER TABLE `tblnotifikasi` ADD PRIMARY KEY (`id_notifikasi`); -- -- Indexes for table `tblpelajar` -- ALTER TABLE `tblpelajar` ADD PRIMARY KEY (`id_pelajar`); -- -- Indexes for table `tblpentadbir` -- ALTER TABLE `tblpentadbir` ADD PRIMARY KEY (`id_pentadbir`); -- -- Indexes for table `tblpsikomotor` -- ALTER TABLE `tblpsikomotor` ADD PRIMARY KEY (`id`); -- -- Indexes for table `tblsosial` -- ALTER TABLE `tblsosial` ADD PRIMARY KEY (`id`); -- -- Indexes for table `tblsubjek` -- ALTER TABLE `tblsubjek` ADD PRIMARY KEY (`id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `tblgabung` -- ALTER TABLE `tblgabung` MODIFY `id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=31; -- -- AUTO_INCREMENT for table `tblgabung2` -- ALTER TABLE `tblgabung2` MODIFY `id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11; -- -- AUTO_INCREMENT for table `tblgabung3` -- ALTER TABLE `tblgabung3` MODIFY `id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11; -- -- AUTO_INCREMENT for table `tblguru` -- ALTER TABLE `tblguru` MODIFY `id_guru` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `tblkelas` -- ALTER TABLE `tblkelas` MODIFY `id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `tblkeputusan` -- ALTER TABLE `tblkeputusan` MODIFY `id` int(255) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `tblkeputusan2` -- ALTER TABLE `tblkeputusan2` MODIFY `id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- AUTO_INCREMENT for table `tblkeputusan3` -- ALTER TABLE `tblkeputusan3` MODIFY `id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- AUTO_INCREMENT for table `tblnotifikasi` -- ALTER TABLE `tblnotifikasi` MODIFY `id_notifikasi` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `tblpelajar` -- ALTER TABLE `tblpelajar` MODIFY `id_pelajar` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `tblpentadbir` -- ALTER TABLE `tblpentadbir` MODIFY `id_pentadbir` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `tblpsikomotor` -- ALTER TABLE `tblpsikomotor` MODIFY `id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- AUTO_INCREMENT for table `tblsosial` -- ALTER TABLE `tblsosial` MODIFY `id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- AUTO_INCREMENT for table `tblsubjek` -- ALTER TABLE `tblsubjek` MODIFY `id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16; COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
true
ea639ea0c1061ce5160ffa688b464446f85dd766
SQL
DrewTbay/Exercise_DB
/Tables/exercise.sql
UTF-8
13,264
3.03125
3
[]
no_license
\c exercise_db; DROP TABLE IF EXISTS exercises CASCADE; DROP SEQUENCE IF EXISTS exercise_id_seq CASCADE; -- Sequence: exercise_id_seq CREATE SEQUENCE exercise_id_seq INCREMENT 1 MINVALUE 1 MAXVALUE 9223372036854775807 START 1; -- Table: exercises CREATE TABLE exercises ( exercise_id integer NOT NULL DEFAULT nextval('exercise_id_seq'::regclass), exercise_name text NOT NULL, exercise_description text NOT NULL, CONSTRAINT exercise_pkey PRIMARY KEY (exercise_id) ); GRANT SELECT (exercise_name, exercise_description) ON exercises TO exercise_conn; --Total Synergistics INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Push-up/Side Arm Balance', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Crescent Chair', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Pull Knee Pull', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Flip Flop Crunch', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Crawly Plyo Push-ups', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Releve-Plie, Weighted', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Chin-up Circle Crunch', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Boat Plow', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Balance Arch Press', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('3 Hop Press', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Glammour Hammer', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Brandon Boat', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Flying Warrior', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Squat Rockers', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Side Rise Punch', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Warrior Squat Moon', 'Fill in later'); --Agility X INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Agility X routine', 'Fill in later'); --The Challenge INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Standard Pull-ups', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Standard Push-ups', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Chin-up', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Military Push-ups', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Close Grip Pull-ups', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Wide Push-ups', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Vaulter Pull-ups', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Staggered Push-ups', 'Fill in later'); --X3 Yoga INSERT INTO exercises (exercise_name, exercise_description) VALUES ('X3 Yoga routine', 'Fill in later'); --CVX INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Press Jacks', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Atlas Twist', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('March and Reach', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Traveling Tire Twist', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Frog Squat Reach', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Arc Press Reach', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Hop Overs', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Balance Pull', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Twist and Pviot', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Side Lunge Jumps Shot', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Globe Squatters', 'Fill in later'); --The Warrior INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Plank-Sphinx Push-ups', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Speed Skater', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Down Dog Crunches', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Elevator Push-ups', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Double Uppercut, Sprawls', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Roller Boat', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('One Leg Jump Squats', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Thumbs-up Push-up', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Elbow, Over The Top Elbow, Sprawl', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Fifer Scissor Twist', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Warrior Squat Lunges', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Super Burpee', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Think Drills', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Abrinome', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Spiderman Squats', 'Fill in later'); --Isometrix INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Isometrix routine', 'Fill in later'); --Dynamix INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Dynamix routine', 'Fill in later'); --Accelerator INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Accelerator routine', 'Fill in later'); --Pilates X INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Pilates routine', 'Fill in later'); --Incinerator INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Renegade Row', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Floor Flys', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Rocket Launcher Row', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('"A" Press', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Monkey Pump', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Pike Press', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Pterodactyl Flys', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Flipper', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Popeye Hammer Curls', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Kneeler Curls', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Hail to The Chief', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Skyfers', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Arm and Hammer', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Rocket Launcher Kickback', 'Fill in later'); --Triometrics INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Triometrics routine', 'Fill in later'); --MMX INSERT INTO exercises (exercise_name, exercise_description) VALUES ('MMX routine', 'Fill in later'); --Eccentric Upper INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Military Press', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Deep Swimmer''s Press', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('V Pull-ups', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Upright Hammer Pull', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Later/Anterior Raise', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Plyo Push-ups', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Flip Flop Combo', 'Fill in later'); --Eccentric Lower INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Squats', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Lunge', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Sumo', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Weighted Pistol', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Side Kicks', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Front Kicks', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Albanian Squat', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Adductor Lunge', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Cross Reach', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('TT Plus', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Bridge Kicks', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Hip Flexor Splits', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Calf Dog', 'Fill in later'); --Decelerator INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Bounding Squats', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Crane Cracker Push-ups', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Good God Squats', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Elevator Pull-ups', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('2-Pop Hop', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Holmsen Screamer Hold', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Chin Pulls', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Joel Jump', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Starfish Push-ups', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Duper 2', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Elevator Tiptoe Squats', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Superman/Bow', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Spinning Plyo Squat Lunges', 'Fill in later'); --Cold Start INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Cold Start routine', 'Fill in later'); --Complex Upper INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Slow-mo Chin-ups', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Lunge Thrust Press', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('W Pull-ups', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Push-up Bird Dog Crunch', 'Fill in later'); --Complex Lower INSERT INTO exercises (exercise_name, exercise_description) VALUES ('DS Double L', 'Fill in later'); INSERT INTO exercises (exercise_name, exercise_description) VALUES ('The Stabilizer', 'Fill in later'); --X3 Ab Ripper INSERT INTO exercises (exercise_name, exercise_description) VALUES ('X3 Ab Ripper routine', 'Fill in later'); --Rest Days INSERT INTO exercises (exercise_name, exercise_description) VALUES ('Rest', 'Fill in later');
true
1239454950f4dc84dacea047e90b590a9d40b45e
SQL
Komalpreet05/database
/query2.sql
UTF-8
281
4
4
[]
no_license
-- shows the customer that saw the most expencive menu SELECT sub.ClientName, MAX(sub.MenuPrice) AS 'Price of menu' FROM ( SELECT a.ClientName, SUM(o.price) AS 'MenuPrice' FROM customersMenuName AS a, dishes AS o WHERE a.menu_code = o.menu_code GROUP BY a.Client_id ) AS sub
true
d8de7d0a474135a46e6d6275caec9c9a2ad06c11
SQL
ramsreeram/Books
/PT/antognini_pt_scripts/chapter06/subquery_coalescing.sql
UTF-8
2,102
3.453125
3
[]
no_license
SET ECHO OFF REM *************************************************************************** REM ******************* Troubleshooting Oracle Performance ******************** REM ************************* http://top.antognini.ch ************************* REM *************************************************************************** REM REM File name...: subquery_coalescing.sql REM Author......: Christian Antognini REM Date........: February 2013 REM Description.: This script provides examples of the "subquery coalescing" REM query transformation. REM Notes.......: - REM Parameters..: - REM REM You can send feedbacks or questions about this script to top@antognini.ch. REM REM Changes: REM DD.MM.YYYY Description REM --------------------------------------------------------------------------- REM REM *************************************************************************** SET TERMOUT ON FEEDBACK OFF @../connect.sql SET ECHO ON DROP TABLE t1 CASCADE CONSTRAINTS PURGE; DROP TABLE t2 CASCADE CONSTRAINTS PURGE; CREATE TABLE t1 ( id NUMBER PRIMARY KEY, n NUMBER NULL, pad VARCHAR2(100) NULL ); CREATE TABLE t2 ( id NUMBER PRIMARY KEY, t1_id NUMBER REFERENCES t1 (id), n NUMBER NULL, pad VARCHAR2(100) NULL ); ALTER SESSION SET tracefile_identifier = 'subquery_coalescing'; ALTER SESSION SET events '10053 trace name context forever'; EXPLAIN PLAN FOR SELECT * FROM t1 WHERE EXISTS (SELECT 1 FROM t2 WHERE t2.n > 10 AND t2.id = t1.id) OR EXISTS (SELECT 1 FROM t2 WHERE t2.n < 100 AND t2.id = t1.id); ALTER SESSION SET events '10053 trace name context off'; SELECT * FROM table(dbms_xplan.display(NULL, NULL, 'basic predicate')); ALTER SESSION SET events '10053 trace name context forever'; EXPLAIN PLAN FOR SELECT /*+ no_coalesce_sq(@sq1) no_coalesce_sq(@sq2) */ * FROM t1 WHERE EXISTS (SELECT /*+ qb_name(sq1) */ 1 FROM t2 WHERE t2.n > 10 AND t2.id = t1.id) OR EXISTS (SELECT /*+ qb_name(sq2) */ 1 FROM t2 WHERE t2.n < 100 AND t2.id = t1.id); ALTER SESSION SET events '10053 trace name context off'; SELECT * FROM table(dbms_xplan.display(NULL, NULL, 'basic predicate'));
true
4fe7154177ee41228c64dc9800cebf20b2400918
SQL
hyh-sherry/sql-homework
/sql_files/query.sql
UTF-8
2,470
4.5
4
[]
no_license
--1. List the following details of each employee: --employee number, last name, first name, gender, and salary. select e.emp_no, e.last_name, e.first_name, e.gender, s.salary from employees e join salaries s on e.emp_no = s.emp_no; --2. List employees who were hired in 1986. select * from employees where extract(year from hire_date) = 1986; --3. List the manager of each department with the following information: -- department number, department name, the manager's employee number, last name, -- first name, and start and end employment dates. select d.dept_no, d.dept_name, t1.emp_no, t1.last_name, t1.first_name, t1.from_date, t1.to_date from (select m.dept_no, m.emp_no, m.from_date, m.to_date, e.last_name, e.first_name from dept_manager m inner join employees e on m.emp_no = e.emp_no) t1 inner join departments d on t1.dept_no = d.dept_no ; --4. List the department of each employee with the following information: -- employee number, last name, first name, and department name. select t2.emp_no, t2.last_name, t2.first_name, d.dept_name from (select e.emp_no, e.last_name, e.first_name, de.dept_no from employees e inner join dept_emp de on e.emp_no = de.emp_no) t2 inner join departments d on t2.dept_no = d.dept_no ; --5. List all employees whose first name is "Hercules" and last names begin with "B." select * from employees where first_name = 'Hercules' and last_name like 'B%'; --6. List all employees in the Sales department, including their -- employee number, last name, first name, and department name. select t2.emp_no, t2.last_name, t2.first_name, d.dept_name from (select e.emp_no, e.last_name, e.first_name, de.dept_no from employees e inner join dept_emp de on e.emp_no = de.emp_no) t2 inner join departments d on t2.dept_no = d.dept_no where dept_name = 'Sales' ; --7. List all employees in the Sales and Development departments, including their -- employee number, last name, first name, and department name. select t2.emp_no, t2.last_name, t2.first_name, d.dept_name from (select e.emp_no, e.last_name, e.first_name, de.dept_no from employees e inner join dept_emp de on e.emp_no = de.emp_no) t2 inner join departments d on t2.dept_no = d.dept_no where (dept_name = 'Sales' or dept_name = 'Development') ; --8. In descending order, list the frequency count of employee last names, -- i.e., how many employees share each last name. select last_name, count(*) as counts from employees group by last_name order by counts desc;
true
25d3583b4a029c41c8a8a835bd1ff20b61b15642
SQL
srivalli85/maascreen
/sql/movies 30-05-09/reviews.sql
UTF-8
1,853
3.140625
3
[]
no_license
/* SQLyog Enterprise - MySQL GUI v7.15 MySQL - 5.0.51a-community-nt : Database - maascreen ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*Table structure for table `reviews` */ DROP TABLE IF EXISTS `reviews`; CREATE TABLE `reviews` ( `id` int(10) NOT NULL auto_increment, `movie_id` int(10) default NULL, `punchline` varchar(70) collate utf8_unicode_ci default NULL, `genre` varchar(70) collate utf8_unicode_ci default NULL, `type` varchar(100) collate utf8_unicode_ci default NULL, `banner` varchar(100) collate utf8_unicode_ci default NULL, `cast` varchar(100) collate utf8_unicode_ci default NULL, `art` varchar(100) collate utf8_unicode_ci default NULL, `music` varchar(100) collate utf8_unicode_ci default NULL, `cinematography` varchar(500) collate utf8_unicode_ci default NULL, `editing` varchar(100) collate utf8_unicode_ci default NULL, `story` varchar(100) collate utf8_unicode_ci default NULL, `screenplay` varchar(100) collate utf8_unicode_ci default NULL, `direction` varchar(100) collate utf8_unicode_ci default NULL, `producer` varchar(100) collate utf8_unicode_ci default NULL, `summary` text collate utf8_unicode_ci, `description` text collate utf8_unicode_ci, `image` tinyint(1) default '1', `active` tinyint(1) default '0', `insert_data` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
true
fe735418bac06184ba39610c6fa483d9a6faa7fa
SQL
OLINSolutions/eiservices
/mysql/RTW-JD-Res.sql
UTF-8
443
4.03125
4
[]
no_license
SELECT jdres.* , h.* , r.* FROM jockeysresults jdres inner join horses h on (h.horsesid = jdres.horsesid) inner join races r on (r.racesid = h.racesid) WHERE jdres.jockeysresultsracetag like concat('%',date_format(curdate(),'%Y%m%d'),'%') order by jdres.jockeysresultsracetag, h.horsesprogramnumber desc, jdres.jockeysresultsid desc -- order by r.tracksid, r.racesnumber, h.horsesprogramnumber desc, resultsid desc limit 1000;
true
2d9f3b4ebbbde4515d8e9f233e0b98eb817697fd
SQL
alexand1r/SoftUni-Databases-Advanced-Entity-Framework
/homework/FetchingResultsWithADONet/5.ChangeTownNameCasing/Update.sql
UTF-8
122
2.59375
3
[]
no_license
use MinionsDB UPDATE Towns SET TownName = UPPER(TownName) WHERE TownName <> UPPER(TownName) AND CountryName = @country
true
13df72245d5f76bfb12db54b071f3c4e568f21af
SQL
seanburns76/SQL-Scripts
/Mills Dashboards/cost1.sql
UTF-8
233
3.21875
3
[]
no_license
select from vinvoiced (select * from ( select ROW_NUMBER() over (partition by sflitm,sflitm order by sfdate asc) as seq, sfdate, sflitm, sfuncs from vInvoiced where sflitm <> '' and sfuncs > 0) as x where x.seq % 2 = 0) as even
true
892b0bdebe248e497c6cb49219b93fddc78771d2
SQL
Luiz-valdameri/employees-api-java
/src/main/resources/sql/criacao_db.sql
UTF-8
553
3.46875
3
[]
no_license
CREATE DATABASE employees; CREATE TABLE employee ( email character varying, id serial NOT null, name character varying(30), surname character varying(50), nis bigint NOT NULL, CONSTRAINT employee_pkey PRIMARY KEY (id), CONSTRAINT proper_email CHECK (email::text ~* '^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+[.][A-Za-z]+$'::text), CONSTRAINT name_size CHECK (char_length(name::text) >= 2 AND char_length(name::text) <= 30), CONSTRAINT surname_size CHECK (char_length(surname::text) >= 2 AND char_length(surname::text) <= 50) )
true
4db68f61d66f087efa1a56a085f0aa07057f4c37
SQL
levelsix/MercenaryInc
/notinuse/sqls/createdb.sql
UTF-8
455
2.90625
3
[]
no_license
USE c_cs108_cchan91; DROP TABLE IF EXISTS users; -- remove table if it already exists and start from scratch -- footlength is in inches for the person. not inches of the shoe CREATE TABLE users ( ID int NOT NULL AUTO_INCREMENT, username VARCHAR(64), password VARCHAR(64), PRIMARY KEY (ID) ); ALTER TABLE users AUTO_INCREMENT = 1; INSERT INTO users (username, password) VALUES ("Conrad", "pw"), ("King King", "pw");
true
df0beb5d93e64309ee4c1894cdd4ebd85c86e11b
SQL
gandhiabhishek7007/Stage1
/SQL Programming/Mandatory Hands-on/885123/Customer using HDFC bank/subquery3bms.sql
UTF-8
250
3.59375
4
[]
no_license
Select distinct USERS.NAME,USERS.ADDRESS FROM USERS JOIN BOOKINGDETAILS ON USERS.USER_ID=BOOKINGDETAILS.USER_ID WHERE USERS.USER_ID not in(SELECT BOOKINGDETAILS.USER_ID FROM BOOKINGDETAILS where BOOKINGDETAILS.NAME IN('HDFC')) ORDER BY USERS.NAME;
true
43e93a9f3bcf8031baa4bf8e03a0ecc72250df9e
SQL
HunterHans/Crawl
/init/init_schema.sql
UTF-8
3,912
2.8125
3
[]
no_license
CREATE DATABASE IF NOT EXISTS default_database_/*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */; USE default_database_; -- MySQL dump 10.13 Distrib 8.0.15, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: chi_med_baike_lll -- ------------------------------------------------------ -- Server version 8.0.15 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; SET NAMES utf8 ; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- -- Table structure for table `dead_urls_tbl` -- DROP TABLE IF EXISTS `dead_urls_tbl`; /*!40101 SET @saved_cs_client = @@character_set_client */; SET character_set_client = utf8mb4 ; CREATE TABLE `dead_urls_tbl` ( `url` varchar(200) NOT NULL, `title` varchar(200) DEFAULT NULL, `relative` varchar(20) DEFAULT NULL, `tags` varchar(200) DEFAULT NULL, `type` varchar(200) DEFAULT NULL, `file_name` varchar(200) DEFAULT NULL, PRIMARY KEY (`url`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `dead_urls_tbl` -- LOCK TABLES `dead_urls_tbl` WRITE; /*!40000 ALTER TABLE `dead_urls_tbl` DISABLE KEYS */; /*!40000 ALTER TABLE `dead_urls_tbl` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `new_urls_tbl` -- DROP TABLE IF EXISTS `new_urls_tbl`; /*!40101 SET @saved_cs_client = @@character_set_client */; SET character_set_client = utf8mb4 ; CREATE TABLE `new_urls_tbl` ( `url` varchar(200) NOT NULL, `title` varchar(200) DEFAULT NULL, `relative` varchar(20) DEFAULT NULL, `tags` varchar(200) DEFAULT NULL, `type` varchar(200) DEFAULT NULL, `file_name` varchar(200) DEFAULT NULL, PRIMARY KEY (`url`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `new_urls_tbl` -- LOCK TABLES `new_urls_tbl` WRITE; /*!40000 ALTER TABLE `new_urls_tbl` DISABLE KEYS */; /*!40000 ALTER TABLE `new_urls_tbl` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `old_urls_tbl` -- DROP TABLE IF EXISTS `old_urls_tbl`; /*!40101 SET @saved_cs_client = @@character_set_client */; SET character_set_client = utf8mb4 ; CREATE TABLE `old_urls_tbl` ( `url` varchar(200) NOT NULL, `title` varchar(200) DEFAULT NULL, `relative` varchar(20) DEFAULT NULL, `tags` varchar(200) DEFAULT NULL, `type` varchar(200) DEFAULT NULL, `file_name` varchar(200) DEFAULT NULL, PRIMARY KEY (`url`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `old_urls_tbl` -- LOCK TABLES `old_urls_tbl` WRITE; /*!40000 ALTER TABLE `old_urls_tbl` DISABLE KEYS */; /*!40000 ALTER TABLE `old_urls_tbl` ENABLE KEYS */; UNLOCK TABLES; -- -- Dumping events for database 'chi_med_baike_lll' -- /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -- Dump completed on 2019-09-29 10:12:09 grant all privileges on default_database_.* to HunterHan@localhost; flush privileges;
true
bfa7c4d953731344e5885bf4ed0cbbce2e30206b
SQL
APochiero/DatabaseCatenaRistorazione
/Trigger/Tavolo/ContrAggTavolo.sql
UTF-8
294
3.078125
3
[]
no_license
DROP TRIGGER IF EXISTS AggiornaTavolo; DELIMITER $$ CREATE TRIGGER AggiornaTavolo BEFORE UPDATE ON Tavolo FOR EACH ROW BEGIN IF (New.NumeroPosti<2) THEN SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT='Attenzione Il Numero Dei posti deve essere maggiore o uguale a 2 '; END IF; END $$ DELIMITER ;
true
4303b9c2f52a5a6621cc669081c440be4ed1dbc4
SQL
MikeO7/DBProject
/CreateTables.sql
UTF-8
3,226
3.71875
4
[]
no_license
CREATE DATABASE IF NOT EXISTS Test; USE Test; DROP TABLE IF EXISTS Customers; DROP TABLE IF EXISTS Employees; DROP TABLE IF EXISTS Products; DROP TABLE IF EXISTS Orders; DROP TABLE IF EXISTS Invoices; DROP TABLE IF EXISTS ProductDetails; DROP TABLE IF EXISTS Shippers; DROP TABLE IF EXISTS Payments; DROP TABLE IF EXISTS Supplies; DROP TABLE IF EXISTS ProductSupplier; CREATE TABLE Employees ( EmployeeId INT NOT NULL AUTO_INCREMENT PRIMARY KEY, LastName VARCHAR(255), FirstName VARCHAR(255), JobTitle VARCHAR(255), ReportsTo VARCHAR(255), -- FK???? MobilePhone VARCHAR(255), Email VARCHAR(255), Address VARCHAR(255), City VARCHAR(255), Country VARCHAR(255), State VARCHAR(255), PostalCode INT(255) ); CREATE TABLE Customers ( CustomerId INT NOT NULL AUTO_INCREMENT PRIMARY KEY, CompanyName VARCHAR(30), ContactName VARCHAR(30), MobilePhone VARCHAR(10), Email VARCHAR(30), Address VARCHAR(30), City VARCHAR(30), State VARCHAR(30), Country VARCHAR(30), PostCode VARCHAR(5), SalesRepId INT, FOREIGN KEY(SalesRepId) REFERENCES Employees(EmployeeId) ); CREATE TABLE Products ( ProductCode INT NOT NULL AUTO_INCREMENT PRIMARY KEY, Name VARCHAR(255), Description VARCHAR(1000), SuggestedUnitPrice NUMERIC(15,2), BuyUnitPrice NUMERIC(15,2), UnitsInStock INT(255) ); CREATE TABLE Orders ( OrderId INT NOT NULL AUTO_INCREMENT PRIMARY KEY, CustomerId INT, EmployeeId INT, OrderedDate DATE, RequiredDate DATE, OrderStatus INT, -- ?????? ShippedDate Date, ShipperID VARCHAR(30), ShipToName VARCHAR(30), ShipToAddress VARCHAR(30), ShiToCity VARCHAR(30), ShiptTCountry VARCHAR(30), ShipToPostalCode VARCHAR(5), FOREIGN KEY(CustomerId) REFERENCES Customers(CustomerId), FOREIGN KEY(EmployeeId) REFERENCES Employees(EmployeeId) ); CREATE TABLE Invoices ( InvoiceId INT NOT NULL AUTO_INCREMENT PRIMARY KEY, OrderId VARCHAR(30), InvoiceDate DATE ); CREATE TABLE ProductDetails ( ProductCode INT NOT NULL AUTO_INCREMENT PRIMARY KEY, MoreDescription VARCHAR(1000) ); CREATE TABLE Shippers ( ShipperId INT NOT NULL AUTO_INCREMENT PRIMARY KEY, CompanyName VARCHAR(30), ContactName VARCHAR(30), ContactPhone VARCHAR(10) ); CREATE TABLE Payments ( PrderId INT NOT NULL AUTO_INCREMENT PRIMARY KEY, PaymentDate Date, Amount NUMERIC(15,2) ); CREATE TABLE Supplies ( SupplierId INT NOT NULL AUTO_INCREMENT PRIMARY KEY, CompanyName VARCHAR(30), ContactName VARCHAR(30), PhoneMobile VARCHAR(30), Email VARCHAR(30), Address VARCHAR(30), City VARCHAR(30), PostalCode VARCHAR(5) ); CREATE TABLE ProductSupplier ( ProductCode INT NOT NULL AUTO_INCREMENT PRIMARY KEY, SupplierId VARCHAR(30), Notes VARCHAR(1000) );
true
9eff3bac68cf07a2dfac47bce574b39f3740b02d
SQL
rabinacathrine/Lab-DDL-command-prograd-kabbadi-league
/ddl-pkl.sql
UTF-8
1,659
2.84375
3
[]
no_license
-- PROGRESSION - 1 -- 1. **Create table city** create table city ( id number(11), name varchar(50) not null, primary key(id) ); -- 2. **Create table referee** create table referee ( id number(11), name varchar(50) not null, primary key(id) ); -- 3. **Create table innings** create table innings ( id number(11), name varchar(50) not null, primary key(id) ); -- 4. **Create table extra_type** create table extra_type ( id number(11), name varchar(50) not null, primary key(id) ); -- 5. **Create table skill** create table skill ( id number(11), name varchar(50) not null, primary key(id) ); -- 6. **Create table team** create table team ( id number(11), name varchar(50) not null, primary key(id) ); -- 7. **Create table player** create table player ( id number(11), name varchar(50) not null, primary key(id) ); -- 8. **Create table venue** create table venue ( id number(11), name varchar(50) not null, primary key(id) ); -- 9. **Create table event** create table event ( id number(11), name varchar(50) not null, primary key(id) ); -- 10. **Create table extra_event** create table extra_event ( id number(11), name varchar(50) not null, primary key(id) ); -- 11. **Create table outcome** create table outcome ( id number(11), name varchar(50) not null, primary key(id) ); -- 12. **Create table game** create table game ( id number(11), name varchar(50) not null, primary key(id) ); -- 13. **Drop table city** drop table city; -- 14. **Drop table innings** drop table innings; -- 15. **Drop table skill** drop table skill; -- 16. **Drop table extra_type** drop table extra_type;
true
e334bf17b0c1e56865237c00494f5e649e65503c
SQL
BurstSword/DWES
/NominasSpringBootFinal/sql/nominas.sql
UTF-8
2,910
3.140625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 18-01-2021 a las 07:49:58 -- Versión del servidor: 10.4.14-MariaDB -- Versión de PHP: 7.4.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Base de datos: `nominas` -- -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `empleado` -- CREATE TABLE `empleado` ( `id` int(11) NOT NULL, `nombre` varchar(45) DEFAULT NULL, `dni` varchar(9) DEFAULT NULL, `sexo` varchar(1) DEFAULT NULL, `categoria` int(11) DEFAULT NULL, `antiguedad` int(11) DEFAULT NULL, `nomina_id` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Volcado de datos para la tabla `empleado` -- INSERT INTO `empleado` (`id`, `nombre`, `dni`, `sexo`, `categoria`, `antiguedad`, `nomina_id`) VALUES (2, 'Miguel', '30271238H', 'H', 8, 3, 2), (3, 'Jesús', '77851741F', 'H', 4, 4, 3), (5, 'Olga', '30256791S', 'M', 10, 10, 6); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `nomina` -- CREATE TABLE `nomina` ( `id` int(11) NOT NULL, `dni` varchar(9) DEFAULT NULL, `sueldo` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Volcado de datos para la tabla `nomina` -- INSERT INTO `nomina` (`id`, `dni`, `sueldo`) VALUES (2, '30271238H', 205000), (3, '77851741F', 130000), (6, '30256791S', 280000); -- -- Índices para tablas volcadas -- -- -- Indices de la tabla `empleado` -- ALTER TABLE `empleado` ADD PRIMARY KEY (`id`), ADD KEY `FK_NOMINA_idx` (`nomina_id`); -- -- Indices de la tabla `nomina` -- ALTER TABLE `nomina` ADD PRIMARY KEY (`id`); -- -- AUTO_INCREMENT de las tablas volcadas -- -- -- AUTO_INCREMENT de la tabla `empleado` -- ALTER TABLE `empleado` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; -- -- AUTO_INCREMENT de la tabla `nomina` -- ALTER TABLE `nomina` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; -- -- Restricciones para tablas volcadas -- -- -- Filtros para la tabla `empleado` -- ALTER TABLE `empleado` ADD CONSTRAINT `FK_NOMINA` FOREIGN KEY (`nomina_id`) REFERENCES `nomina` (`id`), ADD CONSTRAINT `FKqs2ape5bm52k2nwq0o4hyrg0` FOREIGN KEY (`nomina_id`) REFERENCES `nomina` (`id`); COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
true
8efac63ae46e7f10ef9ebf42e173291bea895e63
SQL
C-F-K/sql-surplus
/bb resources/works as-is/users_and_modules_accessed.sql
UTF-8
840
3.875
4
[]
no_license
/* a lits of all users and the modules they have accessed */ /* Note, this may take a few minutes to run */ /* Note, this makes use of the BB_BB60_STATS.ACTIVITY_ACCUMULATOR so check you last date in that to see what date this query will run upto */ SELECT C.USER_ID, C.FIRSTNAME, C.LASTNAME, B.COURSE_NAME, B.COURSE_ID FROM (SELECT USER_PK1, COURSE_PK1 FROM (SELECT USER_PK1, COURSE_PK1, COUNT(*) FROM BB_BB60_STATS.ACTIVITY_ACCUMULATOR WHERE USER_PK1 IS NOT NULL AND COURSE_PK1 IS NOT NULL GROUP BY USER_PK1, COURSE_PK1)) A, (SELECT PK1, COURSE_NAME, COURSE_ID FROM BB_BB60.COURSE_MAIN) B, (SELECT PK1, USER_ID, FIRSTNAME, LASTNAME FROM BB_BB60.USERS WHERE ROW_STATUS = 0 AND INSTITUTION_ROLES_PK1 = 3) C WHERE A.USER_PK1 = C.PK1 AND A.COURSE_PK1 = B.PK1;
true
034a13b1192bf265c937846ca23e6bea82b3d82b
SQL
hellobobo1982/wxRobot
/Config/create.sql
UTF-8
5,235
3.296875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- 主机: 127.0.0.1 -- 生成日期: 2019-05-30 23:54:29 -- 服务器版本: 10.1.38-MariaDB -- PHP 版本: 7.3.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- 数据库: `test` -- -- -------------------------------------------------------- -- -- 表的结构 `anthority` -- CREATE TABLE `anthority` ( `username` varchar(32) NOT NULL, `password` varchar(32) NOT NULL, `pid` bigint(20) NOT NULL, `reference` varchar(32) NOT NULL, `registerTime` datetime NOT NULL, `flag` tinyint(4) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- 表的结构 `run_status` -- CREATE TABLE `run_status` ( `username` varchar(32) NOT NULL, `nickname` varchar(128) NOT NULL COMMENT '微信昵称', `headImgUrl` varchar(192) NOT NULL, `uin` varchar(64) NOT NULL, `uid` varchar(128) NOT NULL, `sid` varchar(64) NOT NULL, `skey` varchar(128) NOT NULL, `pass_ticket` varchar(256) NOT NULL, `uri` varchar(64) NOT NULL, `synckey` varchar(256) NOT NULL, `SyncKey_orig` varchar(256) NOT NULL, `lasttime` varchar(32) NOT NULL COMMENT '最后一次操作时间' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- 表的结构 `wxmsg_receive` -- CREATE TABLE `wxmsg_receive` ( `username` varchar(32) CHARACTER SET utf8 NOT NULL, `id` bigint(32) NOT NULL, `uin` varchar(16) CHARACTER SET latin1 NOT NULL, `Content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL, `MsgType` int(11) NOT NULL, `Flag` tinyint(4) NOT NULL, `ReceiveTime` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- 表的结构 `wxmsg_sent` -- CREATE TABLE `wxmsg_sent` ( `id` bigint(32) NOT NULL, `uin` varchar(16) CHARACTER SET latin1 NOT NULL, `MsgType` int(11) NOT NULL, `Flag` tinyint(4) NOT NULL, `SentTime` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- 转储表的索引 -- -- -- 表的索引 `run_status` -- ALTER TABLE `run_status` ADD UNIQUE KEY `uni_code` (`username`,`uin`) USING BTREE; -- -- 表的索引 `wxmsg_receive` -- ALTER TABLE `wxmsg_receive` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `Id` (`id`); -- -- 在导出的表使用AUTO_INCREMENT -- -- -- 使用表AUTO_INCREMENT `wxmsg_receive` -- ALTER TABLE `wxmsg_receive` MODIFY `id` bigint(32) NOT NULL AUTO_INCREMENT; COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- 主机: 127.0.0.1 -- 生成日期: 2019-06-16 14:23:24 -- 服务器版本: 10.1.38-MariaDB -- PHP 版本: 7.3.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET NAMES utf8mb4 */; -- -- 数据库: `test` -- -- -------------------------------------------------------- -- -- 表的结构 `agency` -- CREATE TABLE `test`.`commission` ( `pid` VARCHAR(16) NOT NULL , `commission` DOUBLE NOT NULL , `updateTime` DATETIME NOT NULL ) ENGINE = InnoDB; ALTER TABLE `commission` ADD UNIQUE(`pid`); -- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- 主机: 127.0.0.1 -- 生成日期: 2019-06-22 18:42:41 -- 服务器版本: 10.1.38-MariaDB -- PHP 版本: 7.3.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- 数据库: `test` -- -- -------------------------------------------------------- -- -- 表的结构 `withdraw` -- CREATE TABLE `withdraw` ( `requestId` int(11) NOT NULL, `pid` varchar(16) NOT NULL, `withdraw` double NOT NULL, `requestTime` datetime NOT NULL COMMENT '申请时间', `handleTime` datetime NOT NULL COMMENT '处理完成时间', `status` int(11) NOT NULL COMMENT '0:未处理;1:已处理;-1:不处理', `memo` int(11) NOT NULL COMMENT '备注' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- 转储表的索引 -- -- -- 表的索引 `withdraw` -- ALTER TABLE `withdraw` ADD PRIMARY KEY (`requestId`); -- -- 在导出的表使用AUTO_INCREMENT -- -- -- 使用表AUTO_INCREMENT `withdraw` -- ALTER TABLE `withdraw` MODIFY `requestId` int(11) NOT NULL AUTO_INCREMENT; COMMIT;
true
17369d61358a3a3b1e5c578d185a3be0e1c46ee8
SQL
lsb/1984-dissociated-text-local
/dissociated-text.sql
UTF-8
411
3.21875
3
[]
no_license
with recursive quadgrams(ttl, w1, w2, w3, w4) as (select 150, null, 'WAR', 'IS', 'PEACE' union all select ttl-1, w2, w3, w4, (select g4.word from words g1, words g2, words g3, words g4 where g2.id = g1.id + 1 and g3.id = g2.id + 1 and g4.id = g3.id + 1 and g1.word = w2 and g2.word = w3 and g3.word = w4 order by random() limit 1) from quadgrams where ttl > 0) select w2 from quadgrams;
true
f6226357706d799e9dc717efd88e582fee75cbd1
SQL
yuliankhadaffi/Managemen_HRD
/DB/manajemen_hrd.sql
UTF-8
2,148
3.140625
3
[]
no_license
/* SQLyog Enterprise v13.1.1 (64 bit) MySQL - 10.4.6-MariaDB : Database - manajemen_hrd ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; CREATE DATABASE /*!32312 IF NOT EXISTS*/`manajemen_hrd` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `manajemen_hrd`; /*Table structure for table `data_pegawai` */ DROP TABLE IF EXISTS `data_pegawai`; CREATE TABLE `data_pegawai` ( `id` int(11) NOT NULL AUTO_INCREMENT, `nama` varchar(255) NOT NULL, `umur` int(5) NOT NULL, `jk` enum('Laki - Laki','Perempuan') NOT NULL, `no_hp` varchar(15) NOT NULL, `tempat_lahir` text NOT NULL, `tgl_lahir` date NOT NULL, `jamkerja` varchar(50) NOT NULL, `gaji` varchar(50) NOT NULL, `bagian` enum('Bagian Pemasaran','Bagian Gudang','Bagian Tatakelola') NOT NULL, `alamat` text NOT NULL, `foto` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1; /*Data for the table `data_pegawai` */ LOCK TABLES `data_pegawai` WRITE; UNLOCK TABLES; /*Table structure for table `login` */ DROP TABLE IF EXISTS `login`; CREATE TABLE `login` ( `id` int(11) NOT NULL AUTO_INCREMENT, `nama` varchar(50) NOT NULL, `username` varchar(32) NOT NULL, `password` varchar(255) NOT NULL, PRIMARY KEY (`username`), KEY `id` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1; /*Data for the table `login` */ LOCK TABLES `login` WRITE; insert into `login`(`id`,`nama`,`username`,`password`) values (1,'administrator','admin','$2y$10$svIhwSIBC0LXf69NP1wRUeHGNe9E0UmCcMyA1FDOqQvNXAAS5YZgS'); UNLOCK TABLES; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
true
95d08a085197b323301c72472e8f3956feec7203
SQL
lakepower/cray-api
/migrations/sqls/20180815052049-card-table-up.sql
UTF-8
361
2.546875
3
[]
no_license
-- ---------------------------------------------------------------------------- -- Table cray.cards -- ---------------------------------------------------------------------------- CREATE TABLE IF NOT EXISTS `cray`.`cards` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `name` TEXT NULL DEFAULT NULL, `description` TEXT NULL DEFAULT NULL, PRIMARY KEY (`id`) );
true
fe71d1340672b397434c478a8b9441c019fc5445
SQL
jhankee/leagueTracker
/documentation/view_Creations.sql
UTF-8
1,707
3.625
4
[]
no_license
CREATE or Replace VIEW v_all_rosters AS select division.divisionName AS 'Division Name', team.teamName AS 'Team Name', concat(player.playerLastName,', ',player.playerFirstName) AS 'Player Name' from ((player join team on((player.teamID = team.teamID))) join division on((team.divisionID = division.divisionID))) order by division.divisionName,team.teamName; --------------------- CREATE OR REPLACE VIEW v_coach_missing_clearances AS select coach.coachLastName AS coachLastName, coach.coachFirstName AS coachFirstName,coach.hasClearances AS hasClearances from coach where (coach.hasClearances = 'False'); --------------------- CREATE OR REPLACE VIEW v_team_coaches AS select division.divisionName AS Division, team.teamName AS Team, concat(coach.coachLastName,', ',coach.coachFirstName) AS Coach ,coach.coachType AS Type from (((team join coach_has_team on((team.teamID = coach_has_team.teamID))) join coach on((coach_has_team.coachID = coach.coachID))) join division on((team.divisionID = division.divisionID))) order by division.divisionName,team.teamName; --------------------- CREATE OR REPLACE VIEW v_team_roster_size AS select team.teamName AS teamName, team.teamID AS teamID, count(player.playerID) AS RosterSize from (team left join player on((player.teamID = team.teamID))) group by team.teamID; --------------------- CREATE OR REPLACE VIEW v_unassign_players AS select player.playerID AS playerID, player.playerFirstName AS playerFirstName, player.playerLastName AS playerLastName, player.dateOfBirth AS dateOfBirth, player.familyID AS familyID, player.teamID AS teamID, player.registrationDate AS registrationDate from player where (player.teamID is null); ---------------------
true
acef68a43342bb59298514c73db5b02697d34b4b
SQL
trohr02/sqlplus-commands
/scripts/lsmv.sql
UTF-8
1,121
3.515625
4
[ "Apache-2.0" ]
permissive
/* Author: Tomas Rohr, rohr.tomas@gmail.com Last change date: 2017-09-01 */ SET VERIFY OFF /* Do not prompt for substitution variables values. Use null as default value for substitution variable. */ COLUMN 1 NEW_VALUE 1 COLUMN 2 NEW_VALUE 2 SET FEEDBACK OFF SELECT NULL "1", NULL "2" FROM DUAL WHERE 1=0; SET FEEDBACK ON COLUMN OWNER FORMAT A20 COLUMN MVIEW_NAME FORMAT A30 COLUMN REFRESH_MODE FORMAT A6 COLUMN REFRESH_METHOD FORMAT A8 COLUMN BUILD_MODE FORMAT A9 COLUMN STALENESS FORMAT A13 SELECT OWNER ,MVIEW_NAME ,REFRESH_MODE ,REFRESH_METHOD ,BUILD_MODE ,STALENESS FROM ALL_MVIEWS WHERE 1=1 -- if both &1 and &2 are not null then (owner like '&1' and mview_name like '&2') AND (('&1' IS NULL OR '&2' IS NULL) OR (OWNER LIKE '&1' AND MVIEW_NAME LIKE '&2')) -- if &1 is not null and &2 is null then (owner=:owner and mview_name like '&1') AND (('&1' IS NULL OR '&2' IS NOT NULL) OR (OWNER=:OWNER AND MVIEW_NAME LIKE '&1')) -- if both &1 and &2 are null then owner = :owner AND (('&1' IS NOT NULL) OR (OWNER = :OWNER)) ORDER BY OWNER, MVIEW_NAME ; UNDEF 1 UNDEF 2
true
85dfa929f96fc210a3425b444896b8313f9f7e48
SQL
wangyao2221/LeetCode
/src/Database/Second Highest Salary.sql
UTF-8
717
4.25
4
[]
no_license
# Create table If Not Exists Employee (Id int, Salary int); # Truncate table Employee; # insert into Employee (Id, Salary) values ('1', '100'); # insert into Employee (Id, Salary) values ('2', '200'); # insert into Employee (Id, Salary) values ('3', '300'); # Write your MySQL query statement below # 测试用例中可以发现当数据只有一条时要求返回null,因此下面一条语句是不符合要求的 # SELECT Salary as SecondHighestSalary FROM Employee ORDER BY Salary DESC LIMIT 1,1 SELECT CASE WHEN COUNT(*) >= 1 THEN MAX(a.Salary) ELSE NULL END AS SecondHighestSalary FROM (SELECT Salary FROM employee WHERE Salary <> (SELECT MAX(Salary) FROM employee)) a;
true
b7b0844e1280a14d6fb127853efd6738379b2e30
SQL
Fancy2m/WebMulti2
/datenbanken.sql
UTF-8
9,481
3.390625
3
[]
no_license
drop table if exists rating; drop table if exists film; drop table if exists director; drop table if exists benutzer; create table benutzer( user_ID int not null primary key auto_increment, username varchar(30), passwort varchar(30), vorname varchar (30), nachname varchar (30), geburtstag date, gender varchar (30), email varchar(140), rechte int ); insert into benutzer (user_ID, username, passwort, vorname, nachname, geburtstag, gender, email, rechte) VALUES ('NULL', 'Marcel', 'marcel', 'Marcel', 'Rosik', '1994-07-27', 'M', 'marcel.rosik@stud.hs-ruhrwest.de', 2); insert into benutzer (user_ID, username, passwort, vorname, nachname, geburtstag, gender, email, rechte) VALUES ('NULL', 'Daniel', 'daniel', 'Daniel', 'Keib', '1995-3-22', 'M', 'daniel.keib@stud.hs-ruhrwest.de', 1); insert into benutzer (user_ID, username, passwort, vorname, nachname, geburtstag, gender, email, rechte) VALUES ('NULL', 'Rebecca', 'becci', 'Rebecca' ,'Fergen', '1995-07-31', 'W', 'rebecca.fergen@stud.hs-ruhrwest.de', 1); insert into benutzer (user_ID, username, passwort, vorname, nachname, geburtstag, gender, email, rechte) VALUES ('NULL', 'Julic', 'julic', 'Julic', 'Rößling', '1993-04-25', 'M', 'julic.roessling@stud.hs-ruhrwest.de', 0); create table director( director_id int primary key not null auto_increment, dvorname varchar(50), dnachname varchar(50) ); insert into director (director_id, dvorname, dnachname) Values ('NULL', 'David', 'Fincher'); insert into director (director_id, dvorname, dnachname) Values ('NULL', 'Quentin', 'Tarantino'); insert into director (director_id, dvorname, dnachname) Values ('NULL', 'Francis', 'Coppola'); insert into director (director_id, dvorname, dnachname) Values ('NULL', 'Christopher', 'Nolan'); insert into director (director_id, dvorname, dnachname) Values ('NULL', 'Frank', 'Darabont'); create table film( film_ID int primary key not null auto_increment, name varchar(200), erscheinungsjahr int, director_fid int not null, beschreibung varchar (2000), avgrating double (2,2), bild varchar (200), fsk int, foreign key (director_fid) references director(director_id) on delete restrict on update cascade ); insert into film (film_ID, name, erscheinungsjahr, director_fid, beschreibung, bild, fsk) Values ('NULL', 'Fight Club', '1999', '1', 'Eine ganze Generation von Männern, die Zweitgeborenen der Geschichte, wanken durch ihr Leben auf der Suche nach einem Sinn, einer Aufgabe, einer Erfüllung ihrer selbst. Doch ein Ziel scheint es in der deprimierenden Konsumgesellschaft nicht zu geben. Auch der von Edward Norton verkörperte Protagonist und gleichzeitiger Erzähler gehört zu diesen verlorenen Seelen, die ungelenkt ihr Dasein fristen. Als er jedoch eines Tages Tyler Durden (Brad Pitt) kennenlernt, soll sich alles ändern. Der von beiden Junggesellen ins Leben gerufene Fight Club, entfesselt ungeahnte Möglichkeiten, die jedoch ebenso unkontrollierbares Ausmaß annehmen. Aus der Rache an der modernen Zivilisation wird schnell ein Kleinkrieg, der seine Opfer fordert. Nicht einmal die verruchte Marla Singer (Helena Bonham Carter) vermag sich diesem unaufhaltsame Treiben zu entziehen. Am Ende stehen sogar Menschenleben auf dem Spiel, denn aus einer anfangs harmlosen Idee ist eine unaufhaltsame Bestie geworden.', 'images/fight_club.jpg' ,'18'); insert into film (film_ID, name, erscheinungsjahr, director_fid, beschreibung, bild, fsk) Values ('NULL', 'Pulp Fiction', '1994', '2', 'Was braucht man für ein gutes Stück Pulp Fiction (zu deutsch: Schundliteratur)? Ein Gauner-Pärchen, zwei Auftragskiller, eine Uhr, einen Koffer geheimnisvollen gold-glänzenden Inhalts, eine Menge Adrenalin in Form einer Spritze, Gespräche über das europäische metrische System von Fastfood und die Gefährlichkeit gewisser Fußmassagen, ein Bibelzitat (Ezekiel 25:17), einen versehentlichen Kopfschuss und einen Cleaner, einen Boxer auf der Flucht und die perverse Begegnung mit einem roten Gummiball, göttliche Vorsehung und eine Läuterung. Und das ist nur ein Bruchteil der Charaktere und Geschichten, die dem Publikum hier auf fundamentale Weise näher gebracht werden. Das Ganze wird auf geschickte Weise miteinander verwoben (gerne auch ohne die zeitliche Abfolge zu sehr zu berücksichtigen) und untermalt von einem groovenden Soundtrack. Heraus kommt ein Film, der direkt zum Klassiker wurde. Eben ein gutes Stück Pulp Fiction…', 'images/pulp_fiction.jpg', '16'); insert into film (film_ID, name, erscheinungsjahr, director_fid, beschreibung, bild, fsk) Values ('NULL', 'Der Pate', '1972', '3', '‘Ich mache ihm ein Angebot, das er nicht ablehnen kann.’: Don Vito Corleone (Marlon Brando) ist einer der mächtigsten Mafia-Bosse in New York City und Oberhaupt einer großen Familie: Sonny (James Caan), der älteste Sohn und ein schwer zu kontrollierender Heißsporn; Fredo (John Cazale) ist der Mittlere und eigentlich zu weich für das harte Tagesgeschäft der Mafia; Connie (Talia Shire), die einzige Tochter; Michael Corleone (Al Pacino) ist der jüngste Sohn und Liebling seines Vaters. Es ist dessen erklärter Wunsch, dass Michael aus den Machenschaften der Corleones herausgehalten wird; er soll ein bürgerliches Leben führen. Tom Hagen (Robert Duvall) ist Don Vitos Ziehsohn und Anwalt der Familie und wird später zum Consigliere, zum Berater gemacht. Michael diente im Zweiten Weltkrieg und besucht seine Familie anlässlich der Hochzeit seiner Schwester Connie mit Carlo (Gianni Russo) in Begleitung seiner Freundin Kay (Diane Keaton). Die Fröhlichkeit des Festes währt nicht lange, der boomende Handel mit Drogen wirft seine hässlichen Schatten voraus. Denn in Don Vitos Augen ist der Drogenhandel anders als Glücksspiel ein dreckiges Geschäft, und so lehnt er eine Zusammenarbeit mit dem Gangster Virgil ‘Der Türke’ Sollozzo (Al Lettieri) ab. Michael sieht sich genötigt, Farbe zu bekennen, und richtet in einem riskanten Coup seinerseits Sollozzo und den korrupten Captain McCluskey (Sterling Hayden) hin. Die Familie, die um sein Leben fürchtet, schickt Michael zu seinen Verwandten nach Italien. Kay bleibt in Unkenntnis in New York zurück. Der wieder genesene Don Vito ist um Frieden bemüht und nimmt dafür auch schweren Herzens den Tod seines Sohnes Sonny in Kauf, der in einen Hinterhalt gelockt erschossen wird. Michael entgeht selber nur knapp einem Bombenanschlag und kehrt nach Amerika zurück, wo er die Geschäfte seines Vaters übernimmt. Als dieser von einem Herzinfarkt hingerafft wird, ist für Michael der Weg frei, sämtliche seiner Widersacher aus dem Weg zu räumen. Den endgültigen Verlust seines Seelenheils nimmt er dabei billigend in Kauf, der einmal eingeschlagene Weg kann nicht mehr verlassen werden.', 'images/der_pate.jpg', '16'); insert into film (film_ID, name, erscheinungsjahr, director_fid, beschreibung, bild, fsk) Values ('NULL', 'The Dark Knight', '2008', '4', 'Noch immer spielt Bruce Wayne (Christian Bale) tagsüber den verantwortungslosen Milliardär, während er nachts als Batman das Verbrechen in Gotham city bekämpft. Unterstützt von Lieutenant Jim Gordon (Gary Oldman) und Staatsanwalt Harvey Dent (Aaron Eckhart) setzt Batman sein Vorhaben fort, das organisierte Verbrechen in Gotham endgültig zu zerschlagen. Doch das schlagkräftige Dreiergespann sieht sich bald einem genialen, immer mächtiger werdenden Kriminellen gegenübergestellt, der als Joker (Heath Ledger) bekannt ist: Er stürzt Gotham ins Chaos und zwingt den Dunklen Ritter immer näher an die Grenze zwischen Gerechtigkeit und Rache. Dent, der inzwischen mit Bruce Waynes Jugendliebe Rachel (Maggie Gyllenhaal) liiert ist, rückt in das Fadenkreuz des Jokers…', 'images/dark_knight.jpg', '16'); insert into film (film_ID, name, erscheinungsjahr, director_fid, beschreibung, bild, fsk) Values ('NULL', 'Die Verurteilten', '1994', '5', 'Der Banker Andrew Dufresne (Tim Robbins) wird Anfang der 40er Jahre für den Mord an seiner Frau und ihrem Liebhaber verurteilt, obwohl er unschuldig ist. Er wird ins Gefängnis nach Shawshank überwiesen, wo er als Bänker nicht gerade gerne gesehen ist. Die ersten Wochen und Monate sind hart, doch er findet auch Freunde an diesem ungewöhnlichen Ort. Allen voran lernt er Red (Morgan Freeman) kennen, der schon seit gefühlten Ewigkeiten hier einsitzt und das Gefängnis kennt wie seine Westentasche. Durch seine Talente mach sich Andrew im Laufe der Jahrzehnte sogar unentbehrlich, sowohl bei seinen Mitgefangenen, für die er einiges bewegt, als auch bei den Wärtern und dem Gefängnisdirektor, denen er mit den Erfahrungen in seinem Beruf viel Arbeit und Geld sparen kann.', 'images/die_verurteilten.jpg', '12'); create table rating ( rating_ID int not null primary key auto_increment, user_rid int not null, film_rid int not null, commnt varchar (2000), wert int, datum date, foreign key (user_rid) references benutzer(user_ID) on delete restrict on update cascade, foreign key (film_rid) references film(film_ID) on delete restrict on update cascade ); INSERT INTO `rating` (`rating_ID`, `user_rid`, `film_rid`, `commnt`, `wert`, `datum`) VALUES ('1', '2', '1', 'kjdlfkHDSLAKHFLKASHDLKFJ', '7', '2018-06-28'); INSERT INTO `rating` (`rating_ID`, `user_rid`, `film_rid`, `commnt`, `wert`, `datum`) VALUES ('2', '3', '5', 'adjlakshdflkjahsldkjf', '2', '2018-06-28'); INSERT INTO `rating` (`rating_ID`, `user_rid`, `film_rid`, `commnt`, `wert`, `datum`) VALUES ('3', '1', '3', 'LEEEEEEEL', '5', '2018-06-28'); INSERT INTO `rating` (`rating_ID`, `user_rid`, `film_rid`, `commnt`, `wert`, `datum`) VALUES ('4', '4', '4', 'XDDDDDD WAR GOIIIIIL SHEEEESH', '10', '2018-06-28');
true
818c7cce70643797e9643a0395ae2ad46711270d
SQL
mathi123/mitasco
/migrations/sqls/20160516194303-tblGroup-users-up.sql
UTF-8
390
3.859375
4
[]
no_license
CREATE TABLE group_user ( id SERIAL PRIMARY KEY NOT NULL, group_id INTEGER NOT NULL, user_id INTEGER NOT NULL, CONSTRAINT group_user_groups_id_fk FOREIGN KEY (group_id) REFERENCES groups (id) ON DELETE CASCADE, CONSTRAINT group_user_users_id_fk FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE CASCADE ); CREATE UNIQUE INDEX group_user_id_uindex ON group_user (id);
true
4fcf208ff4a4f9e184c83b29c1bc14fafcca71c3
SQL
brooh2121/MySQlScripts
/скрипты Oracle/какие то скрипты/по старому распределению.sql
WINDOWS-1252
2,310
3.34375
3
[]
no_license
SELECT * FROM RSA_EOSAGO.PTS_DISTRIBUTION_OLD pdo; SELECT * FROM RSA_EOSAGO.PTS_DISTRIBUTION_HISTORY_OLD pdho; SELECT * FROM RSA_EOSAGO.PRINCIPAL_DETERMINE_OLD pdo; SELECT * FROM RSA_EOSAGO.INS_COMPANY ic WHERE ic.INS_COMPANY LIKE '%%'; --352 " "" 20600000 SELECT ic.INS_COMPANY, pdo.CALCULATION_DATE, pdo.PRINCIPAL_DETERMINE_CODE, pdo1.PTS_NUMBER FROM RSA_EOSAGO.PRINCIPAL_DETERMINE_OLD pdo JOIN RSA_EOSAGO.PTS_DISTRIBUTION_OLD pdo1 ON pdo.PRINCIPAL_DETERMINE_ID = pdo1.PRINCIPAL_DETERMINE_ID JOIN RSA_EOSAGO.INS_COMPANY ic ON pdo.INS_COMPANY_ID = ic.INS_COMPANY_ID WHERE 1=1 --pdo.INS_COMPANY_ID = 352 AND pdo.CALCULATION_DATE = TRUNC(TO_DATE('19.12.2018','dd.mm.yyyy'),'iw') AND pdo.PRINCIPAL_DETERMINE_CODE = 1 AND pdo1.PTS_NUMBER IN ( '019367' ) union all SELECT ic.INS_COMPANY, pdo.CALCULATION_DATE, pdo.PRINCIPAL_DETERMINE_CODE, pdo1.PTS_NUMBER FROM RSA_EOSAGO.PRINCIPAL_DETERMINE_OLD pdo JOIN RSA_EOSAGO.PTS_DISTRIBUTION_OLD pdo1 ON pdo.PRINCIPAL_DETERMINE_ID = pdo1.PRINCIPAL_DETERMINE_ID JOIN RSA_EOSAGO.INS_COMPANY ic ON pdo.INS_COMPANY_ID = ic.INS_COMPANY_ID WHERE 1=1 --pdo.INS_COMPANY_ID = 352 AND pdo.CALCULATION_DATE = TRUNC(TO_DATE('22.03.2019','dd.mm.yyyy'),'iw') AND pdo.PRINCIPAL_DETERMINE_CODE = 1 AND pdo1.PTS_NUMBER IN ( '730326', '700554' ) UNION ALL SELECT ic.INS_COMPANY, pdo.CALCULATION_DATE, pdo.PRINCIPAL_DETERMINE_CODE, pdho.PTS_NUMBER FROM RSA_EOSAGO.PRINCIPAL_DETERMINE_OLD pdo JOIN RSA_EOSAGO.PTS_DISTRIBUTION_HISTORY_OLD pdho ON pdo.PRINCIPAL_DETERMINE_ID = pdho.PRINCIPAL_DETERMINE_ID JOIN RSA_EOSAGO.INS_COMPANY ic ON pdo.INS_COMPANY_ID = ic.INS_COMPANY_ID WHERE 1=1 --pdo.INS_COMPANY_ID = 352 AND pdo.CALCULATION_DATE = TRUNC(TO_DATE('19.12.2018','dd.mm.yyyy'),'iw') AND pdo.PRINCIPAL_DETERMINE_CODE = 1 AND pdho.PTS_NUMBER IN ( '019367', '816946' ) ; SELECT TRUNC(TO_DATE('11.03.2019','dd.mm.yyyy'),'iw') FROM DUAL d; SELECT * FROM RSA_EOSAGO.PTS_DISTRIBUTION_HISTORY_OLD pdho WHERE pdho.PRINCIPAL_DETERMINE_ID IN ( SELECT pdo.PRINCIPAL_DETERMINE_ID FROM RSA_EOSAGO.PRINCIPAL_DETERMINE_OLD pdo WHERE pdo.CALCULATION_DATE >= TRUNC(TO_DATE('11.03.2019','dd.mm.yyyy'),'iw') ); SELECT pdo.PRINCIPAL_DETERMINE_ID FROM RSA_EOSAGO.PRINCIPAL_DETERMINE_OLD pdo WHERE pdo.CALCULATION_DATE >= TRUNC(TO_DATE('11.03.2019','dd.mm.yyyy'),'iw');
true
88b93923a75c1a349b25925591c2ed7a3642f890
SQL
sgerodes/ProgrammingChallenges
/Leetcode/sql/Customers Who Never Order.sql
UTF-8
105
2.921875
3
[]
no_license
SELECT name AS 'Customers' FROM customers WHERE id NOT IN ( SELECT DISTINCT customerid FROM orders );
true
c4e035bb869cdc2e285a3102fd3fd5abccd33705
SQL
yapengsong/documet
/02设计开发/01设计草稿/变更脚本(2016.1.6起)/20170405-6月版本第一轮测试/updateSQL2017-03-07-SSH密钥-ECSC新增权限.sql
UTF-8
4,900
2.75
3
[]
no_license
-- 新增二级目录 INSERT INTO `sys_selfpower` (`power_id`,`power_name`,`power_url`,`power_route`,`power_sort`,`parent_id`,`power_desc`,`power_icon`) VALUES( REPLACE (uuid(), '-', ''), 'SSH密钥','','', (SELECT ss.power_sort FROM sys_selfpower ss WHERE ss.power_name = '安全' AND ss.parent_id = '')+2000, (SELECT ss.power_id FROM sys_selfpower ss WHERE ss.power_name = '安全' AND ss.parent_id = ''), 'SSH密钥','' ); -- 新增三级目录功能权限 INSERT INTO `sys_selfpower` (`power_id`,`power_name`,`power_url`,`power_route`,`power_sort`,`parent_id`,`power_desc`,`power_icon`) VALUES ( REPLACE (uuid(), '-', ''), '创建密钥', NULL, 'secretkey_add', (SELECT ss.power_sort FROM sys_selfpower ss WHERE ss.power_name = 'SSH密钥' AND ss.parent_id <> '')+10, (SELECT ss.power_id FROM sys_selfpower ss WHERE ss.power_name = 'SSH密钥' AND ss.parent_id <> ''), '创建密钥', NULL ); INSERT INTO `sys_selfpower` (`power_id`,`power_name`,`power_url`,`power_route`,`power_sort`,`parent_id`,`power_desc`,`power_icon`) VALUES ( REPLACE (uuid(), '-', ''), '修改密钥', NULL, 'secretkey_update', (SELECT ss.power_sort FROM sys_selfpower ss WHERE ss.power_name = 'SSH密钥' AND ss.parent_id <> '')+11, (SELECT ss.power_id FROM sys_selfpower ss WHERE ss.power_name = 'SSH密钥' AND ss.parent_id <> ''), '修改密钥', NULL ); INSERT INTO `sys_selfpower` (`power_id`,`power_name`,`power_url`,`power_route`,`power_sort`,`parent_id`,`power_desc`,`power_icon`) VALUES ( REPLACE (uuid(), '-', ''), '密钥列表', NULL, 'secretkey_list', (SELECT ss.power_sort FROM sys_selfpower ss WHERE ss.power_name = 'SSH密钥' AND ss.parent_id <> '')+12, (SELECT ss.power_id FROM sys_selfpower ss WHERE ss.power_name = 'SSH密钥' AND ss.parent_id <> ''), '密钥列表', NULL ); INSERT INTO `sys_selfpower` (`power_id`,`power_name`,`power_url`,`power_route`,`power_sort`,`parent_id`,`power_desc`,`power_icon`) VALUES ( REPLACE (uuid(), '-', ''), '密钥详情', NULL, 'secretkey_details', (SELECT ss.power_sort FROM sys_selfpower ss WHERE ss.power_name = 'SSH密钥' AND ss.parent_id <> '')+13, (SELECT ss.power_id FROM sys_selfpower ss WHERE ss.power_name = 'SSH密钥' AND ss.parent_id <> ''), '密钥详情', NULL ); INSERT INTO `sys_selfpower` (`power_id`,`power_name`,`power_url`,`power_route`,`power_sort`,`parent_id`,`power_desc`,`power_icon`) VALUES ( REPLACE (uuid(), '-', ''), '密钥绑定', NULL, 'secretkey_bind', (SELECT ss.power_sort FROM sys_selfpower ss WHERE ss.power_name = 'SSH密钥' AND ss.parent_id <> '')+14, (SELECT ss.power_id FROM sys_selfpower ss WHERE ss.power_name = 'SSH密钥' AND ss.parent_id <> ''), '密钥绑定', NULL ); INSERT INTO `sys_selfpower` (`power_id`,`power_name`,`power_url`,`power_route`,`power_sort`,`parent_id`,`power_desc`,`power_icon`) VALUES ( REPLACE (uuid(), '-', ''), '密钥解绑', NULL, 'secretkey_unbind', (SELECT ss.power_sort FROM sys_selfpower ss WHERE ss.power_name = 'SSH密钥' AND ss.parent_id <> '')+15, (SELECT ss.power_id FROM sys_selfpower ss WHERE ss.power_name = 'SSH密钥' AND ss.parent_id <> ''), '密钥解绑', NULL ); INSERT INTO `sys_selfpower` (`power_id`,`power_name`,`power_url`,`power_route`,`power_sort`,`parent_id`,`power_desc`,`power_icon`) VALUES ( REPLACE (uuid(), '-', ''), '删除密钥', NULL, 'secretkey_delete', (SELECT ss.power_sort FROM sys_selfpower ss WHERE ss.power_name = 'SSH密钥' AND ss.parent_id <> '')+16, (SELECT ss.power_id FROM sys_selfpower ss WHERE ss.power_name = 'SSH密钥' AND ss.parent_id <> ''), '删除密钥', NULL ); -- 增加权限-角色关系 INSERT INTO sys_selfrolepower ( rp_id, role_id, power_id, rp_state )( SELECT REPLACE (uuid(), '-', '') AS rp_id, r.role_id AS role_id, p.power_id AS power_id, '1' AS rp_state FROM sys_selfrole r, sys_selfpower p WHERE r.role_name = '超级管理员' AND p.power_route IN ('secretkey_add','secretkey_update','secretkey_list','secretkey_details','secretkey_bind','secretkey_unbind','secretkey_delete') ); INSERT INTO sys_selfrolepower ( rp_id, role_id, power_id, rp_state )( SELECT REPLACE (uuid(), '-', '') AS rp_id, r.role_id AS role_id, p.power_id AS power_id, '1' AS rp_state FROM sys_selfrole r, sys_selfpower p WHERE r.role_name = '管理员' AND p.power_route IN ('secretkey_add','secretkey_update','secretkey_list','secretkey_details','secretkey_bind','secretkey_unbind','secretkey_delete') ); INSERT INTO sys_selfrolepower ( rp_id, role_id, power_id, rp_state )( SELECT REPLACE (uuid(), '-', '') AS rp_id, r.role_id AS role_id, p.power_id AS power_id, '1' AS rp_state FROM sys_selfrole r, sys_selfpower p WHERE r.role_name = '普通用户' AND p.power_route IN ('secretkey_list','secretkey_details') );
true
576353fffabcc6fe48ef8a1ff50164f70c85499f
SQL
Rashikaguna/restaurantapp
/foodorderingsystem/3.stock_view.sql
UTF-8
458
3.875
4
[]
no_license
/* create view to view stocks*/ CREATE VIEW view_stockdetails AS SELECT foodtype.meal,food.food_name,(food_stocks.quantity-SUM(food_transaction.quantity)) AS remaining FROM food JOIN food_stocks ON food.id=food_stocks.foodid JOIN foodtype ON food_stocks.mealid=foodtype.id JOIN food_transaction ON food_stocks.foodid=food_transaction.food_id WHERE DATE(date_of_order)=CURDATE() GROUP BY food_transaction.food_id; SELECT * FROM view_stockdetails;
true
608f64459c401d34c2a16c2db920086973355be7
SQL
akrommusajid/dynamic-inventory
/database/hostgroups.sql
UTF-8
1,966
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Aug 18, 2017 at 09:41 PM -- Server version: 10.0.29-MariaDB-0ubuntu0.16.04.1 -- PHP Version: 7.0.18-0ubuntu0.16.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `netdatanms` -- -- -------------------------------------------------------- -- -- Table structure for table `hostgroups` -- CREATE TABLE `hostgroups` ( `hg_id` int(11) NOT NULL, `host_id` int(11) NOT NULL, `group_id` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `hostgroups` -- INSERT INTO `hostgroups` (`hg_id`, `host_id`, `group_id`) VALUES (7, 7, 5), (8, 8, 3), (9, 9, 3), (10, 10, 3), (11, 11, 4); -- -- Indexes for dumped tables -- -- -- Indexes for table `hostgroups` -- ALTER TABLE `hostgroups` ADD PRIMARY KEY (`hg_id`), ADD UNIQUE KEY `host_id` (`host_id`,`group_id`), ADD KEY `hostgroups_host_id` (`host_id`), ADD KEY `hostgroups_group_id` (`group_id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `hostgroups` -- ALTER TABLE `hostgroups` MODIFY `hg_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12; -- -- Constraints for dumped tables -- -- -- Constraints for table `hostgroups` -- ALTER TABLE `hostgroups` ADD CONSTRAINT `hostgroups_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `host_sdn` (`host_id`), ADD CONSTRAINT `hostgroups_ibfk_2` FOREIGN KEY (`group_id`) REFERENCES `group_sdn` (`group_id`); /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
true
cf842a7a54951d5a89551535e7ee7c87d69fcc1f
SQL
CUBRID/cubrid-testcases
/sql/_13_issues/_12_1h/cases/bug_bts_6591.sql
UTF-8
1,356
3.453125
3
[ "BSD-3-Clause" ]
permissive
select TRIM('foo' FROM 'foo'), TRIM('foo' FROM 'foook'), TRIM('foo' FROM 'okfoo'); select TRIM('fo' FROM 'aasdfoo'); select trim('/' from '/abcd//\/'); select trim(both '/' from '/abcd//\/'); select trim(leading '/' from '/abcd//\/'); select trim(trailing '/' from '/abcd//\/'); --insert create table foo(a varchar); insert into foo values(trim('/' from '/abcd//\/')); prepare st from 'insert into foo values (trim(? from ?));'; execute st using '/', '/abcd//\/'; deallocate prepare st; --error prepare st from 'insert into foo values (?);'; execute st using trim('/' from '/abcd//\/'); deallocate prepare st; select case when count(*)=2 then 'ok' else 'nok' end from foo where a='abcd//\'; --update update foo set a=trim('\' from a); select if(a='abcd//', 'ok', 'nok') from foo; prepare st from 'update foo set a=trim(? from ?)'; execute st using ' abc ', ' abc abcabcabcabc abc '; deallocate prepare st; select if(a=' abcabcabcabc ', 'ok', 'nok') from foo; update foo set a=trim(leading ' ' from a); select if(a='abcabcabcabc ', 'ok', 'nok') from foo; update foo set a=trim(trailing ' ' from a); select if(a='abcabcabcabc', 'ok', 'nok') from foo; --where clause prepare st from 'delete from foo where trim(? from a)=?;'; execute st using 'abc', ''; deallocate prepare st; select if(count(*)=0, 'ok', 'nok') from foo; drop table foo;
true
cd6f4c42794416857f4eda1c81fb83f8c8bc5ec1
SQL
mklv13/C-Sharp-DB-SoftUni
/MSSQL/06. Indices and Data Aggregation/3rd Highest Salary.sql
UTF-8
363
4.125
4
[]
no_license
USE SoftUni SELECT DepartmentID, MaxSalary FROM (SELECT e.DepartmentID, MAX(e.Salary) AS MaxSalary, DENSE_RANK() OVER (PARTITION BY DepartmentID ORDER BY e.Salary DESC) AS SalaryRank FROM Employees as e GROUP BY e.DepartmentID, e.Salary) AS SalaryRankingQuery WHERE SalaryRankingQuery.SalaryRank = 3
true
52380cbb7b4b82dee2019848715ab0a688524eca
SQL
andymush/portal
/db/power.sql
UTF-8
7,464
2.890625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 14, 2019 at 01:04 PM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.3.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `power` -- -- -------------------------------------------------------- -- -- Table structure for table `admin` -- CREATE TABLE `admin` ( `id` int(10) NOT NULL, `username` varchar(100) NOT NULL, `password` varchar(100) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `admin` -- INSERT INTO `admin` (`id`, `username`, `password`) VALUES (1, 'admin', 'admin'), (2, 'andrew', 'andy'); -- -------------------------------------------------------- -- -- Table structure for table `contactus` -- CREATE TABLE `contactus` ( `id` int(10) NOT NULL, `fname` varchar(100) NOT NULL, `email` varchar(100) NOT NULL, `message` varchar(100) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `contactus` -- INSERT INTO `contactus` (`id`, `fname`, `email`, `message`) VALUES (5, 'Joyce Wakesho', 'mwamodenyi@gmail.com', 'Thank you for your services'); -- -------------------------------------------------------- -- -- Table structure for table `grid` -- CREATE TABLE `grid` ( `id` int(11) NOT NULL, `username` varchar(100) NOT NULL, `location` varchar(100) NOT NULL, `issue` varchar(100) NOT NULL, `comment` varchar(100) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `grid` -- INSERT INTO `grid` (`id`, `username`, `location`, `issue`, `comment`) VALUES (5, 'Mary', 'Karatina', 'My house almost burned due to the excessive currents that came back after a blackout.', ''), (6, 'Garigo', 'Mombasa', 'I cant stand the frequent', ''); -- -------------------------------------------------------- -- -- Table structure for table `idea` -- CREATE TABLE `idea` ( `id` int(11) NOT NULL, `myname` varchar(100) NOT NULL, `idea` varchar(1000) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `idea` -- INSERT INTO `idea` (`id`, `myname`, `idea`) VALUES (3, 'Andrew', 'white poles'), (4, 'Faith Njeri', 'Payable electricity bills'), (5, 'Maingi James', 'Short poles'), (6, 'Fred', 'Juja boys are bad.'); -- -------------------------------------------------------- -- -- Table structure for table `ideacom` -- CREATE TABLE `ideacom` ( `id` int(11) NOT NULL, `username` varchar(100) NOT NULL, `idno` int(10) NOT NULL, `comment` varchar(100) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `ideacom` -- INSERT INTO `ideacom` (`id`, `username`, `idno`, `comment`) VALUES (1, 'KAmau', 4, 'Contemplate'); -- -------------------------------------------------------- -- -- Table structure for table `issuecom` -- CREATE TABLE `issuecom` ( `id` int(11) NOT NULL, `username` varchar(100) NOT NULL, `idno` int(11) NOT NULL, `comment` varchar(100) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `issuecom` -- INSERT INTO `issuecom` (`id`, `username`, `idno`, `comment`) VALUES (1, 'Moses', 0, 'most unlikely to happen again'), (2, 'Jane', 1, 'I am very sorry'), (3, 'Dan', 4, 'qwerty'); -- -------------------------------------------------------- -- -- Table structure for table `messcom` -- CREATE TABLE `messcom` ( `id` int(11) NOT NULL, `username` varchar(100) NOT NULL, `idno` int(10) NOT NULL, `comment` varchar(100) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `messcom` -- INSERT INTO `messcom` (`id`, `username`, `idno`, `comment`) VALUES (1, 'Adrian', 0, 'Oh my gosh'), (2, 'Morris', 5, 'Good job supporting us'); -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE `users` ( `id` int(11) NOT NULL, `uname` varchar(100) NOT NULL, `email` varchar(100) NOT NULL, `password` varchar(100) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `users` -- INSERT INTO `users` (`id`, `uname`, `email`, `password`) VALUES (1, 'andrew', 'andy@gmail.com', 'andrew'), (2, 'user', 'user@gmail.com', 'user'), (3, 'Dan', 'Dan@gmail.com', 'dan'), (4, 'Dan', 'Dan@gmail.com', 'mwangi'), (5, 'Kevo', 'kevo@gmail.com', 'kevin'), (6, 'Kevo', 'kevo@gmail.com', 'kevin'), (7, 'Kevo', 'kevo@gmail.com', 'kevin'), (8, 'jojojo', 'joj@gmail.com', 'jojo'), (9, 'Kiki', 'kama@gmail.com', 'kiki'), (10, 'Kiki', 'kama@gmail.com', 'kiki'), (11, 'Kiki', 'kama@gmail.com', 'kiki'), (12, 'uhiub', 'gokaka@gmail.com', 'koko'), (13, 'jojojo', 'joj@gmail.com', 'jojo'), (14, 'koko', 'kama@gmail.com', 'koko'), (15, 'gogo', 'gokaka@gmail.com', 'guigu'), (16, 'jane', 'jane@gmail.com', 'jane'), (17, 'lere', 'jkas@gmail.com', '1234'), (18, 'Makau', 'makau@gmail.com', 'makau'), (19, 'Makau', 'makau@gmail.com', 'makau'), (20, 'Makau', 'makau@gmail.com', 'makau'), (21, 'Makau', 'makau@gmail.com', 'makau'), (22, 'Wakesho', 'wake@gmail.com', 'wakesho'), (23, 'Wakesho', 'wake@gmail.com', 'wakesho'), (24, 'Wakesho', 'wake@gmail.com', 'wakesho'), (25, 'Wakesho', 'wake@gmail.com', 'wakesho'), (26, 'Wakesho', 'wake@gmail.com', 'wakesho'), (27, 'Wakesho', 'wake@gmail.com', 'wakesho'), (28, '', '', ''), (29, 'Dan', 'mwangi@gmail.com', 'dan'), (30, 'Dan', 'Dan@gmail.com', 'dan'), (31, 'Dan', 'mwangi@gmail.com', 'dan'); -- -- Indexes for dumped tables -- -- -- Indexes for table `admin` -- ALTER TABLE `admin` ADD PRIMARY KEY (`id`); -- -- Indexes for table `contactus` -- ALTER TABLE `contactus` ADD PRIMARY KEY (`id`); -- -- Indexes for table `grid` -- ALTER TABLE `grid` ADD PRIMARY KEY (`id`); -- -- Indexes for table `idea` -- ALTER TABLE `idea` ADD PRIMARY KEY (`id`); -- -- Indexes for table `ideacom` -- ALTER TABLE `ideacom` ADD PRIMARY KEY (`id`); -- -- Indexes for table `issuecom` -- ALTER TABLE `issuecom` ADD PRIMARY KEY (`id`); -- -- Indexes for table `messcom` -- ALTER TABLE `messcom` ADD PRIMARY KEY (`id`); -- -- Indexes for table `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `admin` -- ALTER TABLE `admin` MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `contactus` -- ALTER TABLE `contactus` MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; -- -- AUTO_INCREMENT for table `grid` -- ALTER TABLE `grid` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; -- -- AUTO_INCREMENT for table `idea` -- ALTER TABLE `idea` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; -- -- AUTO_INCREMENT for table `ideacom` -- ALTER TABLE `ideacom` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `issuecom` -- ALTER TABLE `issuecom` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- -- AUTO_INCREMENT for table `messcom` -- ALTER TABLE `messcom` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `users` -- ALTER TABLE `users` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=32; COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
true
2ff898f0c60e15a56ad94b2eaba909eb5aaad0de
SQL
JaimeVilches87/employee-tracker
/db/seeds.sql
UTF-8
759
3.390625
3
[]
no_license
use employees; INSERT INTO department (name) VALUES ('Executive'), ('Engineering'), ('Sales'), ('HR'); INSERT INTO role (title, salary, department_id) VALUES ('Sales', 20000, 1), ('Accountant', 4000, 1), ('Lead Engineer', 80000, 2), ('HR Rep', 90000, 2), ('Account Manager', 20000, 3), ('Janitor', 75000, 3), ('Assistant Manager', 10000, 4), ('General Manager', 24000, 4); INSERT INTO employee (first_name, last_name, role_id, manager_id) VALUES ('Joe', 'Shmow', 1, NULL), ('Julio', 'Cachay', 2, NULL), ('Melissa', 'Suarez', 3, NULL), ('Ant', 'Colon', 4, 3), ('Billy', 'Moreno', 5, 2), ('Jupiter', 'Mendoza', 6, 5), ('Kathy', 'Sung', 7, 1), ('Tiff', 'Pickles', 8, 7);
true
9da7a70df21fbffca2b7cb791da423a6e93d842a
SQL
j7ng/CLFY_SA
/SA/Tables/TABLE_INV_LOCATN.sql
UTF-8
3,781
3.140625
3
[]
no_license
CREATE TABLE sa.table_inv_locatn ( objid NUMBER, location_name VARCHAR2(40 BYTE), location_descr VARCHAR2(80 BYTE), reports_to_loc VARCHAR2(20 BYTE), gl_acct_no VARCHAR2(20 BYTE), owner_type NUMBER, inv_type NUMBER, location_type VARCHAR2(20 BYTE), trans_auth NUMBER, loc_serv_level VARCHAR2(8 BYTE), loc_turn_ratio VARCHAR2(8 BYTE), "ACTIVE" NUMBER, default_location NUMBER, d_good_qty NUMBER, d_bad_qty NUMBER, inv_class NUMBER, dev NUMBER, inv_locatn2site NUMBER, inv_locatn2parent_loc NUMBER, gl_locatn2parent_gl NUMBER ); ALTER TABLE sa.table_inv_locatn ADD SUPPLEMENTAL LOG GROUP dmtsora1704316282_0 ("ACTIVE", default_location, dev, d_bad_qty, d_good_qty, gl_acct_no, gl_locatn2parent_gl, inv_class, inv_locatn2parent_loc, inv_locatn2site, inv_type, location_descr, location_name, location_type, loc_serv_level, loc_turn_ratio, objid, owner_type, reports_to_loc, trans_auth) ALWAYS; COMMENT ON TABLE sa.table_inv_locatn IS 'A physical inventory location or a general ledger account'; COMMENT ON COLUMN sa.table_inv_locatn.objid IS 'Internal record number'; COMMENT ON COLUMN sa.table_inv_locatn.location_name IS 'For physical inventory locations, the name of the location. For GL accounts, the account number'; COMMENT ON COLUMN sa.table_inv_locatn.location_descr IS 'Description of the inventory location or GL account'; COMMENT ON COLUMN sa.table_inv_locatn.reports_to_loc IS 'The name of the parent inventory location. Note: as of CFO99, this field is no longer set by default Clarify code. CFO99 supports multiple rollups'; COMMENT ON COLUMN sa.table_inv_locatn.gl_acct_no IS 'If the object is a physical location, the GL account number. If a GL account, the field is either empty, or contains the parent GL account number'; COMMENT ON COLUMN sa.table_inv_locatn.owner_type IS 'Reserved; future'; COMMENT ON COLUMN sa.table_inv_locatn.inv_type IS 'User-assigned inventory type; defaults to inv_class'; COMMENT ON COLUMN sa.table_inv_locatn.location_type IS 'User-defined types of inventory location'; COMMENT ON COLUMN sa.table_inv_locatn.trans_auth IS 'States the type of transactions authorized for the inventory location; i.e., 0=All, 1=None, 2=Authorized Parts only. An authorized part is one for which there is a part_auth object'; COMMENT ON COLUMN sa.table_inv_locatn.loc_serv_level IS 'Reserved; future'; COMMENT ON COLUMN sa.table_inv_locatn.loc_turn_ratio IS 'Reserved; future'; COMMENT ON COLUMN sa.table_inv_locatn."ACTIVE" IS 'Indicates whether the inventory location is active; i.e., 0=inactive, 1=active, default=1'; COMMENT ON COLUMN sa.table_inv_locatn.default_location IS 'Indicates whether the object is the default inventory location for a site; i.e, 0=not default 1=default'; COMMENT ON COLUMN sa.table_inv_locatn.d_good_qty IS 'Display-only field. Used at run time by views which display good part quantity information. No data is stored in the field'; COMMENT ON COLUMN sa.table_inv_locatn.d_bad_qty IS 'Display-only field. Used at run time by views which display bad part quantity information. No data is stored in the field'; COMMENT ON COLUMN sa.table_inv_locatn.inv_class IS 'Inventory class; i.e., 0=inventory location, 1=capital GL account, 2=expense GL account'; COMMENT ON COLUMN sa.table_inv_locatn.dev IS 'Row version number for mobile distribution purposes'; COMMENT ON COLUMN sa.table_inv_locatn.inv_locatn2site IS 'Reserved; not used. Replaced by relation to inv_role'; COMMENT ON COLUMN sa.table_inv_locatn.inv_locatn2parent_loc IS 'For inventory locations, the parent inventory location. Reserved; obsolete-replaced by loc_rol_itm'; COMMENT ON COLUMN sa.table_inv_locatn.gl_locatn2parent_gl IS 'For locations or GL accounts, its related GL account';
true
a611c7598a997119ebc0cd7286d1dda96eabc427
SQL
pulliam/persephone
/unit_b/w07/d02/classwork/domain_modeling/hogwarts_schema.sql
UTF-8
321
2.734375
3
[]
no_license
DROP TABLE IF EXISTS wizards; DROP TABLE IF EXISTS spells; DROP TABLE IF EXISTS spells_wizards; CREATE TABLE wizards ( id INTEGER PRIMARY KEY, name VARCHAR ); CREATE TABLE spells ( id INTEGER PRIMARY KEY, name VARCHAR, is_deadly BOOLEAN ); CREATE TABLE spells_wizards ( spell_id INTEGER, wizard_id INTEGER );
true
6ddbd81a9a231fa60ecc82fc726f232321b54cbf
SQL
VijayMVC/JCC-Data-Warehouse
/SQLDB/dbo/Views/AA_REP_POP_BATCHED_ORDERS_VIEW.sql
UTF-8
1,053
2.875
3
[]
no_license
CREATE VIEW AA_REP_POP_BATCHED_ORDERS_VIEW /* ** Written: 16/01/2006 RV ** Last Amended: ** Comments: returns batched purchase orders for self audit crystal reports */ AS SELECT POP_DETAIL.POD_ORDER_NO, POP_DETAIL.POD_DATE, POP_DETAIL.POD_ACCOUNT, POP_DETAIL.POD_TYPE, POP_DETAIL.POD_ORDER_REF, POP_DETAIL.POD_ANALYSIS, POP_DETAIL.POD_STOCK_CODE, POP_DETAIL.POD_PRICE_CODE, POP_DETAIL.POD_NETT, POP_DETAIL.POD_ENTRY_TYPE, POP_DETAIL.POD_QTYORD, POP_DETAIL.POD_QTYINVD, POP_DETAIL.POD_UNITCST, POP_HEADER.POH_STATUS, POP_HEADER.POH_PRIORITY, POP_HEADER.POH_BATCH_REF, POP_HEADER.POH_YEAR, POP_HEADER.POH_PERIOD, POP_HEADER.POH_SUB_LEDGER, PL_ACCOUNTS.SUNAME, 'ENGLISH ' As LANGUAGE_LINK FROM POP_HEADER INNER JOIN POP_DETAIL ON POP_HEADER.POH_ORDER_NUMBR = POP_DETAIL.POD_ORDER_NO INNER JOIN PL_ACCOUNTS ON POP_HEADER.POH_ACCOUNT = PL_ACCOUNTS.SUCODE WHERE (POP_HEADER.POH_STATUS < 2) AND (POP_HEADER.POH_PRIORITY < 3)
true
aeba9b03dc3b06063f6070313322a806b01c34da
SQL
fajarhq/weddings-API
/wedding.sql
UTF-8
5,082
2.9375
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : alldb Source Server Type : MySQL Source Server Version : 100413 Source Host : localhost:3306 Source Schema : wedding Target Server Type : MySQL Target Server Version : 100413 File Encoding : 65001 Date: 07/08/2020 09:20:19 */ SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for akad -- ---------------------------- DROP TABLE IF EXISTS `akad`; CREATE TABLE `akad` ( `id` int(4) NOT NULL AUTO_INCREMENT, `lokasi` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL, `tanggal` date NOT NULL, `jam` time(0) NOT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Compact; -- ---------------------------- -- Records of akad -- ---------------------------- INSERT INTO `akad` VALUES (1, 'ff', '2014-01-02', '06:28:00'); -- ---------------------------- -- Table structure for galery -- ---------------------------- DROP TABLE IF EXISTS `galery`; CREATE TABLE `galery` ( `id` int(11) NOT NULL AUTO_INCREMENT, `url` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 14 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of galery -- ---------------------------- INSERT INTO `galery` VALUES (2, 'dadf019a8ad50a94b0a0cb7642bced23.png'); INSERT INTO `galery` VALUES (12, '710af8d90a176b83c8ed1167b512357a.jpeg'); INSERT INTO `galery` VALUES (13, 'b510fab313b6988a9e25c918b4bb6550.png'); -- ---------------------------- -- Table structure for keluarga_pria -- ---------------------------- DROP TABLE IF EXISTS `keluarga_pria`; CREATE TABLE `keluarga_pria` ( `id` int(4) NOT NULL AUTO_INCREMENT, `ayah` varchar(20) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL, `ibu` varchar(20) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Compact; -- ---------------------------- -- Records of keluarga_pria -- ---------------------------- INSERT INTO `keluarga_pria` VALUES (1, 'Jony', 'Jane'); -- ---------------------------- -- Table structure for keluarga_wanita -- ---------------------------- DROP TABLE IF EXISTS `keluarga_wanita`; CREATE TABLE `keluarga_wanita` ( `id` int(4) NOT NULL AUTO_INCREMENT, `ayah` varchar(20) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL, `ibu` varchar(20) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Compact; -- ---------------------------- -- Records of keluarga_wanita -- ---------------------------- INSERT INTO `keluarga_wanita` VALUES (1, 'Jonyd', 'Doeee'); -- ---------------------------- -- Table structure for mempelai -- ---------------------------- DROP TABLE IF EXISTS `mempelai`; CREATE TABLE `mempelai` ( `id` int(4) NOT NULL AUTO_INCREMENT, `pria` varchar(20) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL, `wanita` varchar(20) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL, `story` longtext CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Compact; -- ---------------------------- -- Records of mempelai -- ---------------------------- INSERT INTO `mempelai` VALUES (1, 'Jhony', 'Jane', 'hello world'); -- ---------------------------- -- Table structure for resepsi -- ---------------------------- DROP TABLE IF EXISTS `resepsi`; CREATE TABLE `resepsi` ( `id` int(4) NOT NULL AUTO_INCREMENT, `lokasi` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL, `tanggal` date NOT NULL, `jam` time(0) NOT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Compact; -- ---------------------------- -- Records of resepsi -- ---------------------------- INSERT INTO `resepsi` VALUES (1, 'ff', '2014-01-02', '06:28:00'); -- ---------------------------- -- Table structure for ucapan_selamat -- ---------------------------- DROP TABLE IF EXISTS `ucapan_selamat`; CREATE TABLE `ucapan_selamat` ( `id` int(4) NOT NULL AUTO_INCREMENT, `user` varchar(20) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL, `ucapan` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Compact; -- ---------------------------- -- Records of ucapan_selamat -- ---------------------------- INSERT INTO `ucapan_selamat` VALUES (1, 'test', 'selamat'); SET FOREIGN_KEY_CHECKS = 1;
true
56aae0cc9ee30235cda891d64a3037b2d3483429
SQL
deoooo/airbyte-dbt-custom
/models/generated/airbyte_ctes/public/poke_pokemon_types_ab1.sql
UTF-8
720
2.984375
3
[]
no_license
{{ config(schema="_airbyte_public", tags=["nested-intermediate"]) }} -- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema {{ unnest_cte('poke_pokemon', 'poke_pokemon', adapter.quote('types')) }} select _airbyte_poke_pokemon_hashid, {{ json_extract_scalar(unnested_column_value(adapter.quote('types')), ['slot']) }} as slot, {{ json_extract(unnested_column_value(adapter.quote('types')), ['type']) }} as {{ adapter.quote('type') }}, _airbyte_emitted_at from {{ ref('poke_pokemon') }} {{ cross_join_unnest('poke_pokemon', adapter.quote('types')) }} where {{ adapter.quote('types') }} is not null -- types at poke_pokemon/types
true
d222a3d6ff20ca1fde43921b4949081305203d09
SQL
srawlins/Kuali-Coeus-3.1-DB-Scripts
/KC-RELEASE-3_0-CLEAN/oracle/kcrelease/datasql/PROTO_CORRESP_TEMPL.sql
UTF-8
929,813
2.78125
3
[]
no_license
TRUNCATE TABLE PROTO_CORRESP_TEMPL DROP STORAGE / INSERT INTO PROTO_CORRESP_TEMPL (COMMITTEE_ID,CORRESPONDENCE_TEMPLATE,FILE_NAME,OBJ_ID,PROTO_CORRESP_TEMPL_ID,PROTO_CORRESP_TYPE_CODE,UPDATE_TIMESTAMP,UPDATE_USER,VER_NBR) VALUES ('DEFAULT',EMPTY_CLOB(),'DEFAULT-1-ApprovalLetter.xsl','9CD01EA17C569DADE040DC0A1F8A714D',1,'1',TO_DATE( '20110221133453', 'YYYYMMDDHH24MISS' ),'KCRELEASE',1) / -- Length: 92478 -- Chunks: 24 DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 1 FOR UPDATE; buffer := '<?xml version="1.0" encoding="UTF-8"?> <!--Designed and generated by Altova StyleVision Enterprise Edition 2008 rel. 2 - see http://www.altova.com/stylevision for more information.--> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:n1="http://irb.mit.edu/irbnamespace" xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:output version="1.0" method="xml" encoding="UTF-8" indent="no"/> <xsl:param name="SV_OutputFormat" select="''PDF''"/> <xsl:variable name="XML" select="/"/> <xsl:variable name="fo:layout-master-set"> <fo:layout-master-set> <fo:simple-page-master master-name="default-page" page-height="11in" page-width="8.5in" margin-left="0.6in" margin-right="1.0in"> <fo:region-body margin-top="0.79in" margin-bottom="0.79in"/> <fo:region-before extent="0.79in"/> </fo:simple-page-master> </fo:layout-master-set> </xsl:variable> <xsl:template match="/"> <fo:root> <xsl:copy-of select="$fo:layout-master-set"/> <fo:page-sequence master-reference="default-page" initial-page-number="1" format="1"> <xsl:call-template name="headerall"/> <fo:flow flow-name="xsl-region-body"> <fo:block> <xsl:for-each select="$XML"> <fo:external-graphic> <xsl:attribute name="src"> <xsl:text>url(</xsl:text> <xsl:call-template name="double-backslash"> <xsl:with-param name="text"> <xsl:value-of select="string(&apos;/export/home/www/https/tomcat5.0.25/webapps/coeus/images/couhes_byline2.gif&apos;)"/> </xsl:with-param> <xsl:with-param name="text-length"> <xsl:value-of select="string-length(string(&apos;/export/home/www/https/tomcat5.0.25/webapps/coeus/images/couhes_byline2.gif&apos;))"/> </xsl:with-param> </xsl:call-template> <xsl:text>)</xsl:text> </xsl:attribute> </fo:external-graphic> <fo:block text-align="center"> <fo:leader leader-pattern="rule" rule-thickness="1" leader-length="100%" color="black"/> </fo:block> <fo:block/> <xsl:for-each select="n1:Correspondence"> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block font-family="Arial" font-size="10pt" margin="0pt"> <fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:table table-layout="fixed" width="100%" border-spacing="2pt"> <fo:table-column column-width="25%"/> <fo:table-column column-width="75%"/> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 1 FOR UPDATE; buffer := '<fo:table-body start-indent="0pt"> <fo:table-row> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <fo:inline font-size="10pt" font-weight="bold"> <xsl:text>To:</xsl:text> </fo:inline> <fo:inline font-size="10pt"> <xsl:text>&#160;&#160;&#160;&#160;&#160; </xsl:text> </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" display-align="center"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Investigator"> <xsl:if test="n1:PI_flag = &apos;true&apos;"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Firstname"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:for-each> <fo:inline font-size="10pt"> <xsl:text>&#160; </xsl:text> </fo:inline> <xsl:for-each select="n1:LastName"> <xsl:variable name="value-of-template"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 1 FOR UPDATE; buffer := ' <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:for-each> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block white-space="pre" white-space-collapse="false" margin="0pt"> <fo:block> <xsl:for-each select="n1:OfficeLocation"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-family="Arial" font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-family="Arial" font-size="10pt"> <xsl:copy-of select="$value-of-template"/> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 1 FOR UPDATE; buffer := ' </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:for-each> </fo:block> </fo:block> </xsl:for-each> </xsl:if> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <fo:inline font-size="10pt" font-weight="bold"> <xsl:text>From:</xsl:text> </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" display-align="center"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Submissions"> <xsl:for-each select="n1:CommitteeMember"> <xsl:if test="n1:CommitteeMemberRole/n1:MemberRoleDesc = &apos;Chair&apos;"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Firstname"> <xsl:if test="../../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 1 FOR UPDATE; buffer := 'fo:inline font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:if> </xsl:for-each> <fo:inline> <xsl:text>&#160;</xsl:text> </fo:inline> <xsl:for-each select="n1:LastName"> <xsl:if test="../../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> <fo:inline font-size="10pt"> <xsl:text>, Chair </xsl:text> </fo:inline> <fo:block> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 1 FOR UPDATE; buffer := ' <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Submissions"> <xsl:for-each select="n1:CommitteeMasterData"> <xsl:for-each select="n1:CommitteeName"> <xsl:if test="../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:block> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 1 FOR UPDATE; buffer := ' <fo:table-cell padding="2pt" display-align="before"> <fo:block> <fo:inline font-size="10pt" font-weight="bold"> <xsl:text>Date:</xsl:text> </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" display-align="center"> <fo:block> <xsl:for-each select="n1:CurrentDate"> <fo:inline font-size="10pt"> <xsl:value-of select="format-number(number(substring(string(string(.)), 6, 2)), ''00'')"/> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(string(.)), 9, 2)), ''00'')"/> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(string(string(.))), 1, 4)), ''0000'')"/> </fo:inline> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell padding="2pt" height="21" display-align="before"> <fo:block> <fo:inline font-size="10pt" font-weight="bold"> <xsl:text>Committee Action:</xsl:text> </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" height="21" display-align="center"> <fo:block> <xsl:choose> <xsl:when test="n1:Protocol/n1:Submissions/n1:SubmissionDetails/n1:SubmissionTypeCode = 102"> <fo:inline font-size="10pt" font-weight="bold"> <xsl:text>Amendment to Approved Protocol</xsl:text> </fo:inline> </xsl:when> <xsl:when test="n1:Protocol/n1:Submissions/n1:SubmissionDetails/n1:SubmissionTypeCode = 101"> <fo:inline font-size="10pt" font-weight="bold"> <xsl:text>Renewal</xsl:text> </fo:inline> </xsl:when> <xsl:oth'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 1 FOR UPDATE; buffer := 'erwise> <fo:inline font-size="10pt" font-weight="bold"> <xsl:text>Approval</xsl:text> </fo:inline> </xsl:otherwise> </xsl:choose> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <fo:inline font-size="10pt" font-weight="bold"> <xsl:text>Committee Action Date</xsl:text> </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" height="29" display-align="before"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Submissions"> <xsl:for-each select="n1:SubmissionDetails"> <xsl:for-each select="n1:ActionType"> <xsl:for-each select="n1:ActionDate"> <xsl:if test="../../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <fo:inline> <xsl:value-of select="format-number(number(substring(string(string(.)), 6, 2)), ''00'')"/> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(string(.)), 9, 2)), ''00'')"/> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(string(string(.))), 1, 4)), ''0000'')"/> </fo:inline> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 1 FOR UPDATE; buffer := ' <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:table table-layout="fixed" width="100%" border-spacing="2pt"> <fo:table-column column-width="25%"/> <fo:table-column column-width="75%"/> <fo:table-body start-indent="0pt"> <fo:table-row> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <fo:inline font-size="10pt" font-weight="bold"> <xsl:text>COUHES Protocol # </xsl:text> </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:ProtocolMasterData"> <xsl:for-each select="n1:ProtocolNumber"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 1 FOR UPDATE; buffer := ' </xsl:choose> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <fo:inline font-size="10pt" font-weight="bold"> <xsl:text>Study Title </xsl:text> </fo:inline> <fo:inline font-size="10pt"> <xsl:text>&#160;&#160;&#160; </xsl:text> </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:ProtocolMasterData"> <xsl:for-each select="n1:ProtocolTitle"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:for-each> </xsl:for-each> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 1 FOR UPDATE; buffer := ' </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <fo:inline font-size="10pt" font-weight="bold"> <xsl:text>Expiration Date </xsl:text> </fo:inline> <fo:inline font-size="10pt"> <xsl:text>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </xsl:text> </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:ProtocolMasterData"> <xsl:for-each select="n1:ExpirationDate"> <fo:inline> <xsl:value-of select="format-number(number(substring(string(string(.)), 6, 2)), ''00'')"/> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(string(.)), 9, 2)), ''00'')"/> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(string(string(.))), 1, 4)), ''0000'')"/> </fo:inline> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </fo:block> </fo:block> </fo:block> </fo:block> <xsl:choose> <xsl:when test="n1:Protocol/n1:Submissions/n1:CurrentSubmissionFlag = &apos;No&apos; and n1:Protocol/n1:Submissions/n1:SubmissionDetails/n1:SubmissionTypeCode = 102"> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>The amendment to the above-referenced protocol has been A'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 1 FOR UPDATE; buffer := 'PPROVED following full board review by the Committee on the Use of Humans as Experimental Subjects (COUHES).</xsl:text> </fo:inline> <fo:block/> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>If the research involves collaboration with another institution then the research cannot commence until COUHES receives written notification of approval from the collaborating institution&apos;s IRB</xsl:text> </fo:inline> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>.</xsl:text> </fo:inline> <fo:block/> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>It is the Principal Investigator&apos;s responsibility to obtain review and continued approval before the expiration date.&#160; Please allow sufficient time for continued approval.&#160; You may not continue any research activity beyond the expiration date without COUHES approval.&#160; Failure to receive approval for continuation before the expiration date will result in the automatic suspension of the approval of this protocol.&#160; Information collected following suspension is unapproved research and cannot be reported or published as research data.&#160; If you do not wish continued approval, please notify the Committee of the study termination.</xsl:text> </fo:inline> </xsl:when> <xsl:when test="n1:Protocol/n1:Submissions/n1:CurrentSubmissionFlag = &apos;No&apos; and n1:Protocol/n1:Submissions/n1:SubmissionDetails/n1:SubmissionTypeCode = 101"> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>The above-referenced protocol was given renewed approval following full board review by the Committee on the Use of Humans as Experimental Subjects (COUHES).</xsl:text> </fo:inline> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block font-family="Arial" font-size="10pt" margin="0pt"> <fo:block> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>If the research involves collaboration with another institution then the research cannot commence until COUHES receives written notification of approval from the collaborating institution&apos;s IRB.</xsl:text> </fo:inline> <fo:block/> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>It is the Principal Investigator&apos;s responsibility to obtain review and continued approval before the expiration date.&#160; You may not continue any research activity beyond the expiration date without approval by COUHES.&#160; Failure to renew your study before the expiration date will result in termination of the'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 1 FOR UPDATE; buffer := ' study and suspension of related research grants.</xsl:text> </fo:inline> </fo:block> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>T</xsl:text> </fo:inline> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>he above-referenced protocol has been APPROVED following Full Board Review by the Committee on the Use of Humans as Experimental Subjects (COUHES).&#160; </xsl:text> </fo:inline> <fo:block/> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>If the research involves collaboration with another institution then the research cannot commence until COUHES receives written notification of approval from the collaborating institution&apos;s IRB</xsl:text> </fo:inline> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>.</xsl:text> </fo:inline> <fo:block/> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>It is the Principal Investigator&apos;s responsibility to obtain review and continued approval before the expiration date.&#160; Please allow sufficient time for continued approval.&#160; You may not continue any research activity beyond the expiration date without COUHES approval.&#160; Failure to receive approval for continuation before the expiration date will result in the automatic suspension of the approval of this protocol.&#160; Information</xsl:text> </fo:inline> <fo:inline font-family="Arial" font-size="10pt" font-weight="bold"> <xsl:text>&#160;</xsl:text> </fo:inline> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>collected following suspension is unapproved research and cannot be reported or published as research data.&#160; If you do not wish continued approval, please notify the Committee of the study termination.</xsl:text> </fo:inline> </xsl:otherwise> </xsl:choose> <fo:block/> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>Adverse Events:&#160; Any serious or unexpected adverse event must be reported to COUHES within 48 hours.&#160; All other adverse events should be reported in writing within 10 working days. </xsl:text> </fo:inl'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 1 FOR UPDATE; buffer := 'ine> </fo:block> </fo:block> <fo:block/> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>Amendments:&#160; Any changes to the protocol that impact human subjects, including changes in experimental design, equipment, personnel or funding, must be approved by COUHES before they can be initiated. </xsl:text> </fo:inline> <fo:block/> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>Prospective new study personnel must, where applicable, complete training in human subjects research and in the HIPAA Privacy Rule before participating in the study.</xsl:text> </fo:inline> <fo:block/> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>You must maintain a research file for at least 3 years after completion of the study.&#160; This file should include all correspondence with COUHES, original signed consent forms, and study data.</xsl:text> </fo:inline> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 1 FOR UPDATE; buffer := ' <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:block> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 1 FOR UPDATE; buffer := ' <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:table table-layout="fixed" width="100%" border-spacing="2pt"> <fo:table-column column-width="31"/> <fo:table-column column-width="proportional-column-width(1)"/> <fo:table-body start-indent="0pt"> <fo:table-row> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <fo:inline font-family="Arial" font-size="10pt"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 1 FOR UPDATE; buffer := ' <xsl:text>cc:</xsl:text> </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" display-align="center"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>Tom Duff</xsl:text> </fo:inline> </fo:block> </fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Correspondent"> <xsl:if test="n1:TypeOfCorrespondent = &apos;CRC&apos;"> <xsl:for-each select="n1:Person"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 1 FOR UPDATE; buffer := ' <xsl:for-each select="n1:Fullname"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-family="Arial" font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-family="Arial" font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:for-each> </xsl:if> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 1 FOR UPDATE; buffer := ' </fo:table-row> </fo:table-body> </fo:table> </fo:block> </fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:inline font-size="10pt"> <xsl:text> </xsl:text> </fo:inline> </fo:block> </fo:block> </fo:block> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 1 FOR UPDATE; buffer := ' </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </xsl:for-each> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:blo'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 1 FOR UPDATE; buffer := 'ck> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 1 FOR UPDATE; buffer := ' </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block/> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 1 FOR UPDATE; buffer := ' </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </xsl:for-each> </fo:block> <fo:block id="SV_RefID_PageTotal"/> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> <xsl:template name="headerall"> <fo:static-content flow-name="xsl-region-before"> <fo:block> <xsl:for-each select="$XML"> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:table table-layout="fixed" width="100%" border-spacing="2pt"> <fo:table-column column-width="proportional-column-width(1)"/> <fo:table-column column-width="150"/> <fo:table-body start-indent="0pt"> <fo:table-row> <fo:table-cell padding="0" number-columns-spanned="2" height="30" display-align="center"> <fo:block/> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell font-size="smaller" padding="0" text-align="left" display-align="center"> <fo:block/> </fo:table-cell> <fo:table-cell font-size="smaller" padding="0" text-align="right" display-align="center"> <fo:block/> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell padding="0" number-columns-spanned="2" display-align="center"> <fo:block/> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </xsl:for-each> </fo:block> </fo:static-content> </xsl:template> <xsl:template name="double-backslash"> <xsl:param name="text"/> <xsl:param name="text-length"/> <xsl:variable name="text-after-bs" select="substring-after($text, ''\'')"/> <xsl:variable name="text-after-bs-length" select="string-length($text-after-bs)"/> <xsl:choose> <xsl:when test="$text-after-bs-length = 0"> <xsl:choose> <xsl:when test="substring($text, $text-length) = ''\''"> <xsl:value-of select="concat(substring($text,1,$text-length - 1), ''\\'')"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$text"/> </xsl:otherwise> </xsl:choose> </xsl:when> <'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 1 FOR UPDATE; buffer := 'xsl:otherwise> <xsl:value-of select="concat(substring($text,1,$text-length - $text-after-bs-length - 1), ''\\'')"/> <xsl:call-template name="double-backslash"> <xsl:with-param name="text" select="$text-after-bs"/> <xsl:with-param name="text-length" select="$text-after-bs-length"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:template> </xsl:stylesheet> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / INSERT INTO PROTO_CORRESP_TEMPL (COMMITTEE_ID,CORRESPONDENCE_TEMPLATE,FILE_NAME,OBJ_ID,PROTO_CORRESP_TEMPL_ID,PROTO_CORRESP_TYPE_CODE,UPDATE_TIMESTAMP,UPDATE_USER,VER_NBR) VALUES ('DEFAULT',EMPTY_CLOB(),'DEFAULT-10-ScheduleMinutes.xsl','9CD01EA17C579DADE040DC0A1F8A714D',2,'10',TO_DATE( '20110221133453', 'YYYYMMDDHH24MISS' ),'KCRELEASE',1) / -- Length: 41567 -- Chunks: 11 DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 2 FOR UPDATE; buffer := '<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:n1="http://irb.mit.edu/irbnamespace"> <xsl:key name="MinuteType" match="n1:Schedule/n1:Minutes" use="n1:EntrySortCode"/> <xsl:key name="ActionType" match="n1:Schedule/n1:Minutes" use="n1:ProtocolNumber"/> <xsl:key name="ReviewType" match="n1:Schedule/n1:ProtocolSubmission/n1:SubmissionDetails" use="n1:ProtocolReviewTypeCode"/> <xsl:variable name="fo:layout-master-set"> <fo:layout-master-set> <fo:simple-page-master master-name="default-page" page-height="11in" page-width="8.5in" margin-left="0.6in" margin-right="0.6in" font-size="12pt"> <fo:region-body margin-top="0.79in" margin-bottom="0.79in"/> </fo:simple-page-master> </fo:layout-master-set> </xsl:variable> <xsl:template match="/"> <fo:root> <xsl:copy-of select="$fo:layout-master-set"/> <fo:page-sequence master-reference="default-page" initial-page-number="1" format="1"> <fo:flow flow-name="xsl-region-body"> <fo:block font-size="10pt"> <fo:external-graphic space-before.optimum="4pt" space-after.optimum="4pt"> <xsl:attribute name="src">url(''<xsl:text disable-output-escaping="yes">http://localhost:8080/Coeus40/images/couhes_byline2.gif</xsl:text>'')</xsl:attribute> </fo:external-graphic> <fo:block color="black" space-before.optimum="-8pt"> <fo:leader leader-length="100%" leader-pattern="rule" rule-thickness="1pt"/> </fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:block font-weight="bold" font-size="12pt"> <fo:inline font-weight="bold"> Committe Minutes for </fo:inline> <xsl:for-each select="n1:Schedule"> <xsl:for-each select="n1:ScheduleMasterData"> <xsl:for-each select="n1:CommitteeName"> <xsl:apply-templates/> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block> <xsl:text>&#xA;</xsl:text> </fo:block> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="113pt"/> <fo:table-column/> <fo:table-body> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 2 FOR UPDATE; buffer := ' <fo:table-row> <fo:table-cell width="113pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block>Meeting Date:</fo:block> </fo:table-cell> <fo:table-cell padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <xsl:for-each select="n1:Schedule/n1:ScheduleMasterData"> <xsl:for-each select="n1:MeetingDate"> <xsl:value-of select="format-number(substring(., 6, 2), ''00'')"/> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(substring(., 9, 2), ''00'')"/> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(substring(., 1, 4), ''0000'')"/> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell width="113pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block>Meeting Time:</fo:block> </fo:table-cell> <fo:table-cell padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <xsl:for-each select="n1:Schedule/n1:ScheduleMasterData"> <xsl:for-each select="n1:StartTime"> <xsl:value-of select="format-number(substring(substring-before(., '':''), string-length(substring-before(., '':'')) - 1), ''00'')"/> <xsl:text>:</xsl:text> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 2 FOR UPDATE; buffer := ' <xsl:value-of select="format-number(substring-before(substring-after(., '':''), '':''), ''00'')"/> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell width="113pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block>Location:</fo:block> </fo:table-cell> <fo:table-cell padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <xsl:for-each select="n1:Schedule/n1:ScheduleMasterData"> <xsl:for-each select="n1:Place"> <xsl:apply-templates/> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline font-weight="bold"> Members Present </fo:inline> <xsl:for-each select="n1:Schedule"> <xsl:for-each select="n1:Attendents"> <xsl:if test="n1:PresentFlag =&apos;true&apos; and n1:AlternateFlag =&apos;false&apos; and n1:GuestFlag =&apos;false&apos;"> <fo:list-block provisional-distance-between-starts="7mm" provisional-label-separation="2mm" start-indent="2mm" space-before.optimum="4pt" space-after.optimum="4pt"> <xsl:for-each select="n1:AttendentName"> <fo:list-item> <fo:list-item-la'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 2 FOR UPDATE; buffer := 'bel end-indent="label-end()"> <fo:block font-family="Courier" font-size="15pt" line-height="14pt" padding-before="2pt">&#x2022;</fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block> <xsl:apply-templates /> </fo:block> </fo:list-item-body> </fo:list-item> </xsl:for-each> </fo:list-block> </xsl:if> </xsl:for-each> </xsl:for-each> <xsl:for-each select="n1:Schedule"> <xsl:for-each select="n1:Attendents"> <xsl:choose> <xsl:when test="n1:AlternateFlag =&apos;true&apos; and n1:PresentFlag =&apos;true&apos; and n1:GuestFlag =&apos;false&apos;"><fo:inline font-weight="bold"> Alternates</fo:inline><fo:list-block provisional-distance-between-starts="7mm" provisional-label-separation="2mm" start-indent="2mm" space-before.optimum="4pt" space-after.optimum="4pt"> <xsl:for-each select="n1:AttendentName"> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block font-family="Courier" font-size="15pt" line-height="14pt" padding-before="2pt">&#x2022;</fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block> <xsl:apply-templates /> </fo:block> </fo:list-item-body> </fo:list-item> </xsl:for-each> </fo:list-block> </xsl:when> <xsl:otherwise> <xsl:if test="n1:GuestFlag =&apos;true&apos; and n1:PresentFlag =&apos;true&apos; and n1:AlternateFlag =&apos;false&apos;"><fo:inline font-weight="bold"> Guests</fo:inline><fo:list-block provisional-distance-between-starts="7mm" provisional-label-separation="2mm" start-indent="2mm" space-before.optimum="4pt" space-after.optimum="4pt"> <xsl:for-each select="n1:AttendentName"> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block font-family="Courier" font-size="15pt" line-height="14pt" padding-before="2pt">&#x2022;</fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block> <xsl:apply-templates /> </fo:block> </fo:list-item-body> </fo:list-ite'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 2 FOR UPDATE; buffer := 'm> </xsl:for-each> </fo:list-block> </xsl:if> </xsl:otherwise> </xsl:choose> </xsl:for-each> <xsl:if test="n1:Attendents/n1:PresentFlag =&apos;false&apos;"><fo:inline font-weight="bold"> Absentees</fo:inline></xsl:if> <xsl:for-each select="n1:Attendents"> <xsl:if test="n1:GuestFlag =&apos;false&apos; and n1:AlternateFlag =&apos;false&apos; and n1:PresentFlag =&apos;false&apos;"> <fo:list-block provisional-distance-between-starts="7mm" provisional-label-separation="2mm" start-indent="2mm" space-before.optimum="4pt" space-after.optimum="4pt"> <xsl:for-each select="n1:AttendentName"> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block font-family="Courier" font-size="15pt" line-height="14pt" padding-before="2pt">&#x2022;</fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block> <xsl:apply-templates /> </fo:block> </fo:list-item-body> </fo:list-item> </xsl:for-each> </fo:list-block> </xsl:if> </xsl:for-each> </xsl:for-each> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <xsl:for-each select="n1:Schedule/n1:Minutes[generate-id(.)=generate-id(key(''MinuteType'',n1:EntrySortCode)[1])]"> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline font-weight="bold"> <xsl:value-of select="n1:EntryTypeDesc"/> </fo:inline> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <xsl:for-each select="key(''MinuteType'',n1:EntrySortCode)"> <xsl:sort select="n1:Schedule/n1:Minutes/n1:ProtocolNumber"/> <xsl:variable name="lastActionType" select="n1:ProtocolNumber"/> <xsl:if test="not(preceding-sibling::n1:Minutes[n1:ProtocolNumber=$lastActionType])"> <fo:block space-after="5pt"> <fo:inline font-style="italic" text-decoration="underline"> <xsl:value-of select="n1:ProtocolNumber"/> </fo:inline> </fo:block> <xsl:for-each select="n1:Minutes[n1:ProtocolNumber=$lastActionType]"> <xsl:value-of select="n1:MinuteEntry"/> </xsl:for-each> </xsl:if> <fo:block space-after="7pt" white-space-collapse="false" linefeed-treatment="preserve" white-space-treatment="preserve"> <fo:b'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 2 FOR UPDATE; buffer := 'lock> <xsl:value-of select="n1:MinuteEntry"/> </fo:block> </fo:block> </xsl:for-each> </xsl:for-each> <fo:block text-align="left" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:inline font-weight="bold" font-size="12pt">Protocols Submitted</fo:inline> </fo:block> </fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <xsl:for-each select="n1:Schedule/n1:ProtocolSubmission/n1:SubmissionDetails[generate-id(.)=generate-id(key (''ReviewType'',n1:ProtocolReviewTypeCode)[1])]"> <xsl:sort select="n1:ProtocolReviewTypeCode"/> <xsl:sort select="n1:SubmissionTypeCode"/> <fo:inline font-weight="bold"> <xsl:value-of select="concat(''Review Type: '',n1:ProtocolReviewTypeDesc)"/> </fo:inline> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:block start-indent="1em" end-indent="1em" text-align="left"> <xsl:for-each select="key(''ReviewType'',n1:ProtocolReviewTypeCode)"> <!-- case 893 - remove Withdrawn protocols --> <xsl:if test="n1:SubmissionStatusCode != 210"> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column/> <fo:table-body> <fo:table-row> <fo:table-cell display-align="before" width="70pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <fo:inline font-weight="bold"> <xsl:value-of select="concat(''Submission Type: '',n1:SubmissionTypeDesc)"/> </fo:inline> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="106pt"/> <fo:table-column column-width="97pt"/> <fo:table-column column-width="119pt"/> <fo:table-column column-width="151pt"/> <fo:table-body> <fo:table-row> <fo:table-cell display-align="before" width="106pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <fo:inline font-weight="bold">Protocol #</fo:inline> </fo:block> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 2 FOR UPDATE; buffer := ' </fo:table-cell> <fo:table-cell display-align="before" width="97pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <xsl:value-of select="n1:ProtocolNumber"/> </fo:block> </fo:table-cell> <fo:table-cell display-align="before" width="119pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <fo:inline font-weight="bold">Submission Status</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell display-align="before" width="151pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <xsl:value-of select="n1:SubmissionStatusDesc"/> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="109pt"/> <fo:table-column/> <fo:table-body> <fo:table-row> <fo:table-cell display-align="before" width="109pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <fo:inline font-weight="bold">Title</fo:inline>:</fo:block> </fo:table-cell> <fo:table-cell display-align="before" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <xsl:value-of select="../n1:ProtocolSummary/n1:ProtocolMasterData/n1:ProtocolTitle"/> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell display-align="before" width="109pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <fo:inline font-weight="bold">PI:</fo:inline> </fo:block> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 2 FOR UPDATE; buffer := ' </fo:table-cell> <fo:table-cell display-align="before" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <xsl:value-of select="../n1:ProtocolSummary/n1:Investigator/n1:Person/n1:Fullname[../../n1:PI_flag=&apos;true&apos; ]"/> </fo:block> </fo:table-cell> </fo:table-row> <!-- change on 7-15 - remove expiration date <fo:table-row> <fo:table-cell display-align="before" width="109pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <fo:inline font-weight="bold">Expiration Dt:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell display-align="before" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <xsl:if test="../n1:ProtocolSummary/n1:ProtocolMasterData/n1:ExpirationDate != ''null''"> <xsl:value-of select="format-number(substring(../n1:ProtocolSummary/n1:ProtocolMasterData/n1:ExpirationDate, 6, 2), ''00'')"/> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(substring(../n1:ProtocolSummary/n1:ProtocolMasterData/n1:ExpirationDate, 9, 2), ''00'')"/> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(substring(../n1:ProtocolSummary/n1:ProtocolMasterData/n1:ExpirationDate, 1, 4), ''0000'')"/> </xsl:if> </fo:block> </fo:table-cell> </fo:table-row> --> </fo:table-body> </fo:table> <xsl:if test="count(../n1:Minutes/n1:MinuteEntry) > 0"> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="200pt"/> <fo:table-column/> <fo:table-body> <fo:table-row> <fo:table-cell display-align="before" width="200pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <fo:inline font-weight="bold">Minute Entries</fo:inline> </fo:block'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 2 FOR UPDATE; buffer := '> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <xsl:for-each select="../n1:Minutes/n1:MinuteEntry"> <fo:block space-after="7pt" white-space-collapse="false" linefeed-treatment="preserve" white-space-treatment="preserve"> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="30pt"/> <fo:table-column column-width="393pt"/> <fo:table-body> <fo:table-row> <fo:table-cell display-align="before" width="30pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> </fo:block> </fo:table-cell> <fo:table-cell display-align="before" width="393pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <xsl:value-of select="."/> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </fo:block> </xsl:for-each> </xsl:if> <!--added july 14 to hide --> <xsl:if test="n1:VotingComments != ''null'' or n1:YesVote > 0 or n1:NoVote > 0"> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="109pt"/> <fo:table-column column-width="47pt"/> <fo:table-column/> <fo:table-column/> <fo:table-column/> <fo:table-column/> <fo:table-body> <fo:table-row> <fo:table-cell display-align="before" width="109pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <fo:inline font-weight="bold">Yes Votes:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell display-align="before" width="47pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start" border-style="solid" border-width="1'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 2 FOR UPDATE; buffer := 'pt" border-color="white"> <fo:block> <xsl:value-of select="n1:YesVote"/> </fo:block> </fo:table-cell> <fo:table-cell display-align="before" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <fo:inline font-weight="bold">No votes:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell display-align="before" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <xsl:value-of select="n1:NoVote"/> </fo:block> </fo:table-cell> <fo:table-cell display-align="before" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <fo:inline font-weight="bold">Abstainers:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell display-align="before" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <xsl:value-of select="n1:AbstainerCount"/> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell display-align="before" width="109pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <xsl:if test="n1:VotingComments != ''null''"> <fo:block> <fo:inline font-weight="bold">Voting Comments:</fo:inline> </fo:block> </xsl:if> </fo:block> </fo:table-cell> <fo:table-cell display-align="before" number-columns-spanned="5" width="66pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block space-after="1pt" white-space-collapse="false" linefeed-treatment="preserve" white-space-treatment="pre'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 2 FOR UPDATE; buffer := 'serve"> <xsl:if test="n1:VotingComments != ''null''"> <xsl:value-of select="n1:VotingComments"/> </xsl:if> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <!-- added july 14 --> </xsl:if> <fo:block> <fo:leader leader-pattern="rule" leader-length="80%"/> </fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <!-- case 893 - remove Withdrawn protocols --> </xsl:if> </xsl:for-each> </fo:block> </xsl:for-each> <fo:block> <xsl:text>&#xA;</xsl:text> </fo:block> </fo:block> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> </xsl:stylesheet> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / INSERT INTO PROTO_CORRESP_TEMPL (COMMITTEE_ID,CORRESPONDENCE_TEMPLATE,FILE_NAME,OBJ_ID,PROTO_CORRESP_TEMPL_ID,PROTO_CORRESP_TYPE_CODE,UPDATE_TIMESTAMP,UPDATE_USER,VER_NBR) VALUES ('DEFAULT',EMPTY_CLOB(),'DEFAULT-15-CommitteeRosterReport.xsl','9CD01EA17C589DADE040DC0A1F8A714D',3,'15',TO_DATE( '20110221133453', 'YYYYMMDDHH24MISS' ),'KCRELEASE',1) / -- Length: 51671 -- Chunks: 13 DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 3 FOR UPDATE; buffer := '<?xml version="1.0" encoding="UTF-8"?> <!--Designed and generated by Altova StyleVision Enterprise Edition 2008 rel. 2 - see http://www.altova.com/stylevision for more information.--> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:n1="http://irb.mit.edu/irbnamespace" xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:output version="1.0" method="xml" encoding="UTF-8" indent="no"/> <xsl:param name="SV_OutputFormat" select="''PDF''"/> <xsl:variable name="XML" select="/"/> <xsl:variable name="fo:layout-master-set"> <fo:layout-master-set> <fo:simple-page-master master-name="default-page" page-height="11in" page-width="8.5in" margin-left="0.6in" margin-right="0.6in"> <fo:region-body margin-top="0.89in" margin-bottom="0.79in"/> </fo:simple-page-master> </fo:layout-master-set> </xsl:variable> <xsl:template match="/"> <fo:root> <xsl:copy-of select="$fo:layout-master-set"/> <fo:page-sequence master-reference="default-page" initial-page-number="1" format="1"> <fo:flow flow-name="xsl-region-body"> <fo:block> <xsl:for-each select="$XML"> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:table table-layout="fixed" width="100%" border="solid 1pt gray" border-spacing="2pt"> <fo:table-column column-width="proportional-column-width(1)"/> <fo:table-body start-indent="0pt"> <fo:table-row> <fo:table-cell border="solid 1pt gray" padding="2pt" text-align="center" display-align="center"> <fo:block> <xsl:for-each select="n1:Committee"> <xsl:for-each select="n1:CommitteeMasterData"> <xsl:for-each select="n1:CommitteeName"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-weight="bold"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-weight="bold"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xs'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 3 FOR UPDATE; buffer := 'l:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:table table-layout="fixed" width="100%" border-spacing="2pt"> <fo:table-column column-width="141"/> <fo:table-column column-width="proportional-column-width(1)"/> <fo:table-body start-indent="0pt"> <fo:table-row> <fo:table-cell padding="2pt" display-align="center"> <fo:block> <fo:inline font-weight="bold"> <xsl:text>Home Unit</xsl:text> </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" display-align="center"> <fo:block> <xsl:for-each select="n1:Committee"> <xsl:for-each select="n1:CommitteeMasterData"> <xsl:for-each select="n1:HomeUnitName"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 3 FOR UPDATE; buffer := ' </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell padding="2pt" display-align="center"> <fo:block> <fo:inline font-weight="bold"> <xsl:text>Research Area</xsl:text> </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" display-align="center"> <fo:block> <xsl:for-each select="n1:Committee"> <xsl:for-each select="n1:ResearchArea"> <xsl:for-each select="n1:ResearchAreaDescription"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 3 FOR UPDATE; buffer := ' <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block ma'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 3 FOR UPDATE; buffer := 'rgin="0pt"> <fo:block> <fo:inline font-weight="bold" text-decoration="underline"> <xsl:text>Active Committee Members</xsl:text> </fo:inline> </fo:block> </fo:block> </fo:block> </fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <xsl:for-each select="n1:Committee"> <xsl:for-each select="n1:CommitteeMember"> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:table table-layout="fixed" width="100%" border-spacing="2pt"> <fo:table-column column-width="proportional-column-width(1)"/> <fo:table-body start-indent="0pt"> <fo:table-row> <fo:table-cell padding="2pt" display-align="center"> <fo:block> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Fullname"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 3 FOR UPDATE; buffer := ' <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-weight="bold"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-weight="bold"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell padding="2pt" display-align="center"> <fo:block> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:DirectoryTitle"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block> <xsl:copy-of select="$value-of-template"/> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 3 FOR UPDATE; buffer := ' </fo:block> </xsl:when> <xsl:otherwise> <fo:inline> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell padding="2pt" display-align="center"> <fo:block> <xsl:for-each select="n1:MemberType"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline> <xsl:copy-of select="$value-of-template"/> </fo:inline> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 3 FOR UPDATE; buffer := ' </xsl:otherwise> </xsl:choose> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell padding="2pt" display-align="center"> <fo:block> <xsl:for-each select="n1:CommitteeMemberRole"> <xsl:for-each select="n1:MemberRoleDesc"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 3 FOR UPDATE; buffer := ' </fo:table-body> </fo:table> </xsl:for-each> </xsl:for-each> </fo:block> </fo:block> </fo:block> </fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin-left="(100% - 100%) div 2" margin-right="(100% - 100%) div 2" margin="0pt"> <fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:table table-layout="fixed" width="100%" border="solid 1pt gray" border-spacing="2pt"> <fo:table-column column-width="proportional-column-width(1)"/> <fo:table-body start-indent="0pt"> <fo:table-row> <fo:table-cell border="solid 1pt gray" padding="2pt" text-align="left" display-align="center"> <fo:block> <fo:inline font-weight="bold"> <xsl:text'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 3 FOR UPDATE; buffer := '>Committee Schedule</xsl:text> </fo:inline> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border="solid 1pt gray" padding="2pt" display-align="center"> <fo:block> <xsl:for-each select="n1:Committee"> <xsl:for-each select="n1:Schedule"> <xsl:for-each select="n1:ScheduleMasterData"> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:table table-layout="fixed" width="100%" border-spacing="2pt"> <fo:table-column column-width="proportional-column-width(1)"/> <fo:table-column column-width="proportional-column-width(1)"/> <fo:table-body start-indent="0pt"> <fo:table-row> <fo:table-cell padding="2pt" display-align="center"> <fo:block> <xsl:for-each select="n1:Place"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 3 FOR UPDATE; buffer := ' <fo:block> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:for-each> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" display-align="center"> <fo:block> <xsl:for-each select="n1:ScheduledDate"> <fo:inline> <xsl:value-of select="format-number(number(substring(string(string(.)), 6, 2)), ''00'')"/> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(string(.)), 9, 2)), ''00'')"/> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(string(string(.))), 1, 4)), ''0000'')"/> </fo:inline> </xsl:for-each> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 3 FOR UPDATE; buffer := ' <fo:inline> <xsl:text>&#160;</xsl:text> </fo:inline> <xsl:for-each select="n1:ScheduledTime"> <fo:inline> <xsl:value-of select="format-number(number(substring(string(string(.)), 1, 2)), ''00'')"/> <xsl:text>:</xsl:text> <xsl:value-of select="format-number(number(substring(string(string(.)), 4, 2)), ''00'')"/> </fo:inline> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </xsl:for-each> </fo:block> <fo:block id="SV_RefID_PageTotal"/> </fo:flow> </fo:page-sequence> </fo:root> </xs'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 3 FOR UPDATE; buffer := 'l:template> <xsl:template match="n1:Committee"> <xsl:for-each select="n1:CommitteeMasterData"> <fo:inline> <xsl:text>Committee Id: </xsl:text> </fo:inline> <xsl:for-each select="n1:CommitteeId"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:for-each> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:inline> <xsl:text>Committee Name: </xsl:text> </fo:inline> <xsl:for-each select="n1:CommitteeName"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:for-each> </fo:block> </fo:block> </xsl:for-each> </xsl:template> <xsl:template name="double-backslash"> <xsl:param name="text"/> <xsl:param name="text-length"/> <xsl:variable name="text-after-bs" select="substring-after($text, ''\'')"/> <xsl:variable name="text-after-bs-length" select="string-length($text-after-bs)"/> <xsl:choose> <xsl:when test="$text-after-bs-length = 0"> <xsl:choose> <xsl:when test="substring($text, $text-length) = ''\''"> <xsl:value-of select="concat(substring($text,1,$text-length - 1), ''\\'')"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$text"/> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:value-of select="concat(substring($text,1,$text-length - $text-after-bs-length - 1), ''\\'')"/> <xsl:call-template name="double-backslash"> <xsl:with-param name="text" select="$text-after-bs"/> <xsl:with-param name="text-length" select="$text-after-bs-length"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:template> </xsl:stylesheet> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / INSERT INTO PROTO_CORRESP_TEMPL (COMMITTEE_ID,CORRESPONDENCE_TEMPLATE,FILE_NAME,OBJ_ID,PROTO_CORRESP_TEMPL_ID,PROTO_CORRESP_TYPE_CODE,UPDATE_TIMESTAMP,UPDATE_USER,VER_NBR) VALUES ('DEFAULT',EMPTY_CLOB(),'DEFAULT-16-WithdrawalNotice.xsl','9CD01EA17C599DADE040DC0A1F8A714D',4,'16',TO_DATE( '20110221133453', 'YYYYMMDDHH24MISS' ),'KCRELEASE',1) / -- Length: 29978 -- Chunks: 8 DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 4 FOR UPDATE; buffer := '<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:n1="http://irb.mit.edu/irbnamespace" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xsl:variable name="fo:layout-master-set"> <fo:layout-master-set> <fo:simple-page-master master-name="default-page" page-height="11in" page-width="8.5in" margin-left="0.6in" margin-right="1.0in"> <fo:region-body margin-top="0.79in" margin-bottom="0.79in" /> <fo:region-before extent="0.79in" /> </fo:simple-page-master> </fo:layout-master-set> </xsl:variable> <xsl:output version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="no" media-type="text/html" /> <xsl:template match="/"> <fo:root> <xsl:copy-of select="$fo:layout-master-set" /> <fo:page-sequence master-reference="default-page" initial-page-number="1" format="1"> <fo:static-content flow-name="xsl-region-before"> <fo:block> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column /> <fo:table-column column-width="150pt" /> <fo:table-body> <fo:table-row> <fo:table-cell padding-bottom="0pt" padding-left="0pt" padding-right="0pt" padding-top="0pt" border-style="solid" border-width="1pt" border-color="white" height="30pt" number-columns-spanned="2" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block /> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell font-size="inherited-property-value(&apos;font-size&apos;) - 2pt" padding-bottom="0pt" padding-left="0pt" padding-right="0pt" padding-top="0pt" border-style="solid" border-width="1pt" border-color="white" text-align="left" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center"> <fo:block /> </fo:table-cell> <fo:table-cell font-size="inherited-property-value(&apos;font-size&apos;) - 2pt" padding-bottom="0pt" padding-left="0pt" padding-right="0pt" padding-top="0pt" border-style="solid" border-width="1pt" border-color="white" text-align="right" width="150pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center"> <fo:block /> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell padding-bottom="0pt" padding-left="0pt" padding-right="0pt" padding-top="0pt" border-style="solid" border-width="1pt" border-color="white" number-columns-spanned="2" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block /> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </fo:block> </fo:static-content> <fo:flow flow-name="xsl-region-body"> <fo:block> <fo:external-graphic space-before.optimum="4pt" space-after.optimum="4pt"> <xsl:attribute name="src">url(''<xsl:text disable-output-escaping="yes">/export/home/www/https/tomcat5.0'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 4 FOR UPDATE; buffer := '.25/webapps/coeus/images/couhes_byline2.gif</xsl:text>'')</xsl:attribute> </fo:external-graphic> <fo:block color="black" space-before.optimum="-8pt"> <fo:leader leader-length="100%" leader-pattern="rule" rule-thickness="1pt" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <xsl:for-each select="n1:Correspondence"> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="127pt" /> <fo:table-column column-width="451pt" /> <fo:table-body> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="127pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">To:</fo:inline> <fo:inline font-size="10pt">&#160;&#160;&#160;&#160;&#160; </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="451pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Investigator"> <xsl:if test="n1:PI_flag = &apos;true&apos;"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Firstname"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> <fo:inline font-size="10pt">&#160;</fo:inline> <xsl:for-each select="n1:LastName"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> <fo:block white-space-collapse="false" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <xsl:for-each select="n1:OfficeLocation"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 4 FOR UPDATE; buffer := ' <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> </fo:block> </fo:block> </xsl:for-each> </xsl:if> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="127pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">From:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="451pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Submissions"> <xsl:if test="n1:CurrentSubmissionFlag =&apos;No&apos;"> <xsl:for-each select="n1:CommitteeMember"> <xsl:if test="n1:CommitteeMemberRole/n1:MemberRoleDesc = &apos;Chair&apos;"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Firstname"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> <fo:inline font-size="10pt">&#160;</fo:inline> <xsl:for-each select="n1:LastName"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> </xsl:for-each> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 4 FOR UPDATE; buffer := ' </xsl:if> </xsl:for-each> </xsl:if> </xsl:for-each> </xsl:for-each> <fo:inline font-size="10pt">, Chair </fo:inline> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Submissions"> <xsl:for-each select="n1:CommitteeMasterData"> <xsl:for-each select="n1:CommitteeName"> <xsl:if test="../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:block> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" height="19pt" width="127pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">Date:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" height="19pt" width="451pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <xsl:for-each select="n1:CurrentDate"> <fo:inline font-size="10pt"> <xsl:value-of select="format-number(number(substring(string(.), 6, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 9, 2)), ''00'')" /> <xsl:text>/</xsl:text> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 4 FOR UPDATE; buffer := ' <xsl:value-of select="format-number(number(substring(string(.), 1, 4)), ''0000'')" /> </fo:inline> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="127pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">Committee Action:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="451pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">Protocol Withdrawal</fo:inline> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block text-align="justify"> <fo:block> <xsl:text>&#xA;</xsl:text> </fo:block> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="127pt" /> <fo:table-column column-width="461pt" /> <fo:table-body> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="127pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">IRB Protocol #: </fo:inline> <fo:inline font-size="10pt">&#160;&#160;&#160; </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="461pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:ProtocolMasterData"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 4 FOR UPDATE; buffer := ' <xsl:for-each select="n1:ProtocolNumber"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="127pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">Study Title: </fo:inline> <fo:inline font-size="10pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="461pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:ProtocolMasterData"> <xsl:for-each select="n1:ProtocolTitle"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:block> <xsl:text>&#xA;</xsl:text> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 4 FOR UPDATE; buffer := ' <fo:block /> </fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block /> </fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:inline font-size="10pt">This message constitues notice that this protocol has been withdrawn from consideration effective on </fo:inline> <xsl:for-each select="n1:CurrentDate"> <fo:inline font-size="10pt"> <fo:inline font-size="10pt"> <xsl:value-of select="format-number(number(substring(string(.), 6, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 9, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 1, 4)), ''0000'')" /> </fo:inline> </fo:inline> </xsl:for-each> <fo:inline font-size="10pt">.&#160; If you wish to conduct this research in the future, you must submit a new application for review to the Committee on the Use of Humans as Experimental Subjects (COUHES).</fo:inline> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <xsl:text>&#xA;</xsl:text> </fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block /> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:l'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 4 FOR UPDATE; buffer := 'eader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:inline font-size="10pt"> </fo:inline> </fo:block> </fo:block> </xsl:for-each> </fo:block> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> </xsl:stylesheet> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / INSERT INTO PROTO_CORRESP_TEMPL (COMMITTEE_ID,CORRESPONDENCE_TEMPLATE,FILE_NAME,OBJ_ID,PROTO_CORRESP_TEMPL_ID,PROTO_CORRESP_TYPE_CODE,UPDATE_TIMESTAMP,UPDATE_USER,VER_NBR) VALUES ('DEFAULT',EMPTY_CLOB(),'DEFAULT-17-GrantExemptionNotice.xsl','9CD01EA17C5A9DADE040DC0A1F8A714D',5,'17',TO_DATE( '20110221133453', 'YYYYMMDDHH24MISS' ),'KCRELEASE',1) / -- Length: 43295 -- Chunks: 11 DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 5 FOR UPDATE; buffer := '<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:n1="http://irb.mit.edu/irbnamespace" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xsl:variable name="fo:layout-master-set"> <fo:layout-master-set> <fo:simple-page-master master-name="default-page" page-height="11in" page-width="8.5in" margin-left="0.6in" margin-right="0.6in"> <fo:region-body margin-top="0.79in" margin-bottom="0.79in" /> <fo:region-before extent="0.79in" /> </fo:simple-page-master> </fo:layout-master-set> </xsl:variable> <xsl:output version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="no" media-type="text/html" /> <xsl:template match="/"> <fo:root> <xsl:copy-of select="$fo:layout-master-set" /> <fo:page-sequence master-reference="default-page" initial-page-number="1" format="1"> <fo:static-content flow-name="xsl-region-before"> <fo:block> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column /> <fo:table-column column-width="150pt" /> <fo:table-body> <fo:table-row> <fo:table-cell padding-bottom="0pt" padding-left="0pt" padding-right="0pt" padding-top="0pt" border-style="solid" border-width="1pt" border-color="white" height="30pt" number-columns-spanned="2" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block /> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell font-size="inherited-property-value(&apos;font-size&apos;) - 2pt" padding-bottom="0pt" padding-left="0pt" padding-right="0pt" padding-top="0pt" border-style="solid" border-width="1pt" border-color="white" text-align="left" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center"> <fo:block /> </fo:table-cell> <fo:table-cell font-size="inherited-property-value(&apos;font-size&apos;) - 2pt" padding-bottom="0pt" padding-left="0pt" padding-right="0pt" padding-top="0pt" border-style="solid" border-width="1pt" border-color="white" text-align="right" width="150pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center"> <fo:block /> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell padding-bottom="0pt" padding-left="0pt" padding-right="0pt" padding-top="0pt" border-style="solid" border-width="1pt" border-color="white" number-columns-spanned="2" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block /> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </fo:block> </fo:static-content> <fo:flow flow-name="xsl-region-body"> <fo:block> <fo:external-graphic space-before.optimum="4pt" space-after.optimum="4pt"> <xsl:attribute name="src">url(''<xsl:text disable-output-escaping="yes">/export/home/www/https/tomcat5.0'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 5 FOR UPDATE; buffer := '.25/webapps/coeus/images/couhes_byline2.gif</xsl:text>'')</xsl:attribute> </fo:external-graphic> <fo:block color="black" space-before.optimum="-8pt"> <fo:leader leader-length="100%" leader-pattern="rule" rule-thickness="1pt" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <xsl:for-each select="n1:Correspondence"> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="proportional-column-width(24)" /> <fo:table-column column-width="proportional-column-width(76)" /> <fo:table-body> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="24%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">To:</fo:inline> <fo:inline font-size="10pt">&#160;&#160;&#160;&#160;&#160; </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="76%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Investigator"> <xsl:if test="n1:PI_flag = &apos;true&apos;"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Firstname"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> <fo:inline font-size="10pt">&#160;</fo:inline> <xsl:for-each select="n1:LastName"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> <fo:block white-space-collapse="false" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <xsl:for-each select="n1'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 5 FOR UPDATE; buffer := ':OfficeLocation"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> </fo:block> </fo:block> </xsl:for-each> </xsl:if> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="24%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">From:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="76%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Submissions"> <xsl:for-each select="n1:CommitteeMember"> <xsl:if test="n1:CommitteeMemberRole/n1:MemberRoleDesc = &apos;Chair&apos;"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Firstname"> <xsl:if test="../../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:if> </xsl:for-each> <fo:inline font-size="10pt">&#160;</fo:inline> <xsl:for-each select="n1:LastName"> <xsl:if test="../../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <fo:inline font-size="10pt"> <xsl:apply-templates /> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 5 FOR UPDATE; buffer := ' </fo:inline> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> <fo:inline font-size="10pt">, Chair </fo:inline> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Submissions"> <xsl:for-each select="n1:CommitteeMasterData"> <xsl:for-each select="n1:CommitteeName"> <xsl:if test="../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:block> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="24%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">Date:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell font-size="10pt" border-style="solid" border-width="1pt" border-color="white" width="76%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <xsl:for-each select="n1:CurrentDate"> <fo:inline font-size="8pt"> <xsl:value-of select="format-number(number(substring(string(.), 6, 2)), ''00'')" /> <xsl:text>/</xsl:text> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 5 FOR UPDATE; buffer := ' <xsl:value-of select="format-number(number(substring(string(.), 9, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 1, 4)), ''0000'')" /> </fo:inline> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="24%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">Committee Action:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="76%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">Exemption Granted</fo:inline> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block text-align="justify"> <fo:block> <xsl:text>&#xA;</xsl:text> </fo:block> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="proportional-column-width(24)" /> <fo:table-column column-width="proportional-column-width(76)" /> <fo:table-body> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="24%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">Committee Action Date:</fo:inline> <fo:inline font-size="10pt">&#160;&#160;&#160;&#160; </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell font-size="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" width="76%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 5 FOR UPDATE; buffer := ' <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Submissions"> <xsl:for-each select="n1:SubmissionDetails"> <xsl:for-each select="n1:ActionType"> <xsl:for-each select="n1:ActionDate"> <xsl:if test="../../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <xsl:value-of select="format-number(number(substring(string(.), 6, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 9, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 1, 4)), ''0000'')" /> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="24%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">COUHES Protocol #: </fo:inline> <fo:inline font-size="10pt">&#160;&#160;&#160; </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="76%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:ProtocolMasterData"> <xsl:for-each select="n1:ProtocolNumber"> <fo:inline font-size="10pt"> <xsl:apply-templates /> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 5 FOR UPDATE; buffer := ' </fo:inline> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="24%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">Study Title: </fo:inline> <fo:inline font-size="10pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="76%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:ProtocolMasterData"> <xsl:for-each select="n1:ProtocolTitle"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </fo:block> </fo:block> </fo:block> </fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:inline font-size="10pt">The above-referenced protocol is considered exempt after review by the Committee on the Use of Humans as Experimental Subjects pursuant to Federal regulations, 45 CFR Part 46.101(b)</fo:inline> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Submissions"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 5 FOR UPDATE; buffer := ' <xsl:for-each select="n1:SubmissionDetails"> <xsl:for-each select="n1:SubmissionChecklistInfo"> <xsl:for-each select="n1:ChecklistCodesFormatted"> <xsl:if test="../../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> <fo:inline font-size="10pt">.</fo:inline> <fo:block> <xsl:text>&#xA;</xsl:text> </fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block font-size="10pt"> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:inline font-size="10pt">This part of the federal regulations requires that the information be recorded by investigators in such a manner that subjects cannot be identified, directly or through identifiers linked to the subjects.&#160;&#160; It is necessary that the information obtained not be such that if disclosed outside the research, it could reasonably place the subjects at risk of criminal or civil liability, or be damaging to the subjects'' financial standing, employability, or reputation.</fo:inline> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block>If the research involves collaboration with another institution then the research cannot commence until COUHES receives written notification of approval from the collaborating institution&apos;s IRB.<fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block>If there are any changes to the protocol that significantly or substantially impact the rights of human subjects you must notify the Committee before those changes are initiated.<fo:block> <fo:leader leader-pattern="space" /> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 5 FOR UPDATE; buffer := ' </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:inline font-size="10pt">You should retain a copy of this letter for your records. </fo:inline> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block>&#160;&#160;&#160;&#160; <fo:inline font-size="10pt"></fo:inline> <fo:table text-align="left" width="50%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="437pt" /> <fo:table-column column-width="303pt" /> <fo:table-body> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="437pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <fo:table width="100pt" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="27pt" /> <fo:table-column column-width="452pt" /> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 5 FOR UPDATE; buffer := ' <fo:table-body> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" height="19pt" width="27pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <fo:inline font-size="10pt">cc:&#160;&#160; </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" height="19pt" width="452pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <fo:inline font-size="10pt">Tom Duff </fo:inline> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="27pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block /> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="452pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Correspondent"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Fullname"> <xsl:if test="../../n1:TypeOfCorrespondent = &apos;CRC&apos;"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 5 FOR UPDATE; buffer := ' </fo:table> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="303pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block /> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="437pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block /> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="303pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block /> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:inline font-size="10pt">&#160;&#160; </fo:inline> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:inline font-size="10pt"> </fo:inline> </xsl:for-each> </fo:block> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> </xsl:stylesheet> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / INSERT INTO PROTO_CORRESP_TEMPL (COMMITTEE_ID,CORRESPONDENCE_TEMPLATE,FILE_NAME,OBJ_ID,PROTO_CORRESP_TEMPL_ID,PROTO_CORRESP_TYPE_CODE,UPDATE_TIMESTAMP,UPDATE_USER,VER_NBR) VALUES ('DEFAULT',EMPTY_CLOB(),'DEFAULT-20-RenewalReminderLetter#1.xsl','9CD01EA17C5B9DADE040DC0A1F8A714D',6,'20',TO_DATE( '20110221133453', 'YYYYMMDDHH24MISS' ),'KCRELEASE',1) / -- Length: 22010 -- Chunks: 6 DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 6 FOR UPDATE; buffer := '<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:n1="http://irb.mit.edu/irbnamespace" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xsl:variable name="fo:layout-master-set"> <fo:layout-master-set> <fo:simple-page-master master-name="default-page" page-height="11in" page-width="8.5in" margin-left="0.8in" margin-right="0.8in"> <fo:region-body margin-top="0.45in" margin-bottom="0.45in" /> </fo:simple-page-master> </fo:layout-master-set> </xsl:variable> <xsl:output version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="no" media-type="text/html" /> <xsl:template match="/"> <fo:root> <xsl:copy-of select="$fo:layout-master-set" /> <fo:page-sequence master-reference="default-page" initial-page-number="1" format="1"> <fo:flow flow-name="xsl-region-body"> <fo:block> <xsl:for-each select="n1:RenewalReminder"> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="43pt" /> <fo:table-column column-width="281pt" /> <fo:table-column column-width="100pt" /> <fo:table-column column-width="99pt" /> <fo:table-body> <fo:table-row> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" height="15pt" number-columns-spanned="4" text-align="right" width="43pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt"> <fo:block> <fo:external-graphic space-before.optimum="4pt" space-after.optimum="4pt"> <xsl:attribute name="src">url(''<xsl:text disable-output-escaping="yes">/export/home/www/https/tomcat5.0.25/webapps/coeus/images/couhes_byline2.gif</xsl:text>'')</xsl:attribute> </fo:external-graphic> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" height="15pt" text-align="right" width="43pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt"> <fo:block> <fo:inline font-weight="bold">To:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" height="15pt" width="281pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Investigator"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Fullname"> <xsl:if test="../../n1:PI_flag =&apos;true&apos;"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 6 FOR UPDATE; buffer := ' <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" height="15pt" text-align="right" width="100pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt"> <fo:block> <fo:inline font-weight="bold">Date:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" height="15pt" width="99pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <xsl:for-each select="n1:CurrentDate"> <fo:inline font-size="10pt"> <xsl:value-of select="format-number(number(substring(string(.), 6, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 9, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 1, 4)), ''0000'')" /> </fo:inline> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" height="15pt" text-align="right" width="43pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt"> <fo:block /> </fo:table-cell> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" height="15pt" width="281pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Investigator"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:OfficeLocation"> <xsl:if test="../../n1:PI_flag =&apos;true&apos;"> <xsl:apply-templates /> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 6 FOR UPDATE; buffer := ' </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" height="15pt" text-align="right" width="100pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt"> <fo:block /> </fo:table-cell> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" height="15pt" width="99pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block /> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" height="15pt" text-align="right" width="43pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt"> <fo:block> <fo:inline font-weight="bold">From:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" height="15pt" width="281pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <xsl:for-each select="n1:CommitteeMasterData"> <xsl:for-each select="n1:CommitteeName"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" height="15pt" text-align="right" width="100pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt"> <fo:block> <fo:inline font-weight="bold">Expiration Date:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" height="15pt" width="99pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:ProtocolMasterData"'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 6 FOR UPDATE; buffer := '> <xsl:for-each select="n1:ExpirationDate"> <fo:inline font-size="10pt"> <xsl:value-of select="format-number(number(substring(string(.), 6, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 9, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 1, 4)), ''0000'')" /> </fo:inline> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:table font-size="10pt" width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="proportional-column-width(9)" /> <fo:table-column column-width="proportional-column-width(91)" /> <fo:table-body> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" text-align="right" width="9%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt"> <fo:block> <fo:inline font-weight="bold">Re:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="91%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block>Protocol #: <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:ProtocolMasterData"> <xsl:for-each select="n1:ProtocolNumber"> <xsl:apply-templates /> </xsl:for-each>: <xsl:for-each select="n1:ProtocolTitle"> <xsl:apply-templates /> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:inline font-size="10pt">This letter serves as an IRB notification reminder by the </fo:inline> <xsl:for-each select="n1:CommitteeMasterData"> <xsl:for-each select="n1:CommitteeName"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 6 FOR UPDATE; buffer := ' </xsl:for-each> </xsl:for-each> <fo:inline font-size="10pt">.&#160; It is the primary responsibility of the Principal Investigator to ensure that the re-approval status for expiring protocols is achieved.&#160; All protocols must be re-approved annually by the IRB unless shorter intervals have been specified.&#160; </fo:inline> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:inline font-size="10pt">P</fo:inline> <fo:inline font-size="10pt">lease note that the level of scrutiny given to the continuing review process is the same as that of any new protocol.&#160; All requests for re-approval must be reviewed at a convened IRB meeting, except for those protocols that meet the criteria for expedited review.</fo:inline> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:inline font-size="10pt">Please submit the following documents prior to the next COUHES meeting that is scheduled to meet before your expiration date:</fo:inline> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <xsl:text>&#xA;</xsl:text> </fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:inline font-size="10pt">1) The original copy of the Continuing Review Questionnaire (CRQ).</fo:inline> </fo:block> </fo:block> <fo:inline font-size="10pt">2) Two (2) copies of each consent form(s) used in the study (without the validation stamp to allow for revalidation).&#160; COUHES requires that MIT consent forms follow the template on the web site.&#160; </fo:inline> <fo:inline font-size="10pt" font-weight="bold">Note: template updated in March, 2008.&#160; The &quot;Emergency Care and Compensation for Injury&quot; required language has changed.</fo:inline> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:inline font-size="10pt">3) A current protocol summary, inclusive of all amendments and revisions, which will serve as an IRB file copy.</fo:inline> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:inline font-size="10pt">Please note that you can obtain a copy of the Continuing Review Questionnaire through our web site : http://web.mit.edu/committees/couhes/forms.shtml.</fo:inline> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:inline font-size="10pt">As of July 1, 2003, all personnel involved in Human Subjects Research must complete the Human Subjects training course.&#160; It is the responsibility of the PI to make sure that all personnel associated with this study have completed the human subjects training course (see the COUHES web site for a link to the training).&#160; </fo:inline> <fo:inline font-size="10pt" fon'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 6 FOR UPDATE; buffer := 't-weight="bold">Human subjects training must be updated every 3 years.&#160; Training must be current for all study personnel before renewal can be approved.</fo:inline> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:inline font-size="10pt">It is a violation of Massachusetts Institute of Technology policy and federal regulations to continue research activities after the approval period has expired.&#160; If the IRB has not reviewed and re-approved this research by its current expiration date, all enrollment, research activities and intervention on previously enrolled subjects must stop.&#160; If you believe that the health and welfare of the subjects will be jeopardized if the study treatment is discontinued, you may submit a written request to the IRB to continue treatment activities with currently enrolled subjects.</fo:inline> <fo:block> <fo:leader leader-pattern="space" /> </fo:block>&#160;<fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:inline font-size="10pt">Your assistance and cooperation in ensuring that the above-mentioned protocol is received at the COUHES office in time for re-approval evaluation is greatly appreciated.</fo:inline> </fo:block> </fo:block> </xsl:for-each> </fo:block> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> </xsl:stylesheet> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / INSERT INTO PROTO_CORRESP_TEMPL (COMMITTEE_ID,CORRESPONDENCE_TEMPLATE,FILE_NAME,OBJ_ID,PROTO_CORRESP_TEMPL_ID,PROTO_CORRESP_TYPE_CODE,UPDATE_TIMESTAMP,UPDATE_USER,VER_NBR) VALUES ('DEFAULT',EMPTY_CLOB(),'DEFAULT-21-RenewalReminderLetter #2.xsl','9CD01EA17C5C9DADE040DC0A1F8A714D',7,'21',TO_DATE( '20110221133453', 'YYYYMMDDHH24MISS' ),'KCRELEASE',1) / -- Length: 33214 -- Chunks: 9 DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 7 FOR UPDATE; buffer := '<?xml version="1.0" encoding="UTF-8"?> <!--Designed and generated by Altova StyleVision Enterprise Edition 2008 rel. 2 - see http://www.altova.com/stylevision for more information.--> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:n1="http://irb.mit.edu/irbnamespace" xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:output version="1.0" method="xml" encoding="UTF-8" indent="no"/> <xsl:param name="SV_OutputFormat" select="''PDF''"/> <xsl:variable name="XML" select="/"/> <xsl:variable name="fo:layout-master-set"> <fo:layout-master-set> <fo:simple-page-master master-name="default-page" page-height="11in" page-width="8.5in" margin-left="0.8in" margin-right="0.8in"> <fo:region-body margin-top="0.45in" margin-bottom="0.45in"/> </fo:simple-page-master> </fo:layout-master-set> </xsl:variable> <xsl:template match="/"> <fo:root> <xsl:copy-of select="$fo:layout-master-set"/> <fo:page-sequence master-reference="default-page" initial-page-number="1" format="1"> <fo:flow flow-name="xsl-region-body"> <fo:block> <xsl:for-each select="$XML"> <xsl:for-each select="n1:RenewalReminder"> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:table table-layout="fixed" width="100%" border-spacing="2pt"> <fo:table-column column-width="43"/> <fo:table-column column-width="281"/> <fo:table-column column-width="100"/> <fo:table-column column-width="99"/> <fo:table-body start-indent="0pt"> <fo:table-row> <fo:table-cell line-height="10pt" number-columns-spanned="4" padding="2pt" height="15" text-align="right" display-align="before"> <fo:block> <fo:external-graphic> <xsl:attribute name="src"> <xsl:text>url(</xsl:text> <xsl:call-template name="double-backslash"> <xsl:with-param name="text"> <xsl:value-of select="string(&apos;/export/home/www/https/tomcat5.0.25/webapps/coeus/images/couhes_byline2.gif&apos;)"/> </xsl:with-param> <xsl:with-param name="text-length"> <xsl:value-of select="string-length(string(&apos;/export/home/www/https/tomcat5.0.25/webapps/coeus/images/couhes_byline2.gif&apos;))"/> </xsl:with-param> </xsl:call-template> <xsl:text>)</xsl:text> </xsl:attribute> </fo:external-graphic> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 7 FOR UPDATE; buffer := ' </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell line-height="10pt" padding="2pt" height="15" text-align="right" display-align="before"> <fo:block> <fo:inline font-weight="bold"> <xsl:text>To:</xsl:text> </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell line-height="10pt" padding="2pt" height="15" display-align="before"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Investigator"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Fullname"> <xsl:if test="../../n1:PI_flag =&apos;true&apos;"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> <fo:table-cell line-height="10pt" padding="2pt" height="15" text-align="right" display-align="before"> <fo:block> <fo:inline font-weight="bold"> <xsl:text>Date:</xsl:text> </fo:inline> </fo:block> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 7 FOR UPDATE; buffer := ' </fo:table-cell> <fo:table-cell line-height="10pt" padding="2pt" height="15" display-align="center"> <fo:block> <xsl:for-each select="n1:CurrentDate"> <fo:inline font-size="10pt"> <xsl:value-of select="format-number(number(substring(string(string(.)), 6, 2)), ''00'')"/> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(string(.)), 9, 2)), ''00'')"/> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(string(string(.))), 1, 4)), ''0000'')"/> </fo:inline> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell line-height="10pt" padding="2pt" height="15" text-align="right" display-align="before"> <fo:block/> </fo:table-cell> <fo:table-cell line-height="10pt" padding="2pt" height="15" display-align="before"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Investigator"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:OfficeLocation"> <xsl:if test="../../n1:PI_flag =&apos;true&apos;"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:if> </xsl:for-each> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 7 FOR UPDATE; buffer := ' </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> <fo:table-cell line-height="10pt" padding="2pt" height="15" text-align="right" display-align="before"> <fo:block/> </fo:table-cell> <fo:table-cell line-height="10pt" padding="2pt" height="15" display-align="before"> <fo:block/> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell line-height="10pt" padding="2pt" height="15" text-align="right" display-align="before"> <fo:block> <fo:inline font-weight="bold"> <xsl:text>From:</xsl:text> </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell line-height="10pt" padding="2pt" height="15" display-align="before"> <fo:block> <xsl:for-each select="n1:CommitteeMasterData"> <xsl:for-each select="n1:CommitteeName"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> <fo:table-cell line-height="10pt" padding="2pt" height="15" text-align="right" display-align="before"> <fo:block> <fo:inline font-weight="bold"> <xsl:text>Expiration Date:</xsl:text> </fo:inline> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 7 FOR UPDATE; buffer := ' </fo:block> </fo:table-cell> <fo:table-cell line-height="10pt" padding="2pt" height="15" display-align="before"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:ProtocolMasterData"> <xsl:for-each select="n1:ExpirationDate"> <fo:inline font-size="10pt"> <xsl:value-of select="format-number(number(substring(string(string(.)), 6, 2)), ''00'')"/> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(string(.)), 9, 2)), ''00'')"/> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(string(string(.))), 1, 4)), ''0000'')"/> </fo:inline> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:table font-size="10pt" table-layout="fixed" width="100%" border-spacing="2pt"> <fo:table-column column-width="9%"/> <fo:table-column column-width="91%"/> <fo:table-body start-indent="0pt"> <fo:table-row> <fo:table-cell padding="2pt" text-align="right" display-align="before"> <fo:block> <fo:inline font-weight="bold"> <xsl:text>Re:</xsl:text> </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <fo:inline> <xsl:text>Protocol #: </xsl:text> </fo:inline> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:ProtocolMasterData"> <xsl:for-each select="n1:ProtocolNumber"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 7 FOR UPDATE; buffer := ' </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:for-each> <fo:inline> <xsl:text>: </xsl:text> </fo:inline> <xsl:for-each select="n1:ProtocolTitle"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:inline font-size="10pt"> <xsl:text>This letter serves as an IRB notification reminder by the </xsl:text> </fo:inline> <xsl:for-each select="n1:CommitteeMasterData"> <xsl:for-each select="n1:CommitteeName"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variabl'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 7 FOR UPDATE; buffer := 'e> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:for-each> <fo:inline font-size="10pt"> <xsl:text>.&#160; It is the primary responsibility of the Principal Investigator to ensure that the re-approval status for expiring protocols is achieved.&#160; All protocols must be re-approved annually by the IRB unless shorter intervals have been specified.&#160; </xsl:text> </fo:inline> <fo:block/> <fo:inline font-size="10pt"> <xsl:text>P</xsl:text> </fo:inline> <fo:inline font-size="10pt"> <xsl:text>lease note that the level of scrutiny given to the continuing review process is the same as that of any new protocol.&#160; All requests for re-approval must be reviewed at a convened IRB meeting, except for those protocols that meet the criteria for expedited review.</xsl:text> </fo:inline> <fo:block/> <fo:inline font-size="10pt"> <xsl:text>Please submit the following documents prior to the next COUHES meeting that is scheduled to meet before your expiration date:</xsl:text> </fo:inline> <fo:block/> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:inline font-size="10pt"> <xsl:text>1) The original copy of the Continuing Review Questionnaire (CRQ).</xsl:text> </fo:inline> </fo:block> </fo:block> <fo:inline font-size="10pt"> <xsl:text>2) Two (2) copies of each consent form(s) used in the study (without the validation stamp to allow for revalidation).&#160; COUHES requires that MIT consent forms follow the template on the web site.&#160; </xsl:text> </fo:inline> <fo:inline font-size="10pt" font-weight="bold"> <xsl:text>Note: template updated in March, 2008.&#160; The &quot;Emergency Care and Compensation for Injury&quot; required language has changed.</xsl:text> </fo:inline> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 7 FOR UPDATE; buffer := ' <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:inline font-size="10pt"> <xsl:text>3) A current protocol summary, inclusive of all amendments and revisions, which will serve as an IRB file copy.</xsl:text> </fo:inline> <fo:block/> <fo:inline font-size="10pt"> <xsl:text>Please note that you can obtain a copy of the Continuing Review Questionnaire through our web site : http://web.mit.edu/committees/couhes/forms.shtml.</xsl:text> </fo:inline> <fo:block/> <fo:inline font-size="10pt"> <xsl:text>As of July 1, 2003, all personnel involved in Human Subjects Research must complete the Human Subjects training course.&#160; It is the responsibility of the PI to make sure that all personnel associated with this study have completed the human subjects training course (see the COUHES web site for a link to the training).&#160; </xsl:text> </fo:inline> <fo:inline font-size="10pt" font-weight="bold"> <xsl:text>Human subjects training must be updated every 3 years.&#160; Training must be current for all study personnel before renewal can be approved.</xsl:text> </fo:inline> <fo:block/> <fo:inline font-size="10pt"> <xsl:text>It is a violation of Massachusetts Institute of Technology policy and federal regulations to continue research activities after the approval period has expired.&#160; If the IRB has not reviewed and re-approved this research by its current expiration date, all enrollment, research activities and intervention on previously enrolled subjects must stop.&#160; If you believe that the health and welfare of the subjects will be jeopardized if the study treatment is discontinued, you may submit a written request to the IRB to continue treatment activities with currently enrolled subjects.</xsl:text> </fo:inline> <fo:block/> <fo:inline> <xsl:text>&#160;</xsl:text> </fo:inline> <fo:block/> <fo:inline font-size="10pt"> <xsl:text>Your assistance and cooperation in ensuring that the above-mentioned protocol is received at the COUHES office in time for re-approval evaluation is greatly appreciated.</xsl:text> </fo:inline> </fo:block> </fo:block> </xsl:for-each> </xsl:for-each> </fo:block> <fo:block id="SV_RefID_PageTotal"/> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> <xsl:template name="double-backslash"> <xsl:para'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 7 FOR UPDATE; buffer := 'm name="text"/> <xsl:param name="text-length"/> <xsl:variable name="text-after-bs" select="substring-after($text, ''\'')"/> <xsl:variable name="text-after-bs-length" select="string-length($text-after-bs)"/> <xsl:choose> <xsl:when test="$text-after-bs-length = 0"> <xsl:choose> <xsl:when test="substring($text, $text-length) = ''\''"> <xsl:value-of select="concat(substring($text,1,$text-length - 1), ''\\'')"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$text"/> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:value-of select="concat(substring($text,1,$text-length - $text-after-bs-length - 1), ''\\'')"/> <xsl:call-template name="double-backslash"> <xsl:with-param name="text" select="$text-after-bs"/> <xsl:with-param name="text-length" select="$text-after-bs-length"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:template> </xsl:stylesheet> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / INSERT INTO PROTO_CORRESP_TEMPL (COMMITTEE_ID,CORRESPONDENCE_TEMPLATE,FILE_NAME,OBJ_ID,PROTO_CORRESP_TEMPL_ID,PROTO_CORRESP_TYPE_CODE,UPDATE_TIMESTAMP,UPDATE_USER,VER_NBR) VALUES ('DEFAULT',EMPTY_CLOB(),'DEFAULT-26-ClosureNotice.xsl','9CD01EA17C5D9DADE040DC0A1F8A714D',8,'26',TO_DATE( '20110221133453', 'YYYYMMDDHH24MISS' ),'KCRELEASE',1) / -- Length: 77577 -- Chunks: 20 DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 8 FOR UPDATE; buffer := '<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:n1="http://irb.mit.edu/irbnamespace" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xsl:variable name="fo:layout-master-set"> <fo:layout-master-set> <fo:simple-page-master master-name="default-page" page-height="11in" page-width="8.5in" margin-left="0.6in" margin-right="1.0in"> <fo:region-body margin-top="0.79in" margin-bottom="0.79in" /> <fo:region-before extent="0.79in" /> </fo:simple-page-master> </fo:layout-master-set> </xsl:variable> <xsl:output version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="no" media-type="text/html" /> <xsl:template match="/"> <fo:root> <xsl:copy-of select="$fo:layout-master-set" /> <fo:page-sequence master-reference="default-page" initial-page-number="1" format="1"> <fo:static-content flow-name="xsl-region-before"> <fo:block> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column /> <fo:table-column column-width="150pt" /> <fo:table-body> <fo:table-row> <fo:table-cell padding-bottom="0pt" padding-left="0pt" padding-right="0pt" padding-top="0pt" border-style="solid" border-width="1pt" border-color="white" height="30pt" number-columns-spanned="2" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block /> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell font-size="inherited-property-value(&apos;font-size&apos;) - 2pt" padding-bottom="0pt" padding-left="0pt" padding-right="0pt" padding-top="0pt" border-style="solid" border-width="1pt" border-color="white" text-align="left" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center"> <fo:block /> </fo:table-cell> <fo:table-cell font-size="inherited-property-value(&apos;font-size&apos;) - 2pt" padding-bottom="0pt" padding-left="0pt" padding-right="0pt" padding-top="0pt" border-style="solid" border-width="1pt" border-color="white" text-align="right" width="150pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center"> <fo:block /> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell padding-bottom="0pt" padding-left="0pt" padding-right="0pt" padding-top="0pt" border-style="solid" border-width="1pt" border-color="white" number-columns-spanned="2" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block /> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </fo:block> </fo:static-content> <fo:flow flow-name="xsl-region-body"> <fo:block> <fo:external-graphic space-before.optimum="4pt" space-after.optimum="4pt"> <xsl:attribute name="src">url(''<xsl:text disable-output-escaping="yes">/export/home/www/https/tomcat5.0'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 8 FOR UPDATE; buffer := '.25/webapps/coeus/images/couhes_byline2.gif</xsl:text>'')</xsl:attribute> </fo:external-graphic> <fo:block color="black" space-before.optimum="-8pt"> <fo:leader leader-length="100%" leader-pattern="rule" rule-thickness="1pt" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <xsl:choose> <xsl:when test="n1:Correspondence/n1:Protocol/n1:ProtocolMasterData/n1:ProtocolStatusCode =300"> <xsl:for-each select="n1:Correspondence"> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="127pt" /> <fo:table-column column-width="451pt" /> <fo:table-body> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="127pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">To:</fo:inline> <fo:inline font-size="10pt">&#160;&#160;&#160;&#160;&#160; </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="451pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Investigator"> <xsl:if test="n1:PI_flag = &apos;true&apos;"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Firstname"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> <fo:inline font-size="10pt">&#160;</fo:inline> <xsl:for-each select="n1:LastName"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 8 FOR UPDATE; buffer := 'for-each> <fo:block white-space-collapse="false" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <xsl:for-each select="n1:OfficeLocation"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> </fo:block> </fo:block> </xsl:for-each> </xsl:if> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="127pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">From:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="451pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Submissions"> <xsl:if test="n1:CurrentSubmissionFlag =&apos;No&apos;"> <xsl:for-each select="n1:CommitteeMember"> <xsl:if test="n1:CommitteeMemberRole/n1:MemberRoleDesc = &apos;Chair&apos;"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Firstname"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 8 FOR UPDATE; buffer := ' <fo:inline font-size="10pt">&#160;</fo:inline> <xsl:for-each select="n1:LastName"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> </xsl:for-each> </xsl:if> </xsl:for-each> </xsl:if> </xsl:for-each> </xsl:for-each> <fo:inline font-size="10pt">, Chair </fo:inline> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Submissions"> <xsl:for-each select="n1:CommitteeMasterData"> <xsl:for-each select="n1:CommitteeName"> <xsl:if test="../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:block> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" height="19pt" width="127pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">Date:</fo:inline> </fo:block> </fo:table-cell> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 8 FOR UPDATE; buffer := ' <fo:table-cell border-style="solid" border-width="1pt" border-color="white" height="19pt" width="451pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <xsl:for-each select="n1:CurrentDate"> <fo:inline font-size="10pt"> <xsl:value-of select="format-number(number(substring(string(.), 6, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 9, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 1, 4)), ''0000'')" /> </fo:inline> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="127pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">Committee Action:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="451pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">Protocol Administratively Closed</fo:inline> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block text-align="justify"> <fo:block> <xsl:text>&#xA;</xsl:text> </fo:block> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="127pt" /> <fo:table-column column-width="461pt" /> <fo:table-body> <fo:table-row> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 8 FOR UPDATE; buffer := ' <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="127pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">Expiration Date: </fo:inline> <fo:inline font-size="10pt">&#160;&#160;&#160;&#160; </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="461pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:ProtocolMasterData"> <xsl:for-each select="n1:ExpirationDate"> <xsl:value-of select="format-number(number(substring(string(.), 6, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 9, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 1, 4)), ''0000'')" /> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="127pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">IRB Protocol #: </fo:inline> <fo:inline font-size="10pt">&#160;&#160;&#160; </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="461pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <xsl:for'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 8 FOR UPDATE; buffer := '-each select="n1:Protocol"> <xsl:for-each select="n1:ProtocolMasterData"> <xsl:for-each select="n1:ProtocolNumber"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="127pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">Study Title: </fo:inline> <fo:inline font-size="10pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="461pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:ProtocolMasterData"> <xsl:for-each select="n1:ProtocolTitle"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:block> <xsl:text>&#xA;</xsl:text> </fo:block> </fo:block> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 8 FOR UPDATE; buffer := ' </fo:block> </fo:block> </fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block /> </fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block /> </fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:inline font-size="10pt">This is to notify you that the above protocol has been ADMINISTRATIVELY CLOSED effective </fo:inline> <xsl:for-each select="n1:Protocol"> <fo:inline font-size="10pt"> <xsl:for-each select="n1:ProtocolMasterData"> <xsl:for-each select="n1:ExpirationDate"> <fo:inline font-size="10pt"> <xsl:value-of select="format-number(number(substring(string(.), 6, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 9, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 1, 4)), ''0000'')" /> </fo:inline> </xsl:for-each> </xsl:for-each> </fo:inline> </xsl:for-each> <fo:inline font-size="10pt"> due to your failure to return the required Continuing Review Questionnaire.&#160;&#160;&#160; Data collected after the expiration date is considered unapproved research and cannot be included with data collected during an approved period.&#160; Furthermore, data collected after termination of approval cannot be reported or published as research data.</fo:inline> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:inline font-size="10pt">In accordance with'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 8 FOR UPDATE; buffer := ' MIT Policy and Federal Regulations, you may NOT continue any further research efforts covered by this protocol.&#160; If you wish to gather further research information, you must submit a new proposal for review by the Committee on the Use of Humans as Experimental Subjects.</fo:inline> <fo:block> <xsl:text>&#xA;</xsl:text> </fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:inline font-size="10pt">You should retain a copy of this letter for your records.</fo:inline> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 8 FOR UPDATE; buffer := ' leader-pattern="space" /> </fo:block> <fo:block> <xsl:text>&#xA;</xsl:text> </fo:block> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="3pt" /> <fo:table-column /> <fo:table-body> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="3pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block /> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" text-align="left" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center"> <fo:block> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="46pt" /> <fo:table-column column-width="452pt" /> <fo:table-body> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="46pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <fo:inline font-size="10pt">cc</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <fo:inline font-size="10pt">Tom Duff</fo:inline> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="46pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block /> </fo:table-cell> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 8 FOR UPDATE; buffer := ' <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="452pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Correspondent"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Fullname"> <xsl:if test="../../n1:TypeOfCorrespondent = &apos;CRC&apos;"> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </fo:block> </fo:block> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:inline font-size="10pt"> </fo:inline> </fo:block> </fo:block> </xsl:for-each> </xsl:when> <xsl:otherwise> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <xsl:for-each select="n1:Correspondence"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 8 FOR UPDATE; buffer := ' <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="127pt" /> <fo:table-column column-width="451pt" /> <fo:table-body> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="127pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">To:</fo:inline> <fo:inline font-size="10pt">&#160;&#160;&#160;&#160;&#160; </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="451pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Investigator"> <xsl:if test="n1:PI_flag = &apos;true&apos;"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Firstname"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> <fo:inline font-size="10pt">&#160;</fo:inline> <xsl:for-each select="n1:LastName"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> <fo:block white-space-collapse="false" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <xsl:for-each select="n1:OfficeLocation"> <fo:inline font-size="10pt"> <xsl:apply-templates /> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 8 FOR UPDATE; buffer := ' </fo:inline> </xsl:for-each> </fo:block> </fo:block> </xsl:for-each> </xsl:if> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="127pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">From:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="451pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <fo:inline font-size="10pt">Leigh Firn, Chair </fo:inline> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block>COUHES</fo:block> </fo:block> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" height="19pt" width="127pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">Date:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" height="19pt" width="451pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <xsl:for-each select="n1:CurrentDate"> <fo:inline font-size="10pt"> <xsl:value-of select="format-number(number(substring(string(.), 6, 2)), ''00'')" /> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 8 FOR UPDATE; buffer := ' <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 9, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 1, 4)), ''0000'')" /> </fo:inline> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="127pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">Committee Action:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="451pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">Protocol Administratively Closed</fo:inline> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block text-align="justify"> <fo:block> <xsl:text>&#xA;</xsl:text> </fo:block> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="127pt" /> <fo:table-column column-width="461pt" /> <fo:table-body> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="127pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block /> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="461pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block /> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 8 FOR UPDATE; buffer := ' </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="127pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">IRB Protocol #: </fo:inline> <fo:inline font-size="10pt">&#160;&#160;&#160; </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="461pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:ProtocolMasterData"> <xsl:for-each select="n1:ProtocolNumber"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="127pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">Study Title: </fo:inline> <fo:inline font-size="10pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="461pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 8 FOR UPDATE; buffer := ' <xsl:for-each select="n1:ProtocolMasterData"> <xsl:for-each select="n1:ProtocolTitle"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:block> <xsl:text>&#xA;</xsl:text> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:inline font-size="10pt">This is to notify you that the above protocol has been ADMINISTRATIVELY CLOSED effective </fo:inline> <xsl:for-each select="n1:CurrentDate"> <fo:inline font-size="10pt"> <fo:inline font-size="10pt"> <xsl:value-of select="format-number(number(substring(string(.), 6, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 9, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 1, 4)), ''0000'')" /> </fo:inline> </fo:inline> </xsl:for-each> <fo:inline font-size="10pt">&#160; as per your request.&#160;&#160; Data collected after the closed date is considered unapproved research and cannot be included with data collected during an approved period.&#160; Furthermore, data collected after termination of approval cannot be reported or published as research data.</fo:inline> <fo:block> <fo:leader leade'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 8 FOR UPDATE; buffer := 'r-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:inline font-size="10pt">In accordance with MIT Policy and Federal Regulations, you may NOT continue any further research efforts covered by this protocol. If you wish to gather further research information, you must submit a new proposal for review by the Committee on the Use of Humans as Experimental Subjects.</fo:inline> <fo:block> <xsl:text>&#xA;</xsl:text> </fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:inline font-size="10pt">You should retain a copy of this letter for your records.</fo:inline> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:bl'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 8 FOR UPDATE; buffer := 'ock> <fo:block> <xsl:text>&#xA;</xsl:text> </fo:block> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="3pt" /> <fo:table-column /> <fo:table-body> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="3pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block /> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" text-align="left" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center"> <fo:block> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="46pt" /> <fo:table-column column-width="452pt" /> <fo:table-body> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="46pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <fo:inline font-size="10pt">cc</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <fo:inline font-size="10pt">Tom Duff</fo:inline> </fo:block> </fo:table-cell> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 8 FOR UPDATE; buffer := ' </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="46pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block /> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="452pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Correspondent"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Fullname"> <xsl:if test="../../n1:TypeOfCorrespondent = &apos;CRC&apos;"> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </fo:block> </fo:block> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 8 FOR UPDATE; buffer := ' </fo:table-body> </fo:table> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </xsl:for-each> <fo:block> <xsl:text>&#xA;</xsl:text> </fo:block> </xsl:otherwise> </xsl:choose> </fo:block> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> </xsl:stylesheet> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / INSERT INTO PROTO_CORRESP_TEMPL (COMMITTEE_ID,CORRESPONDENCE_TEMPLATE,FILE_NAME,OBJ_ID,PROTO_CORRESP_TEMPL_ID,PROTO_CORRESP_TYPE_CODE,UPDATE_TIMESTAMP,UPDATE_USER,VER_NBR) VALUES ('DEFAULT',EMPTY_CLOB(),'DEFAULT-3-NoticeOfDeferral.xsl','9CD01EA17C5E9DADE040DC0A1F8A714D',9,'3',TO_DATE( '20110221133453', 'YYYYMMDDHH24MISS' ),'KCRELEASE',1) / -- Length: 89276 -- Chunks: 23 DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 9 FOR UPDATE; buffer := '<?xml version="1.0" encoding="UTF-8"?> <!--Designed and generated by Altova StyleVision Enterprise Edition 2008 rel. 2 - see http://www.altova.com/stylevision for more information.--> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:n1="http://irb.mit.edu/irbnamespace" xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:output version="1.0" method="xml" encoding="UTF-8" indent="no"/> <xsl:param name="SV_OutputFormat" select="''PDF''"/> <xsl:variable name="XML" select="/"/> <xsl:variable name="fo:layout-master-set"> <fo:layout-master-set> <fo:simple-page-master master-name="default-page" page-height="11in" page-width="8.5in" margin-left="0.6in" margin-right="0.6in"> <fo:region-body margin-top="0.79in" margin-bottom="0.79in"/> <fo:region-before extent="0.79in"/> </fo:simple-page-master> </fo:layout-master-set> </xsl:variable> <xsl:template match="/"> <fo:root> <xsl:copy-of select="$fo:layout-master-set"/> <fo:page-sequence master-reference="default-page" initial-page-number="1" format="1"> <xsl:call-template name="headerall"/> <fo:flow flow-name="xsl-region-body"> <fo:block> <xsl:for-each select="$XML"> <fo:external-graphic> <xsl:attribute name="src"> <xsl:text>url(</xsl:text> <xsl:call-template name="double-backslash"> <xsl:with-param name="text"> <xsl:value-of select="string(&apos;/export/home/www/https/tomcat5.0.25/webapps/coeus/images/couhes_byline2.gif&apos;)"/> </xsl:with-param> <xsl:with-param name="text-length"> <xsl:value-of select="string-length(string(&apos;/export/home/www/https/tomcat5.0.25/webapps/coeus/images/couhes_byline2.gif&apos;))"/> </xsl:with-param> </xsl:call-template> <xsl:text>)</xsl:text> </xsl:attribute> </fo:external-graphic> <fo:block text-align="center"> <fo:leader leader-pattern="rule" rule-thickness="1" leader-length="100%" color="black"/> </fo:block> <fo:block/> <xsl:for-each select="n1:Correspondence"> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:table table-layout="fixed" width="100%" border-spacing="2pt"> <fo:table-column column-width="25%"/> <fo:table-column column-width="75%"/> <fo:table-body start-indent="0pt"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 9 FOR UPDATE; buffer := ' <fo:table-row> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <fo:inline font-size="10pt" font-weight="bold"> <xsl:text>To:</xsl:text> </fo:inline> <fo:inline font-size="10pt"> <xsl:text>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </xsl:text> </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" display-align="center"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Investigator"> <xsl:if test="n1:PI_flag = &apos;true&apos;"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Firstname"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:for-each> <fo:inline font-size="10pt"> <xsl:text>&#160;</xsl:text> </fo:inline> <xsl:for-each select="n1:LastName"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 9 FOR UPDATE; buffer := ' <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:for-each> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block white-space="pre" white-space-collapse="false" margin="0pt"> <fo:block> <xsl:for-each select="n1:OfficeLocation"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-family="Book Antiqua" font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-family="Book Antiqua" font-size="10pt"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 9 FOR UPDATE; buffer := ' <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:for-each> </fo:block> </fo:block> </xsl:for-each> </xsl:if> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <fo:inline font-size="10pt" font-weight="bold"> <xsl:text>From:</xsl:text> </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" display-align="center"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Submissions"> <xsl:for-each select="n1:CommitteeMember"> <xsl:if test="n1:CommitteeMemberRole/n1:MemberRoleDesc = &apos;Chair&apos;"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Firstname"> <xsl:if test="../../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 9 FOR UPDATE; buffer := ' <xsl:otherwise> <fo:inline font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:if> </xsl:for-each> <fo:inline font-size="10pt"> <xsl:text>&#160;</xsl:text> </fo:inline> <xsl:for-each select="n1:LastName"> <xsl:if test="../../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> <fo:inline font-size="10pt"> <xsl:text>, Cha'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 9 FOR UPDATE; buffer := 'ir </xsl:text> </fo:inline> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Submissions"> <xsl:for-each select="n1:CommitteeMasterData"> <xsl:for-each select="n1:CommitteeName"> <xsl:if test="../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:block> </fo:block> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 9 FOR UPDATE; buffer := ' </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <fo:inline font-size="10pt" font-weight="bold"> <xsl:text>Date:</xsl:text> </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" display-align="center"> <fo:block> <xsl:for-each select="n1:CurrentDate"> <fo:inline font-family="Book Antiqua" font-size="10pt"> <xsl:value-of select="format-number(number(substring(string(string(.)), 6, 2)), ''00'')"/> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(string(.)), 9, 2)), ''00'')"/> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(string(string(.))), 1, 4)), ''0000'')"/> </fo:inline> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <fo:inline font-size="10pt" font-weight="bold"> <xsl:text>Committee Action:</xsl:text> </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" display-align="center"> <fo:block> <fo:inline font-weight="bold"> <xsl:text>Deferred</xsl:text> </fo:inline> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 9 FOR UPDATE; buffer := ' <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:table table-layout="fixed" width="100%" border-spacing="2pt"> <fo:table-column column-width="25%"/> <fo:table-column column-width="75%"/> <fo:table-body start-indent="0pt"> <fo:table-row> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <fo:inline font-size="10pt" font-weight="bold"> <xsl:text>Committee Action Date: </xsl:text> </fo:inline> <fo:inline font-size="10pt"> <xsl:text>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </xsl:text> </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Submissions"> <xsl:for-each select="n1:SubmissionDetails"> <xsl:for-each select="n1:ActionType"> <xsl:for-each select="n1:ActionDate"> <xsl:if test="../../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <fo:inline> <xsl:value-of select="format-number(number(substring(string(string(.)), 6, 2)), ''00'')"/> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(string(.)), 9, 2)), ''00'')"/> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(string(string(.))), 1, 4)), ''0000'')"/> </fo:inline> </'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 9 FOR UPDATE; buffer := 'xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <fo:inline font-size="10pt" font-weight="bold"> <xsl:text>IRB Protocol #: </xsl:text> </fo:inline> <fo:inline font-size="10pt"> <xsl:text>&#160;&#160;&#160;&#160; </xsl:text> </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:ProtocolMasterData"> <xsl:for-each select="n1:ProtocolNumber"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:for-each> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 9 FOR UPDATE; buffer := ' </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <fo:inline font-size="10pt" font-weight="bold"> <xsl:text>Study Title:</xsl:text> </fo:inline> <fo:inline font-size="10pt"> <xsl:text>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </xsl:text> </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:ProtocolMasterData"> <xsl:for-each select="n1:ProtocolTitle"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 9 FOR UPDATE; buffer := ' </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </fo:block> </fo:block> </fo:block> </fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:inline font-size="10pt"> <xsl:text>The above-referenced protocol has been DEFERRED by the Committee on the Use of Humans as Experimental Subjects.&#160;&#160; Reasons for the above Committee action are listed below.</xsl:text> </fo:inline> </fo:block> </fo:block> </fo:block> </fo:block> <fo:inline-container> <fo:block> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 9 FOR UPDATE; buffer := ' <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block white-space="pre" white-space-collapse="false" margin="0pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Submissions"> <xsl:for-each select="n1:Minutes"> <xsl:for-each select="n1:MinuteEntry"> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <xsl:if test="../../n1:CurrentSubmissionFlag = &apos;Yes&apos;"> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:list-block margin-bottom="0" margin-top="0" provisional-distance-between-starts="7mm" provisional-label-separation="2mm"> <fo:list-item> <fo:list-item-label end-indent="label-end()" text-align="right"> <fo:block/> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block font-family="Book Antiqua" font-'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 9 FOR UPDATE; buffer := 'size="10pt"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-family="Book Antiqua" font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-family="Book Antiqua" font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </fo:block> </fo:list-item-body> </fo:list-item> </fo:list-block> </xsl:if> </fo:block> </fo:block> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:block> <fo:leader leader'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 9 FOR UPDATE; buffer := '-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 9 FOR UPDATE; buffer := ' </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 9 FOR UPDATE; buffer := ' </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:table table-layout="fixed" width="100%" border-spacing="2pt"> <fo:table-column column-width="37"/> <fo:table-column column-width="450"/> <fo:table-body start-indent="0pt"> <fo:table-row> <fo:table-cell display-align="before" padding="2pt"> <fo:block> <fo:block/> <fo:block/> <fo:block/> <fo:block/> <fo:block/> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 9 FOR UPDATE; buffer := ' <fo:block/> <fo:block/> <fo:block/> </fo:block> </fo:table-cell> <fo:table-cell display-align="before" padding="2pt"> <fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block display-align="before" white-space="pre" white-space-collapse="false" margin="0pt"> <fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block white-space="pre" white-space-collapse="false" margin="0pt"> <fo:block/> </fo:block> </fo:block> </fo:block> <fo:'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 9 FOR UPDATE; buffer := 'block/> <fo:block/> <fo:block/> <fo:block/> <fo:block/> <fo:block/> <fo:block/> <fo:block/> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:table table-layout="fixed" width="100%" border-spacing="2pt"> <fo:table-column column-width="27"/> <fo:table-column column-width="1000"/> <fo:table-body start-indent="0pt"> <fo:table-row> <fo:table-cell padding="2pt" height="19" display-align="center"> <fo:block> <fo:inline font-family="Book Antiqua" font-size="10pt"> <xsl'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 9 FOR UPDATE; buffer := ':text>cc:&#160;&#160; </xsl:text> </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" height="19" display-align="center"> <fo:block> <fo:inline font-family="Book Antiqua" font-size="10pt"> <xsl:text>Tom Duff </xsl:text> </fo:inline> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell padding="2pt" display-align="center"> <fo:block/> </fo:table-cell> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Correspondent"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Fullname"> <xsl:if test="../../n1:TypeOfCorrespondent = &apos;CRC&apos;"> <xsl:variable name="value-of-template"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 9 FOR UPDATE; buffer := ' <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-family="Book Antiqua" font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-family="Book Antiqua" font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> </fo:t'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 9 FOR UPDATE; buffer := 'able-body> </fo:table> </fo:block> </fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:inline font-size="10pt"> <xsl:text> </xsl:text> </fo:inline> </fo:block> </fo:block> </fo:block> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 9 FOR UPDATE; buffer := ' </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </xsl:for-each> </xsl:for-each> </fo:block> <fo:block id="SV_RefID_PageTotal"/> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> <xsl:template name="headerall"> <fo:static-content flow-name="xsl-region-before"> <fo:block> <xsl:for-each select="$XML"> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:table table-layout="fixed" width="100%" border-spacing="2pt"> <fo:table-column column-width="proportional-column-width(1)"/> <fo:table-column column-width="150"/> <fo:table-body start-indent="0pt"> <fo:table-row> <fo:table-cell padding="0" number-columns-spanned="2" height="30" display-align="center"> <fo:block/> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell font-size="smaller" padding="0" text-align="left" display-align="center"> <fo:block/> </fo:table-cell> <fo:table-cell font-size="smaller" padding="0" text-align="right" display-align="center"> <fo:block/> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell padding="0" number-columns-spanned="2" display-align="center"> <fo:block/> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </xsl:for-each> </fo:block> </fo:static-content> </xsl:template'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 9 FOR UPDATE; buffer := '> <xsl:template name="double-backslash"> <xsl:param name="text"/> <xsl:param name="text-length"/> <xsl:variable name="text-after-bs" select="substring-after($text, ''\'')"/> <xsl:variable name="text-after-bs-length" select="string-length($text-after-bs)"/> <xsl:choose> <xsl:when test="$text-after-bs-length = 0"> <xsl:choose> <xsl:when test="substring($text, $text-length) = ''\''"> <xsl:value-of select="concat(substring($text,1,$text-length - 1), ''\\'')"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$text"/> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:value-of select="concat(substring($text,1,$text-length - $text-after-bs-length - 1), ''\\'')"/> <xsl:call-template name="double-backslash"> <xsl:with-param name="text" select="$text-after-bs"/> <xsl:with-param name="text-length" select="$text-after-bs-length"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:template> </xsl:stylesheet> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / INSERT INTO PROTO_CORRESP_TEMPL (COMMITTEE_ID,CORRESPONDENCE_TEMPLATE,FILE_NAME,OBJ_ID,PROTO_CORRESP_TEMPL_ID,PROTO_CORRESP_TYPE_CODE,UPDATE_TIMESTAMP,UPDATE_USER,VER_NBR) VALUES ('DEFAULT',EMPTY_CLOB(),'DEFAULT-4-SubstantiveRevisionsRequiredLetter.xsl','9CD01EA17C5F9DADE040DC0A1F8A714D',10,'4',TO_DATE( '20110221133453', 'YYYYMMDDHH24MISS' ),'KCRELEASE',1) / -- Length: 60415 -- Chunks: 16 DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 10 FOR UPDATE; buffer := '<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:n1="http://irb.mit.edu/irbnamespace" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xsl:variable name="fo:layout-master-set"> <fo:layout-master-set> <fo:simple-page-master master-name="default-page" page-height="11in" page-width="8.5in" margin-left="0.6in" margin-right="0.6in"> <fo:region-body margin-top="0.79in" margin-bottom="0.79in" /> <fo:region-before extent="0.79in" /> </fo:simple-page-master> </fo:layout-master-set> </xsl:variable> <xsl:template match="/"> <fo:root> <xsl:copy-of select="$fo:layout-master-set" /> <fo:page-sequence master-reference="default-page" initial-page-number="1" format="1"> <fo:static-content flow-name="xsl-region-before"> <fo:block> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column /> <fo:table-column column-width="150pt" /> <fo:table-body> <fo:table-row> <fo:table-cell padding-after="0pt" padding-before="0pt" padding-end="0pt" padding-start="0pt" height="30pt" number-columns-spanned="2" display-align="center" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block /> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell font-size="inherited-property-value(&apos;font-size&apos;) - 2pt" padding-after="0pt" padding-before="0pt" padding-end="0pt" padding-start="0pt" text-align="left" display-align="center" border-style="solid" border-width="1pt" border-color="white"> <fo:block /> </fo:table-cell> <fo:table-cell font-size="inherited-property-value(&apos;font-size&apos;) - 2pt" padding-after="0pt" padding-before="0pt" padding-end="0pt" padding-start="0pt" text-align="right" width="150pt" display-align="center" border-style="solid" border-width="1pt" border-color="white"> <fo:block /> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell padding-after="0pt" padding-before="0pt" padding-end="0pt" padding-start="0pt" number-columns-spanned="2" display-align="center" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block /> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </fo:block> </fo:static-content> <fo:flow flow-name="xsl-region-body"> <fo:block> <fo:external-graphic space-before.optimum="4pt" space-after.optimum="4pt"> <xsl:attribute name="src">url(''<xsl:text disable-output-escaping="yes">/export/home/www/https/tomcat5.0.25/webapps/coeus/images/couhes_byline2.gif</xsl:text>'')</xsl:attribute> </fo:external-graphic> <fo:block color="black" space-before.optimum="-8pt"> <fo:leader leader-length="100%" leader-pattern="rule" rule-thickness="1pt" /> </fo:block> <fo:block> <fo:leader leader-pat'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 10 FOR UPDATE; buffer := 'tern="space" /> </fo:block> <xsl:for-each select="n1:Correspondence"> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="proportional-column-width(20)" /> <fo:table-column column-width="proportional-column-width(80)" /> <fo:table-body> <fo:table-row> <fo:table-cell display-align="before" width="20%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">To:</fo:inline> <fo:inline font-size="10pt">&#160;&#160;&#160;&#160;&#160; </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell width="80%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Investigator"> <xsl:if test="n1:PI_flag = &apos;true&apos;"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Firstname"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> <fo:inline font-size="10pt">&#160;</fo:inline> <xsl:for-each select="n1:LastName"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> <fo:block white-space-collapse="false" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <xsl:for-each select="n1:OfficeLocation"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </x'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 10 FOR UPDATE; buffer := 'sl:for-each> </fo:block> </fo:block> </xsl:for-each> </xsl:if> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell display-align="before" width="20%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">From:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell width="80%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Submissions"> <xsl:for-each select="n1:CommitteeMember"> <xsl:if test="n1:CommitteeMemberRole/n1:MemberRoleDesc = &apos;Chair&apos;"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Firstname"> <xsl:if test="../../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:if> </xsl:for-each> <fo:inline font-size="10pt">&#160;</fo:inline> <xsl:for-each select="n1:LastName"> <xsl:if test="../../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:if> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 10 FOR UPDATE; buffer := ' </xsl:for-each> </xsl:for-each> </xsl:for-each> <fo:inline font-size="10pt">, Chair </fo:inline> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Submissions"> <xsl:for-each select="n1:CommitteeMasterData"> <xsl:for-each select="n1:CommitteeName"> <xsl:if test="../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:block> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell display-align="before" width="20%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">Date:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell width="80%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <xsl:for-each select="n1:CurrentDate"> <fo:inline font-size="10pt" /> <xsl:value-of select="format-number(substring(., 6, 2), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(substring(., 9, 2), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(substring(., 1, 4), ''0000'')" /> </xsl:for-each> </fo'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 10 FOR UPDATE; buffer := ':block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell display-align="before" width="20%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">Committee Action:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell width="80%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">Substantive Revisions Required</fo:inline> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block text-align="justify"> <fo:block> <xsl:text>&#xA;</xsl:text> </fo:block> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="127pt" /> <fo:table-column column-width="proportional-column-width(80)" /> <fo:table-body> <fo:table-row> <fo:table-cell display-align="before" width="127pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">IRB Action Date: </fo:inline> <fo:inline font-size="10pt">&#160;&#160;&#160;&#160; </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell display-align="before" width="80%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Submissions"> <xsl:for-each select="n1:SubmissionDetails"> <xsl:for-each select="n1:ActionType"> <xsl:for-each select="n1:ActionDate"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 10 FOR UPDATE; buffer := ' <xsl:if test="../../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <xsl:value-of select="format-number(substring(., 6, 2), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(substring(., 9, 2), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(substring(., 1, 4), ''0000'')" /> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell width="20%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">IRB Protocol #:</fo:inline> <fo:inline font-size="10pt">&#160;&#160;&#160; </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell display-align="before" width="80%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:ProtocolMasterData"> <xsl:for-each select="n1:ProtocolNumber"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell width="127pt" padding-start="3pt" padding-e'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 10 FOR UPDATE; buffer := 'nd="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">Study Title:</fo:inline> <fo:inline font-size="10pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell display-align="before" width="80%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:ProtocolMasterData"> <xsl:for-each select="n1:ProtocolTitle"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:block> <xsl:text>&#xA;</xsl:text> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block /> </fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block /> </fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:inline font-size="10pt">At its meeting on </fo:inline> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Submissi'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 10 FOR UPDATE; buffer := 'ons"> <xsl:for-each select="n1:ScheduleMasterData"> <xsl:for-each select="n1:MeetingDate"> <xsl:if test="../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <fo:inline font-size="10pt" /> <xsl:value-of select="format-number(substring(., 6, 2), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(substring(., 9, 2), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(substring(., 1, 4), ''0000'')" /> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> <fo:inline font-size="10pt">, the Committee On the Use of Humans as Experimental Subjects</fo:inline> <fo:inline font-size="10pt"> reviewed the above mentioned protocol and determined that substantive revisions are required. These revisions are noted below.&#160; If you agree with all of the committee&apos;s revisions, incorporate them in a revised protocol and/or consent form and submit it to the </fo:inline> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Submissions"> <xsl:for-each select="n1:CommitteeMasterData"> <xsl:for-each select="n1:CommitteeName"> <xsl:if test="../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> <fo:inline font-size="10pt"> for expeditious review.</fo:inline> </fo:block> </fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:blo'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 10 FOR UPDATE; buffer := 'ck> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:inline font-size="10pt">If you disagree with the committee&apos;s recommendations, you may do the following:&#160; Please justify to the </fo:inline> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Submissions"> <xsl:for-each select="n1:CommitteeMasterData"> <xsl:for-each select="n1:CommitteeName"> <xsl:if test="../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> <fo:inline font-size="10pt"> why the revisions should not be incorporated. </fo:inline> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <xsl:text>&#xA;</xsl:text> </fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block color="black" space-before.optimum="-8pt"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 10 FOR UPDATE; buffer := ' <fo:leader leader-length="100%" leader-pattern="rule" rule-thickness="1pt" /> </fo:block> <fo:inline font-size="10pt" font-weight="bold">Requested Revisions:</fo:inline> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Submissions"> <xsl:for-each select="n1:Minutes"> <xsl:for-each select="n1:MinuteEntry"> <fo:block white-space-collapse="false" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <xsl:if test="../n1:PrivateCommentFlag = &quot;false&quot; and ../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <fo:list-block provisional-distance-between-starts="7mm" provisional-label-separation="2mm" start-indent="2mm" space-before.optimum="4pt" space-after.optimum="4pt"> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block font-family="Courier" font-size="15pt" line-height="14pt" padding-before="2pt">&#x2022;</fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 10 FOR UPDATE; buffer := ' </fo:block> </fo:list-item-body> </fo:list-item> </fo:list-block> </xsl:if> </fo:block> </fo:block> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 10 FOR UPDATE; buffer := ' <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <xsl:text>&#xA;</xsl:text> </fo:block> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="31pt" /> <fo:table-column /> <fo:table-body> <fo:table-row> <fo:table-cell display-align="before" width="31pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block /> </fo:table-cell> <fo:table-cell padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block /> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="47pt" /> <fo:table-column column-width="452pt" /> <fo:table-body> <fo:table-row> <fo:table-cell width="47pt" padding-start="3pt" padding-end="3pt" padd'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 10 FOR UPDATE; buffer := 'ing-before="3pt" padding-after="3pt" display-align="center" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <fo:inline font-size="10pt">cc</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <fo:inline font-size="10pt">Tom Duff</fo:inline> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell height="32pt" width="47pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block /> </fo:table-cell> <fo:table-cell display-align="before" height="32pt" width="452pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start" border-style="solid" border-width="1pt" border-color="white"> <fo:block> <fo:block white-space-collapse="false" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Correspondent"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 10 FOR UPDATE; buffer := ' <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Fullname"> <xsl:if test="../../n1:TypeOfCorrespondent = &apos;CRC&apos;"> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </fo:block> </fo:block> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:block> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </fo:block> </fo:block> <fo:blo'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 10 FOR UPDATE; buffer := 'ck white-space-collapse="false" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block> <xsl:text>&#xA;</xsl:text> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> <fo:block white-space-collapse="false" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:inline font-size="10pt"> </fo:inline> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 10 FOR UPDATE; buffer := ' </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </xsl:for-each> </fo:block> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> </xsl:stylesheet> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / INSERT INTO PROTO_CORRESP_TEMPL (COMMITTEE_ID,CORRESPONDENCE_TEMPLATE,FILE_NAME,OBJ_ID,PROTO_CORRESP_TEMPL_ID,PROTO_CORRESP_TYPE_CODE,UPDATE_TIMESTAMP,UPDATE_USER,VER_NBR) VALUES ('DEFAULT',EMPTY_CLOB(),'DEFAULT-5-ExpeditedApprovalLetter.xsl','9CD01EA17C609DADE040DC0A1F8A714D',11,'5',TO_DATE( '20110221133453', 'YYYYMMDDHH24MISS' ),'KCRELEASE',1) / -- Length: 93276 -- Chunks: 24 DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 11 FOR UPDATE; buffer := '<?xml version="1.0" encoding="UTF-8"?> <!--Designed and generated by Altova StyleVision Enterprise Edition 2008 rel. 2 - see http://www.altova.com/stylevision for more information.--> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:n1="http://irb.mit.edu/irbnamespace" xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:output version="1.0" method="xml" encoding="UTF-8" indent="no"/> <xsl:param name="SV_OutputFormat" select="''PDF''"/> <xsl:variable name="XML" select="/"/> <xsl:variable name="fo:layout-master-set"> <fo:layout-master-set> <fo:simple-page-master master-name="default-page" page-height="11in" page-width="8.5in" margin-left="0.6in" margin-right="1.0in"> <fo:region-body margin-top="0.79in" margin-bottom="0.79in"/> <fo:region-before extent="0.79in"/> </fo:simple-page-master> </fo:layout-master-set> </xsl:variable> <xsl:template match="/"> <fo:root> <xsl:copy-of select="$fo:layout-master-set"/> <fo:page-sequence master-reference="default-page" initial-page-number="1" format="1"> <xsl:call-template name="headerall"/> <fo:flow flow-name="xsl-region-body"> <fo:block> <xsl:for-each select="$XML"> <fo:external-graphic> <xsl:attribute name="src"> <xsl:text>url(</xsl:text> <xsl:call-template name="double-backslash"> <xsl:with-param name="text"> <xsl:value-of select="string(&apos;http://localhost:8080/CoeusApplet/images/couhes_byline2.gif&apos;)"/> </xsl:with-param> <xsl:with-param name="text-length"> <xsl:value-of select="string-length(string(&apos;http://localhost:8080/CoeusApplet/images/couhes_byline2.gif&apos;))"/> </xsl:with-param> </xsl:call-template> <xsl:text>)</xsl:text> </xsl:attribute> </fo:external-graphic> <fo:block/> <xsl:for-each select="n1:Correspondence"> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block font-size="10pt" font-style="normal" margin="0pt"> <fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:table table-layout="fixed" width="100%" border-spacing="2pt"> <fo:table-column column-width="127"/> <fo:table-column column-width="388"/> <fo:table-body start-indent="0pt"> <fo:table-row> <fo:table-cell padding="2pt" display-align="before"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 11 FOR UPDATE; buffer := ' <fo:block> <fo:inline font-size="10pt" font-weight="bold"> <xsl:text>To:</xsl:text> </fo:inline> <fo:inline font-size="10pt"> <xsl:text>&#160;&#160;&#160;&#160;&#160; </xsl:text> </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" display-align="center"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Investigator"> <xsl:if test="n1:PI_flag = &apos;true&apos;"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Firstname"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:for-each> <fo:inline font-size="10pt"> <xsl:text>&#160;</xsl:text> </fo:inline> <xsl:for-each select="n1:LastName"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 11 FOR UPDATE; buffer := ' <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:for-each> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 11 FOR UPDATE; buffer := ' <fo:block white-space="pre" white-space-collapse="false" margin="0pt"> <fo:block> <xsl:for-each select="n1:OfficeLocation"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:for-each> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </xsl:for-each> </xsl:if> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/>'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 11 FOR UPDATE; buffer := ' </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:inline font-size="10pt" font-weight="bold"> <xsl:text>From:</xsl:text> </fo:inline> </fo:block> </fo:block> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" display-align="center"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:if test="n1:Submissions/n1:CurrentSubmissionFlag =&apos;No&apos;"> <xsl:for-each select="n1:Submissions"> <xsl:for-each select="n1:CommitteeMember"> <xsl:if test="n1:CommitteeMemberRole/n1:MemberRoleDesc = &apos;Chair&apos;"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Firstname"> <xsl:if test="../../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 11 FOR UPDATE; buffer := ' <fo:block font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:if> </xsl:for-each> <fo:inline font-size="10pt"> <xsl:text>&#160;</xsl:text> </fo:inline> <xsl:for-each select="n1:LastName"> <xsl:if test="../../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 11 FOR UPDATE; buffer := ' </xsl:choose> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:if> </xsl:for-each> <fo:inline font-size="10pt"> <xsl:text>, Chair </xsl:text> </fo:inline> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:if test="n1:Submissions/n1:CurrentSubmissionFlag =&apos;No&apos;"> <xsl:for-each select="n1:Submissions"> <xsl:for-each select="n1:CommitteeMasterData"> <xsl:for-each select="n1:CommitteeName"> <xsl:if test="../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 11 FOR UPDATE; buffer := ' <xsl:otherwise> <fo:inline font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:if> </xsl:for-each> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:inline font-size="10pt" font-weight="bold"> <xsl:text>Date:</xsl:text> </fo:inline> </fo:block> </fo:block> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" display-align="center"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-cont'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 11 FOR UPDATE; buffer := 'ainer> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <xsl:for-each select="n1:CurrentDate"> <fo:inline font-size="10pt"> <xsl:value-of select="format-number(number(substring(string(string(.)), 6, 2)), ''00'')"/> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(string(.)), 9, 2)), ''00'')"/> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(string(string(.))), 1, 4)), ''0000'')"/> </fo:inline> </xsl:for-each> </fo:block> </fo:block> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:inline font-size="10pt" font-weight="bold"> <xsl:text>Committee Action:</xsl:text> </fo:inline> </fo:block> </fo:block> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" display-align="center"> <fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 11 FOR UPDATE; buffer := ' <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <xsl:choose> <xsl:when test="n1:Protocol/n1:Submissions/n1:CurrentSubmissionFlag =&apos;No&apos; and n1:Protocol/n1:Submissions/n1:SubmissionDetails/n1:ProtocolReviewTypeCode = 1"> <fo:inline font-size="10pt" font-weight="bold"> <xsl:text>Approval</xsl:text> </fo:inline> </xsl:when> <xsl:when test="n1:Protocol/n1:Submissions/n1:CurrentSubmissionFlag =&apos;No&apos; and n1:Protocol/n1:Submissions/n1:SubmissionDetails/n1:SubmissionTypeCode = 102"> <fo:inline font-weight="bold"> <xsl:text>Amendment to Approved Protocol</xsl:text> </fo:inline> </xsl:when> <xsl:when test="n1:Protocol/n1:Submissions/n1:CurrentSubmissionFlag =&apos;No&apos; and n1:Protocol/n1:Submissions/n1:SubmissionDetails/n1:SubmissionTypeCode = 101"> <fo:inline font-weight="bold"> <xsl:text>Renewal</xsl:text> </fo:inline> </xsl:when> <xsl:otherwise> <fo:inline font-weight="bold"> <xsl:text>Expedited Approval</xsl:text> </fo:inline> </xsl:otherwise> </xsl:choose> </fo:block> </fo:block> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:table table-layout="fixed" width="10'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 11 FOR UPDATE; buffer := '0%" border-spacing="2pt"> <fo:table-column column-width="127"/> <fo:table-column column-width="380"/> <fo:table-body start-indent="0pt"> <fo:table-row> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <fo:inline font-size="10pt" font-weight="bold"> <xsl:text>Approval Date: </xsl:text> </fo:inline> <fo:inline font-size="10pt"> <xsl:text>&#160;&#160;&#160;&#160; </xsl:text> </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:ProtocolMasterData"> <xsl:for-each select="n1:ApprovalDate"> <fo:inline> <xsl:value-of select="format-number(number(substring(string(string(.)), 6, 2)), ''00'')"/> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(string(.)), 9, 2)), ''00'')"/> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(string(string(.))), 1, 4)), ''0000'')"/> </fo:inline> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell padding="2pt" display-align="center"> <fo:block> <fo:inline font-size="10pt" font-weight="bold"> <xsl:text>IRB Protocol #:</xsl:text> </fo:inline> <fo:inline font-size="10pt"> <xsl:text>&#160;&#160;&#160; </xsl:text> </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" displa'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 11 FOR UPDATE; buffer := 'y-align="before"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:ProtocolMasterData"> <xsl:for-each select="n1:ProtocolNumber"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell padding="2pt" display-align="center"> <fo:block> <fo:inline font-size="10pt" font-weight="bold"> <xsl:text>Study Title: </xsl:text> </fo:inline> <fo:inline font-size="10pt"> <xsl:text>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </xsl:text> </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:ProtocolMasterData"> <xsl:for-each select="n1:ProtocolTitle"> <xsl:variable name="value-of-template"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 11 FOR UPDATE; buffer := ' <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell padding="2pt" display-align="center"> <fo:block> <fo:inline font-weight="bold"> <xsl:text>Expiration Date:</xsl:text> </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:ProtocolMasterData"> <xsl:for-each select="n1:ExpirationDate"> <fo:inline> <xsl:value-of select="format-number(number(substring(string(string(.)), 6, 2)), ''00'')"/> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(string(.)), 9, 2)), ''00'')"/> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(string(string(.))), 1, 4)), ''0000'')"/> </fo:inline> </xsl:for-each> </xsl:for-each> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 11 FOR UPDATE; buffer := ' </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </fo:block> </fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <xsl:choose> <xsl:when test="n1:Protocol/n1:Submissions/n1:CurrentSubmissionFlag =&apos;No&apos; and n1:Protocol/n1:Submissions/n1:SubmissionDetails/n1:ProtocolReviewTypeCode = 1"> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>T</xsl:text> </fo:inline> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>he above-referenced protocol has been APPROVED following Full Board Review by the Institutional Review Board for the period of </xsl:text> </fo:inline> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:ProtocolMasterData"> <xsl:for-each select="n1:ApprovalDate"> <fo:inline font-family="Arial" font-size="10pt"> <xsl:value-of select="format-number(number(substring(string(string(.)), 6, 2)), ''00'')"/> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(string(.)), 9, 2)), ''00'')"/> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(string(string(.))), 1, 4)), ''0000'')"/> </fo:inline> </xsl:for-each> </xsl:for-each> </xsl:for-each> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text> through </xsl:text> </fo:inline> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:ProtocolMasterData"> <xsl:for-each select="n1:ExpirationDate"> <fo:inline font-family="Arial" font-size="10pt"> <xsl:value-of select="format-number(number(substring(string(string(.)), 6, 2)), ''00'')"/> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 11 FOR UPDATE; buffer := ' <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(string(.)), 9, 2)), ''00'')"/> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(string(string(.))), 1, 4)), ''0000'')"/> </fo:inline> </xsl:for-each> </xsl:for-each> </xsl:for-each> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>.&#160; This approval does not replace any departmental or other approvals that may be required.&#160; It is the Principal Investigator&apos;s responsibility to obtain review and continued approval of ongoing research before the expiration date noted above.&#160; Please allow sufficient time for reapproval.&#160; Research activity of any sort may not continue beyond the expiration date without committee approval.&#160; Failure to receive approval for continuation before the expiration date will result in the automatic suspension of the approval of this protocol on the expiration date.&#160; Information</xsl:text> </fo:inline> <fo:inline font-family="Arial" font-size="10pt" font-weight="bold"> <xsl:text>&#160;</xsl:text> </fo:inline> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>collected following suspension is unapproved research and cannot be reported or published as research data.&#160; </xsl:text> </fo:inline> <fo:block/> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>If you do not wish continued approval, please notify the Committee of the study termination.</xsl:text> </fo:inline> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>This approval by the </xsl:text> </fo:inline> <xsl:for-each select="n1:Protocol"> <xsl:if test="n1:Submissions/n1:CurrentSubmissionFlag =&apos;No&apos;"> <xsl:for-each select="n1:Submissions"> <xsl:for-each select="n1:CommitteeMasterData"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 11 FOR UPDATE; buffer := ' <xsl:for-each select="n1:CommitteeName"> <xsl:if test="../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-family="Arial" font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-family="Arial" font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:if> </xsl:for-each> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text> does not replace or supersede any departmental or oversight committee review that may be required by institutional policy.</xsl:text> </fo:inline> </fo:block> </fo:block> </xsl:when> <xsl:when test="n1:Protocol/n1:Submissions/n1:CurrentSubmissionFlag =&apos;No&apos; and n1:Protocol/n1:Submissions/n1:SubmissionDetails/n1:SubmissionTypeCode = 102"> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>The amendment to the above-referenced protocol has been APPROVED following Expedited Review by the Institutional Review Board.</xsl:text> </fo:inline> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>&#160;</xsl:text> </fo:inline> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text> This approval does not replace any departmental or '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 11 FOR UPDATE; buffer := 'other approvals that may be required.&#160; It is the Principal Investigator&apos;s responsibility to obtain review and continued approval of ongoing research before the expiration noted above.&#160; Please allow sufficient time for reapproval.&#160; Research activity of any sort may not continue beyond the expiration date without committee approval.&#160; Failure to receive approval for continuation before the expiration date will result in the automatic suspension of the approval of this protocol on the expiration date.&#160; Information</xsl:text> </fo:inline> <fo:inline font-family="Arial" font-size="10pt" font-weight="bold"> <xsl:text>&#160;</xsl:text> </fo:inline> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>collected following suspension is unapproved research and cannot be reported or published as research data.&#160; If you do not wish continued approval, please notify the Committee of the study termination.</xsl:text> </fo:inline> <fo:block/> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>This approval by the </xsl:text> </fo:inline> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Submissions"> <xsl:for-each select="n1:CommitteeMasterData"> <xsl:for-each select="n1:CommitteeName"> <xsl:if test="../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-family="Arial" font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-family="Arial" font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 11 FOR UPDATE; buffer := '-each> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text> does not replace or supersede any departmental or oversight committee review that may be required by institutional policy.</xsl:text> </fo:inline> </xsl:when> <xsl:when test="n1:Protocol/n1:Submissions/n1:CurrentSubmissionFlag =&apos;No&apos; and n1:Protocol/n1:Submissions/n1:SubmissionDetails/n1:SubmissionTypeCode = 101"> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>The above-referenced protocol was given renewed approval following Expedited Review by the Institutional Review Board.&#160; </xsl:text> </fo:inline> <fo:block/> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>It is the Principal Investigator&apos;s responsibility to obtain review and continued approval of ongoing research before the expiration noted above.&#160; Please allow sufficient time for reapproval.&#160; Research activity of any sort may not continue beyond the expiration date without committee approval.&#160; Failure to receive approval for continuation before the expiration date will result in the automatic suspension of the approval of this protocol on the expiration date.&#160; Information</xsl:text> </fo:inline> <fo:inline font-family="Arial" font-size="10pt" font-weight="bold"> <xsl:text>&#160;</xsl:text> </fo:inline> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>collected following suspension is unapproved research and cannot be reported or published as research data.&#160; If you do not wish continued approval, please notify the Committee of the study termination.</xsl:text> </fo:inline> <fo:block/> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>This approval by the </xsl:text> </fo:inline> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Submissions"> <xsl:for-each select="n1:CommitteeMasterData"> <xsl:for-each select="n1:CommitteeName"> <xsl:if test="../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-family="Arial" font-size="10pt"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 11 FOR UPDATE; buffer := ' <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-family="Arial" font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text> does not replace or supersede any departmental or oversight committee review that may be required by institutional policy.</xsl:text> </fo:inline> </xsl:when> <xsl:otherwise> <fo:inline font-size="10pt"> <xsl:text>The above-referenced protocol was approved following expedited review by the Institutional Review Board.</xsl:text> </fo:inline> <fo:block/> <fo:inline font-size="10pt"> <xsl:text>It is the Principal Investigator&apos;s responsibility to obtain review and continued approval before the expiration date.&#160; You may not continue any research activity beyond the expiration date without approval by the Institutional Review Board.</xsl:text> </fo:inline> </xsl:otherwise> </xsl:choose> <fo:block/> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>Adverse Reactions:&#160; If any untoward incidents or severe reactions should develop as a result of this study, you are required to notify the&#160; </xsl:text> </fo:inline> <xsl:for-each select="n1:Protocol"> <xsl:if test="n1:Submissions/n1:CurrentSubmissionFlag =&apos;No&apos;"> <xsl:for-each select="n1:Submissions"> <xsl:for-each select="n1:CommitteeMasterData"> <xsl:for-each select="n1:CommitteeName"> <xsl:if test="../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 11 FOR UPDATE; buffer := ' <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-family="Arial" font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-family="Arial" font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:if> </xsl:for-each> <fo:inline font-size="10pt"> <xsl:text>&#160;</xsl:text> </fo:inline> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>i</xsl:text> </fo:inline> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>mmediately.&#160; If necessary a member of the IRB will be assigned to look into the matter.&#160; If the problem is serious, approval may be withdrawn pending IRB review.</xsl:text> </fo:inline> <fo:block/> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>Amendments: If you wish to change any aspect of this study, such as the procedures, the consent forms, or the investigators, please communicate your requested changes to the</xsl:text> </fo:inline> <fo:inline font-size="10pt"> <xsl:text>&#160;</xsl:text> </fo:inline> <xsl:for-each select="n1:Protocol"> <xsl:if test="n1:Submissions/n1:CurrentSubmissionFlag =&apos;No&apos;"> <xsl:for-each select="n1:Submissions"> <xsl:for-each select="n1:CommitteeMasterData"> <xsl:for-each select="n1:CommitteeName"> <xsl:if test="../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 11 FOR UPDATE; buffer := ' <fo:block font-family="Arial" font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-family="Arial" font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:if> </xsl:for-each> <fo:inline font-size="10pt"> <xsl:text>.&#160; </xsl:text> </fo:inline> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>The new procedure is not to be initiated until the IRB approval has been given.</xsl:text> </fo:inline> <fo:block/> <fo:inline font-family="Arial" font-size="10pt"> <xsl:text>Please retain a copy of this letter with your approved protocol.</xsl:text> </fo:inline> <fo:block/> <fo:inline> <xsl:text> </xsl:text> </fo:inline> <fo:inline> <xsl:text> </xsl:text> </fo:inline> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:table page-break-before="auto" table-layout="auto" width="100%" border-spacing="2pt"> <fo:table-column column-width="25"/> <fo:table-column column-width="proportional-column-width(1)"/> <fo:table-body start-indent="0pt"> <fo:table-row> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <xsl:if test="(n1:Protocol/n1:KeyStudyPerson/n1:Person/n1:PersonID != &apos;null&apos;) and (n1:Protocol/n1:Correspondent/n1:Person/n1:PersonID != &apos;null&apos;)"> <fo:inline font-size="10pt"> <xsl:text>cc:</xsl:text> </fo:inline> </x'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 11 FOR UPDATE; buffer := 'sl:if> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" display-align="center"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:KeyStudyPerson"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Fullname"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:for-each> </xsl:for-each> <xsl:for-each select="n1:Correspondent"> <xsl:if test="n1:TypeOfCorrespondent = &apos;Protocol level&apos;"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Fullname"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:block> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 11 FOR UPDATE; buffer := ' </xsl:when> <xsl:otherwise> <fo:inline font-size="10pt"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:for-each> </xsl:if> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:block/> <fo:inline font-size="10pt"> <xsl:text> </xsl:text> </fo:inline> </fo:block> </fo:block> </xsl:for-each> </xsl:for-each> </fo:block> <fo:block id="SV_RefID_PageTotal"/> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> <xsl:template name="headerall"> <fo:static-content flow-name="xsl-region-before"> <fo:block> <xsl:for-each select="$XML"> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:table table-layout="fixed" width="100%" border-spacing="2pt"> <fo:table-column column-width="proportional-column-width(1)"/> <fo:table-column column-width="150"/> <fo:table-body start-indent="0pt"> <fo:table-row> <fo:table-cell padding="0" number-columns-spanned="2" height="30" display-align="center"> <fo:block/> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell font-size="smaller" padding="0" text-align="left" display-align="center"> <fo:block/> </fo:table-cell> <fo:table-cell font-size="smaller" padding="0" text-align="right" display-align="center"> <fo:block/> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell padding="0" number-columns-spanned="2" display-align="center"> <fo:block/> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </xsl:for-each> </fo:block> </fo:static-content> </xsl:template'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 11 FOR UPDATE; buffer := '> <xsl:template name="double-backslash"> <xsl:param name="text"/> <xsl:param name="text-length"/> <xsl:variable name="text-after-bs" select="substring-after($text, ''\'')"/> <xsl:variable name="text-after-bs-length" select="string-length($text-after-bs)"/> <xsl:choose> <xsl:when test="$text-after-bs-length = 0"> <xsl:choose> <xsl:when test="substring($text, $text-length) = ''\''"> <xsl:value-of select="concat(substring($text,1,$text-length - 1), ''\\'')"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$text"/> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:value-of select="concat(substring($text,1,$text-length - $text-after-bs-length - 1), ''\\'')"/> <xsl:call-template name="double-backslash"> <xsl:with-param name="text" select="$text-after-bs"/> <xsl:with-param name="text-length" select="$text-after-bs-length"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:template> </xsl:stylesheet> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / INSERT INTO PROTO_CORRESP_TEMPL (COMMITTEE_ID,CORRESPONDENCE_TEMPLATE,FILE_NAME,OBJ_ID,PROTO_CORRESP_TEMPL_ID,PROTO_CORRESP_TYPE_CODE,UPDATE_TIMESTAMP,UPDATE_USER,VER_NBR) VALUES ('DEFAULT',EMPTY_CLOB(),'DEFAULT-6-SpecificMinorRevisionsLetter.xsl','9CD01EA17C619DADE040DC0A1F8A714D',12,'6',TO_DATE( '20110221133453', 'YYYYMMDDHH24MISS' ),'KCRELEASE',1) / -- Length: 65869 -- Chunks: 17 DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 12 FOR UPDATE; buffer := '<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:n1="http://irb.mit.edu/irbnamespace" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xsl:variable name="fo:layout-master-set"> <fo:layout-master-set> <fo:simple-page-master master-name="default-page" page-height="11in" page-width="8.5in" margin-left="0.6in" margin-right="0.6in"> <fo:region-body margin-top="0.79in" margin-bottom="0.79in" /> <fo:region-before extent="0.79in" /> </fo:simple-page-master> </fo:layout-master-set> </xsl:variable> <xsl:output version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="no" media-type="text/html" /> <xsl:template match="/"> <fo:root> <xsl:copy-of select="$fo:layout-master-set" /> <fo:page-sequence master-reference="default-page" initial-page-number="1" format="1"> <fo:static-content flow-name="xsl-region-before"> <fo:block> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column /> <fo:table-column column-width="150pt" /> <fo:table-body> <fo:table-row> <fo:table-cell padding-bottom="0pt" padding-left="0pt" padding-right="0pt" padding-top="0pt" border-style="solid" border-width="1pt" border-color="white" height="30pt" number-columns-spanned="2" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block /> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell font-size="inherited-property-value(&apos;font-size&apos;) - 2pt" padding-bottom="0pt" padding-left="0pt" padding-right="0pt" padding-top="0pt" border-style="solid" border-width="1pt" border-color="white" text-align="left" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center"> <fo:block /> </fo:table-cell> <fo:table-cell font-size="inherited-property-value(&apos;font-size&apos;) - 2pt" padding-bottom="0pt" padding-left="0pt" padding-right="0pt" padding-top="0pt" border-style="solid" border-width="1pt" border-color="white" text-align="right" width="150pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center"> <fo:block /> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell padding-bottom="0pt" padding-left="0pt" padding-right="0pt" padding-top="0pt" border-style="solid" border-width="1pt" border-color="white" number-columns-spanned="2" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block /> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </fo:block> </fo:static-content> <fo:flow flow-name="xsl-region-body"> <fo:block> <fo:external-graphic space-before.optimum="4pt" space-after.optimum="4pt"> <xsl:attribute name="src">url(''<xsl:text disable-output-escaping="yes">/export/home/www/https/tomcat5.0.2'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 12 FOR UPDATE; buffer := '5/webapps/coeus/images/couhes_byline2.gif</xsl:text>'')</xsl:attribute> </fo:external-graphic> <fo:block color="black" space-before.optimum="-8pt"> <fo:leader leader-length="100%" leader-pattern="rule" rule-thickness="1pt" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <xsl:for-each select="n1:Correspondence"> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="proportional-column-width(20)" /> <fo:table-column column-width="proportional-column-width(80)" /> <fo:table-body> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="20%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">To:</fo:inline> <fo:inline font-size="10pt">&#160;&#160;&#160;&#160;&#160; </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="80%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Investigator"> <xsl:if test="n1:PI_flag = &apos;true&apos;"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Firstname"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> <fo:inline font-size="10pt">&#160;</fo:inline> <xsl:for-each select="n1:LastName"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> <fo:block white-space-collapse="false" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <xsl:for-each select="n1:O'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 12 FOR UPDATE; buffer := 'fficeLocation"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> </fo:block> </fo:block> </xsl:for-each> </xsl:if> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="20%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">From:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="80%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Submissions"> <xsl:for-each select="n1:CommitteeMember"> <xsl:if test="n1:CommitteeMemberRole/n1:MemberRoleDesc = &apos;Chair&apos;"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Firstname"> <xsl:if test="../../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:if> </xsl:for-each> <fo:inline font-size="10pt">&#160;</fo:inline> <xsl:for-each select="n1:LastName"> <xsl:if test="../../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <fo:inline font-size="10pt"> <xsl:apply-templates /> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 12 FOR UPDATE; buffer := ' </fo:inline> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> <fo:inline font-size="10pt">, Chair </fo:inline> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Submissions"> <xsl:for-each select="n1:CommitteeMasterData"> <xsl:for-each select="n1:CommitteeName"> <xsl:if test="../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:block> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="20%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">Date:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="80%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <xsl:for-each select="n1:CurrentDate"> <fo:inline font-size="10pt"> <xsl:value-of select="format-number(number(substring(string(.), 6, 2)), ''00'')" /> <xsl:text>/</xsl:text> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 12 FOR UPDATE; buffer := ' <xsl:value-of select="format-number(number(substring(string(.), 9, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 1, 4)), ''0000'')" /> </fo:inline> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="20%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">Committee Action:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="80%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">Specific Minor Revisions Required</fo:inline> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block text-align="justify"> <fo:block> <xsl:text>&#xA;</xsl:text> </fo:block> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="proportional-column-width(20)" /> <fo:table-column column-width="proportional-column-width(80)" /> <fo:table-body> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="20%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">IRB Action Date </fo:inline> <fo:inline font-size="10pt">&#160;&#160;&#160;&#160; </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="80%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 12 FOR UPDATE; buffer := ' <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Submissions"> <xsl:for-each select="n1:SubmissionDetails"> <xsl:for-each select="n1:ActionType"> <xsl:for-each select="n1:ActionDate"> <xsl:if test="../../../n1:CurrentSubmissionFlag =&apos;Yes&apos;"> <xsl:value-of select="format-number(number(substring(string(.), 6, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 9, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 1, 4)), ''0000'')" /> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="20%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">IRB Protocol # </fo:inline> <fo:inline font-size="10pt">&#160;&#160;&#160; </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="80%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:ProtocolMasterData"> <xsl:for-each select="n1:ProtocolNumber"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 12 FOR UPDATE; buffer := ' </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="20%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">Study Title </fo:inline> <fo:inline font-size="10pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="80%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:ProtocolMasterData"> <xsl:for-each select="n1:ProtocolTitle"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:block> <xsl:text>&#xA;</xsl:text> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block /> </fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block /> </fo:block> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 12 FOR UPDATE; buffer := ' <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:inline font-size="10pt">At its meeting on&#160; </fo:inline> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Submissions"> <xsl:for-each select="n1:ScheduleMasterData"> <xsl:for-each select="n1:MeetingDate"> <xsl:if test="../../n1:CurrentSubmissionFlag =&apos;Yes&apos;"> <fo:inline font-size="10pt"> <xsl:value-of select="format-number(number(substring(string(.), 6, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 9, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 1, 4)), ''0000'')" /> </fo:inline> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> <fo:inline font-size="10pt">, the Committee On the Use of Humans as Experimental Subjects</fo:inline> <fo:inline font-size="10pt"> reviewed the above mentioned protocol and determined that specific minor revisions are required. These revisions are noted&#160; below.&#160; If you agree with all of the committee&apos;s revisions, incorporate them in a revised protocol and/or consent form and submit it to the </fo:inline> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Submissions"> <xsl:for-each select="n1:CommitteeMasterData"> <xsl:for-each select="n1:CommitteeName"> <xsl:if test="../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:if> </xsl:for-each> <'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 12 FOR UPDATE; buffer := '/xsl:for-each> </xsl:for-each> </xsl:for-each> <fo:inline font-size="10pt"> for expeditious review.</fo:inline> </fo:block> </fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:inline font-size="10pt">If you disagree with the committee&apos;s recommendations, you may do the following:&#160; Please justify to the&#160; </fo:inline> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Submissions"> <xsl:for-each select="n1:CommitteeMasterData"> <xsl:for-each select="n1:CommitteeName"> <xsl:if test="../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> <fo:inline font-size="10pt"> why the revisions should not be incorporated.&#160; </fo:inline> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 12 FOR UPDATE; buffer := ' <fo:block> <xsl:text>&#xA;</xsl:text> </fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block color="black" space-before.optimum="-8pt"> <fo:leader leader-length="100%" leader-pattern="rule" rule-thickness="1pt" /> </fo:block> <fo:inline font-size="10pt" font-weight="bold">Requested Revisions:</fo:inline> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Submissions"> <xsl:for-each select="n1:Minutes"> <xsl:for-each select="n1:MinuteEntry"> <fo:block white-space-collapse="false" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <xsl:if test="../n1:PrivateCommentFlag = &quot;false&quot; and ../../n1:CurrentSubmissionFlag =&apos;Yes&apos;"> <fo:list-block provisional-distance-between-starts="7mm" provisional-label-separation="2mm" start-indent="2mm" space-before.optimum="4pt" space-after.optimum="4pt"> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block font-family="Courier" font-size="15pt" line-height="14pt" padding-before="2pt">&#x2022;</fo:blo'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 12 FOR UPDATE; buffer := 'ck> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </fo:block> </fo:list-item-body> </fo:list-item> </fo:list-block> </xsl:if> </fo:block> </fo:block> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 12 FOR UPDATE; buffer := ' <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <xsl:text>&#xA;</xsl:text> </fo:block> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="31pt" /> <fo:table-column /> <fo:table-body> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="31pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block /> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block /> </fo:block> </fo:block> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 12 FOR UPDATE; buffer := ' </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <xsl:text>&#xA;</xsl:text> </fo:block> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="27pt" /> <fo:table-column column-width="452pt" /> <fo:table-body> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="27pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <fo:inline font-size="10pt">cc:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell bord'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 12 FOR UPDATE; buffer := 'er-style="solid" border-width="1pt" border-color="white" display-align="before" width="452pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <fo:inline font-size="10pt">Tom Duff</fo:inline> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="27pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block /> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="452pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Correspondent"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Fullname"> <xsl:if test="../../n1:TypeOfCorrespondent = &apos;CRC&apos;"> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:inline font-size="10pt"> <xsl:apply-templates /> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 12 FOR UPDATE; buffer := ' </fo:inline> </fo:block> </fo:block> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <xsl:text>&#xA;</xsl:text> </fo:block> </fo:block> </fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:inline font-size="10pt"> </fo:inline> </fo:block> </fo:block'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 12 FOR UPDATE; buffer := '> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </xsl:for-each> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2p'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 12 FOR UPDATE; buffer := 't"> <fo:block /> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> </xsl:stylesheet> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / INSERT INTO PROTO_CORRESP_TEMPL (COMMITTEE_ID,CORRESPONDENCE_TEMPLATE,FILE_NAME,OBJ_ID,PROTO_CORRESP_TEMPL_ID,PROTO_CORRESP_TYPE_CODE,UPDATE_TIMESTAMP,UPDATE_USER,VER_NBR) VALUES ('DEFAULT',EMPTY_CLOB(),'DEFAULT-7-SuspensionNotice.xsl','9CD01EA17C629DADE040DC0A1F8A714D',13,'7',TO_DATE( '20110221133453', 'YYYYMMDDHH24MISS' ),'KCRELEASE',1) / -- Length: 35773 -- Chunks: 9 DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 13 FOR UPDATE; buffer := '<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:n1="http://irb.mit.edu/irbnamespace" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xsl:variable name="fo:layout-master-set"> <fo:layout-master-set> <fo:simple-page-master master-name="default-page" page-height="11in" page-width="8.5in" margin-left="0.6in" margin-right="0.6in"> <fo:region-body margin-top="0.79in" margin-bottom="0.79in" /> <fo:region-before extent="0.79in" /> </fo:simple-page-master> </fo:layout-master-set> </xsl:variable> <xsl:output version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="no" media-type="text/html" /> <xsl:template match="/"> <fo:root> <xsl:copy-of select="$fo:layout-master-set" /> <fo:page-sequence master-reference="default-page" initial-page-number="1" format="1"> <fo:static-content flow-name="xsl-region-before"> <fo:block> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column /> <fo:table-column column-width="150pt" /> <fo:table-body> <fo:table-row> <fo:table-cell padding-bottom="0pt" padding-left="0pt" padding-right="0pt" padding-top="0pt" border-style="solid" border-width="1pt" border-color="white" height="30pt" number-columns-spanned="2" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block /> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell font-size="inherited-property-value(&apos;font-size&apos;) - 2pt" padding-bottom="0pt" padding-left="0pt" padding-right="0pt" padding-top="0pt" border-style="solid" border-width="1pt" border-color="white" text-align="left" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center"> <fo:block /> </fo:table-cell> <fo:table-cell font-size="inherited-property-value(&apos;font-size&apos;) - 2pt" padding-bottom="0pt" padding-left="0pt" padding-right="0pt" padding-top="0pt" border-style="solid" border-width="1pt" border-color="white" text-align="right" width="150pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center"> <fo:block /> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell padding-bottom="0pt" padding-left="0pt" padding-right="0pt" padding-top="0pt" border-style="solid" border-width="1pt" border-color="white" number-columns-spanned="2" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block /> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </fo:block> </fo:static-content> <fo:flow flow-name="xsl-region-body"> <fo:block> <fo:external-graphic space-before.optimum="4pt" space-after.optimum="4pt"> <xsl:attribute name="src">url(''<xsl:text disable-output-escaping="yes">/export/home/www/https/tomcat5.0'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 13 FOR UPDATE; buffer := '.25/webapps/coeus/images/couhes_byline2.gif</xsl:text>'')</xsl:attribute> </fo:external-graphic> <fo:block color="black" space-before.optimum="-8pt"> <fo:leader leader-length="100%" leader-pattern="rule" rule-thickness="1pt" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <xsl:for-each select="n1:Correspondence"> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="proportional-column-width(25)" /> <fo:table-column column-width="proportional-column-width(75)" /> <fo:table-body> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="25%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">To:</fo:inline> <fo:inline font-size="10pt">&#160;&#160;&#160;&#160;&#160; </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="75%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Investigator"> <xsl:if test="n1:PI_flag = &apos;true&apos;"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Firstname"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> <fo:inline font-size="10pt">&#160; </fo:inline> <xsl:for-each select="n1:LastName"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> <fo:block white-space-collapse="false" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <xsl:for-each select="n'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 13 FOR UPDATE; buffer := '1:OfficeLocation"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> </fo:block> </fo:block> </xsl:for-each> </xsl:if> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="25%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">From:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="75%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Submissions"> <xsl:for-each select="n1:CommitteeMember"> <xsl:if test="n1:CommitteeMemberRole/n1:MemberRoleDesc = &apos;Chair&apos; and ../n1:CurrentSubmissionFlag = &apos;No&apos;"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Firstname"> <xsl:if test="../../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:if> </xsl:for-each> <fo:inline font-size="10pt">&#160;</fo:inline> <xsl:for-each select="n1:LastName"> <xsl:if test="../../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <fo:inline font-size="10pt"> <'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 13 FOR UPDATE; buffer := 'xsl:apply-templates /> </fo:inline> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> <fo:inline font-size="10pt">, Chair </fo:inline> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Submissions"> <xsl:for-each select="n1:CommitteeMasterData"> <xsl:for-each select="n1:CommitteeName"> <xsl:if test="../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:block> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="25%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">Date:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="75%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <xsl:for-each select="n1:CurrentDate"> <fo:inline font-size="10pt"> <xsl:value-of select="format-number(number(substring(string(.), 6, 2)), ''00'')" /> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 13 FOR UPDATE; buffer := ' <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 9, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 1, 4)), ''0000'')" /> </fo:inline> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="25%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">Committee Action:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="75%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">Protocol Suspension</fo:inline> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block text-align="justify"> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="proportional-column-width(25)" /> <fo:table-column column-width="proportional-column-width(75)" /> <fo:table-body> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="25%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">IRB Protocol #: </fo:inline> <fo:inline font-size="10pt">&#160;&#160;&#160; </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="75%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 13 FOR UPDATE; buffer := ' <xsl:for-each select="n1:ProtocolMasterData"> <xsl:for-each select="n1:ProtocolNumber"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="25%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">Study Title: </fo:inline> <fo:inline font-size="10pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="75%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:ProtocolMasterData"> <xsl:for-each select="n1:ProtocolTitle"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:block> <xsl:text>&#xA;</xsl:text> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 13 FOR UPDATE; buffer := ' <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block /> </fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:inline font-size="10pt">This message constitutes notice that the participant accrual to this protocol is suspended effective </fo:inline> <xsl:for-each select="n1:CurrentDate"> <fo:inline font-size="10pt"> <xsl:value-of select="format-number(number(substring(string(.), 6, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 9, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 1, 4)), ''0000'')" /> </fo:inline> </xsl:for-each> <fo:inline font-size="10pt">&#160;</fo:inline> <fo:inline font-size="10pt">&#160;</fo:inline> <fo:inline font-size="10pt">.&#160; No additional participants may be enrolled until the Institutional Review Board has reinstated this protocol.&#160; Additionally, unless there are safety issues to the contrary, research cannot be conducted on subjects who are currently enrolled.&#160; However, analysis of data that has already been collected can continue.</fo:inline> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:inline font-size="10pt">IF ADDITIONAL PARTICIPANTS HAVE BEEN ENROLLED SINCE THE SUSPENSION DATE, PLEASE CONTACT THE COUHES OFFICE IMMEDIATELY.&#160;&#160;&#160; </fo:inline> <fo:block space-before.optimum='; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 13 FOR UPDATE; buffer := '"1pt" space-after.optimum="2pt"> <fo:block> <fo:inline font-size="10pt"> </fo:inline> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:inline font-size="10pt">If the study is TERMINATED, please contact COUHES so that we can close the file. </fo:inline> </fo:block> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:inline font-size="10pt">Thank you.</fo:inline> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <xsl:text>&#xA;</xsl:text> </fo:block> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="31pt" /> <fo:table-column /> <fo:table-body> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="31pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-ali'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 13 FOR UPDATE; buffer := 'gn="start"> <fo:block> <xsl:if test="(n1:Protocol/n1:KeyStudyPerson/n1:Person/n1:PersonID != &apos;null&apos;) and (n1:Protocol/n1:Correspondent/n1:Person/n1:PersonID != &apos;null&apos;)"> <fo:inline font-size="10pt">cc:</fo:inline> </xsl:if> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:KeyStudyPerson"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Fullname"> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </fo:block> </fo:block> </xsl:for-each> </xsl:for-each> </xsl:for-each> <xsl:for-each select="n1:Correspondent"> <xsl:if test="n1:TypeOfCorrespondent = &apos;Protocol level&apos;"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Fullname"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> </xsl:for-each> </xsl:if> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:inline font-size="10pt"> </fo:inline> </xsl:for-each> </fo:block> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> </xsl:stylesheet> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / INSERT INTO PROTO_CORRESP_TEMPL (COMMITTEE_ID,CORRESPONDENCE_TEMPLATE,FILE_NAME,OBJ_ID,PROTO_CORRESP_TEMPL_ID,PROTO_CORRESP_TYPE_CODE,UPDATE_TIMESTAMP,UPDATE_USER,VER_NBR) VALUES ('DEFAULT',EMPTY_CLOB(),'DEFAULT-8-TerminationNotice.xsl','9CD01EA17C639DADE040DC0A1F8A714D',14,'8',TO_DATE( '20110221133453', 'YYYYMMDDHH24MISS' ),'KCRELEASE',1) / -- Length: 37193 -- Chunks: 10 DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 14 FOR UPDATE; buffer := '<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:n1="http://irb.mit.edu/irbnamespace" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xsl:variable name="fo:layout-master-set"> <fo:layout-master-set> <fo:simple-page-master master-name="default-page" page-height="11in" page-width="8.5in" margin-left="0.6in" margin-right="1.0in"> <fo:region-body margin-top="0.79in" margin-bottom="0.79in" /> <fo:region-before extent="0.79in" /> </fo:simple-page-master> </fo:layout-master-set> </xsl:variable> <xsl:output version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="no" media-type="text/html" /> <xsl:template match="/"> <fo:root> <xsl:copy-of select="$fo:layout-master-set" /> <fo:page-sequence master-reference="default-page" initial-page-number="1" format="1"> <fo:static-content flow-name="xsl-region-before"> <fo:block> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column /> <fo:table-column column-width="150pt" /> <fo:table-body> <fo:table-row> <fo:table-cell padding-bottom="0pt" padding-left="0pt" padding-right="0pt" padding-top="0pt" border-style="solid" border-width="1pt" border-color="white" height="30pt" number-columns-spanned="2" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block /> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell font-size="inherited-property-value(&apos;font-size&apos;) - 2pt" padding-bottom="0pt" padding-left="0pt" padding-right="0pt" padding-top="0pt" border-style="solid" border-width="1pt" border-color="white" text-align="left" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center"> <fo:block /> </fo:table-cell> <fo:table-cell font-size="inherited-property-value(&apos;font-size&apos;) - 2pt" padding-bottom="0pt" padding-left="0pt" padding-right="0pt" padding-top="0pt" border-style="solid" border-width="1pt" border-color="white" text-align="right" width="150pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center"> <fo:block /> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell padding-bottom="0pt" padding-left="0pt" padding-right="0pt" padding-top="0pt" border-style="solid" border-width="1pt" border-color="white" number-columns-spanned="2" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block /> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </fo:block> </fo:static-content> <fo:flow flow-name="xsl-region-body"> <fo:block> <fo:external-graphic space-before.optimum="4pt" space-after.optimum="4pt"> <xsl:attribute name="src">url(''<xsl:text disable-output-escaping="yes">/export/home/www/https/tomcat5.0'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 14 FOR UPDATE; buffer := '.25/webapps/coeus/images/couhes_byline2.gif</xsl:text>'')</xsl:attribute> </fo:external-graphic> <fo:block color="black" space-before.optimum="-8pt"> <fo:leader leader-length="100%" leader-pattern="rule" rule-thickness="1pt" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <xsl:for-each select="n1:Correspondence"> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="proportional-column-width(25)" /> <fo:table-column column-width="proportional-column-width(75)" /> <fo:table-body> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="25%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">To:</fo:inline> <fo:inline font-size="10pt">&#160;&#160;&#160;&#160;&#160; </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="75%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Investigator"> <xsl:if test="n1:PI_flag = &apos;true&apos;"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Firstname"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> <fo:inline font-size="10pt">&#160;</fo:inline> <xsl:for-each select="n1:LastName"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> <fo:block white-space-collapse="false" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <xsl:for-each select="n1'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 14 FOR UPDATE; buffer := ':OfficeLocation"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> </fo:block> </fo:block> </xsl:for-each> </xsl:if> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="25%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">From:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="75%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Submissions"> <xsl:if test="n1:CurrentSubmissionFlag =&apos;No&apos;"> <xsl:for-each select="n1:CommitteeMember"> <xsl:if test="n1:CommitteeMemberRole/n1:MemberRoleDesc = &apos;Chair&apos;"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Firstname"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> <fo:inline font-size="10pt">&#160;</fo:inline> <xsl:for-each select="n1:LastName"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 14 FOR UPDATE; buffer := ' </xsl:for-each> </xsl:if> </xsl:for-each> </xsl:if> </xsl:for-each> </xsl:for-each> <fo:inline font-size="10pt">, Chair </fo:inline> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Submissions"> <xsl:for-each select="n1:CommitteeMasterData"> <xsl:for-each select="n1:CommitteeName"> <xsl:if test="../../n1:CurrentSubmissionFlag =&apos;No&apos;"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:block> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" height="19pt" width="25%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">Date:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" height="19pt" width="75%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <xsl:for-each select="n1:CurrentDate"> <fo:inline font-size="10pt"> <xsl:value-of select="format-number(number(substring(string(.), 6, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 9, 2)), ''00'')" /> <xsl:text>/</xs'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 14 FOR UPDATE; buffer := 'l:text> <xsl:value-of select="format-number(number(substring(string(.), 1, 4)), ''0000'')" /> </fo:inline> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="25%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">Committee Action:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="75%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">Protocol Termination</fo:inline> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block text-align="justify"> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="proportional-column-width(25)" /> <fo:table-column column-width="proportional-column-width(75)" /> <fo:table-body> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="25%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">IRB Protocol #: </fo:inline> <fo:inline font-size="10pt">&#160;&#160;&#160; </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="75%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:ProtocolMasterData"> <xsl:for-each select="n1:ProtocolNumber"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 14 FOR UPDATE; buffer := ' <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="25%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <fo:inline font-size="10pt" font-weight="bold">Study Title: </fo:inline> <fo:inline font-size="10pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="75%" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:ProtocolMasterData"> <xsl:for-each select="n1:ProtocolTitle"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:block> <xsl:text>&#xA;</xsl:text> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block /> </fo:block> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 14 FOR UPDATE; buffer := ' <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block /> </fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:inline font-size="10pt">This is to notify you that the above protocol has been TERMINATED effective </fo:inline> <xsl:for-each select="n1:CurrentDate"> <fo:inline font-size="10pt"> <xsl:value-of select="format-number(number(substring(string(.), 6, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 9, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 1, 4)), ''0000'')" /> </fo:inline> </xsl:for-each> <fo:inline font-size="10pt">.&#160; Data collected after the expiration date is considered unapproved research and cannot be included with data collected during an approved period.&#160; Furthermore, data collected after termination of approval cannot be reported or published as research data.</fo:inline> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:inline font-size="10pt">In accordance with MIT Policy and Federal Regulations, you may NOT continue any further research efforts covered by this protocol.&#160; If you wish to gather further research information, you must submit a new proposal for review by the Committee on the Use of Humans as Experimental Subjects.</fo:inline> <fo:block> <xsl:text>&#xA;</xsl:text> </fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:inline font-size="10pt">You should retain a copy of this letter for your records.</fo:inline> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> </fo:block> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 14 FOR UPDATE; buffer := ' <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:block> <xsl:text>&#xA;</xsl:text> </fo:block> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="3pt" /> <fo:table-column /> <fo:table-body> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="3pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block /> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" text-align="left" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center"> <fo:block> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="46pt" /> <fo:table-column column-width="452pt" /> <fo:table-body> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="46pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start">'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 14 FOR UPDATE; buffer := ' <fo:block> <fo:inline font-size="10pt">cc</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <fo:inline font-size="10pt">Tom Duff</fo:inline> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" width="46pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block /> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="452pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Correspondent"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Fullname"> <xsl:if test="../../n1:TypeOfCorrespondent = &apos;CRC&apos;"> <fo:block space-before.optimum="1pt" space-after.optimum="2pt"> <fo:block> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </fo:block> </fo:block> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 14 FOR UPDATE; buffer := ' </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:inline font-size="10pt"> </fo:inline> </fo:block> </fo:block> </xsl:for-each> </fo:block> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> </xsl:stylesheet> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / INSERT INTO PROTO_CORRESP_TEMPL (COMMITTEE_ID,CORRESPONDENCE_TEMPLATE,FILE_NAME,OBJ_ID,PROTO_CORRESP_TEMPL_ID,PROTO_CORRESP_TYPE_CODE,UPDATE_TIMESTAMP,UPDATE_USER,VER_NBR) VALUES ('DEFAULT',EMPTY_CLOB(),'DEFAULT-9-AgendaReport.xsl','9CD01EA17C649DADE040DC0A1F8A714D',15,'9',TO_DATE( '20110221133453', 'YYYYMMDDHH24MISS' ),'KCRELEASE',1) / -- Length: 55186 -- Chunks: 14 DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 15 FOR UPDATE; buffer := '<?xml version="1.0" encoding="UTF-8"?> <!--Designed and generated by Altova StyleVision Enterprise Edition 2008 rel. 2 - see http://www.altova.com/stylevision for more information.--> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:n1="http://irb.mit.edu/irbnamespace" xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:output version="1.0" method="xml" encoding="UTF-8" indent="no"/> <xsl:param name="SV_OutputFormat" select="''PDF''"/> <xsl:variable name="XML" select="/"/> <xsl:variable name="fo:layout-master-set"> <fo:layout-master-set> <fo:simple-page-master master-name="default-page" page-height="11in" page-width="8.5in" margin-left="0.6in" margin-right="0.6in"> <fo:region-body margin-top="0.79in" margin-bottom="0.79in"/> </fo:simple-page-master> </fo:layout-master-set> </xsl:variable> <xsl:template match="/"> <fo:root> <xsl:copy-of select="$fo:layout-master-set"/> <fo:page-sequence master-reference="default-page" initial-page-number="1" format="1"> <fo:flow flow-name="xsl-region-body"> <fo:block> <xsl:for-each select="$XML"> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block font-weight="bold" text-align="center" margin="0pt"> <fo:block> <fo:inline font-family="Arial" font-size="large" font-weight="bold"> <xsl:text>Massachusetts Institute of Technology</xsl:text> </fo:inline> </fo:block> </fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block text-align="center" margin="0pt"> <fo:block> <fo:inline font-family="Arial" font-size="large" font-weight="bold"> <xsl:text>Agenda</xsl:text> </fo:inline> </fo:block> </fo:block> <xsl:for-each select="n1:Schedule"> <xsl:for-each select="n1:ScheduleMasterData"> <xsl:for-each select="n1:CommitteeName"> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block text-align="center" margin="0pt"> <fo:block> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-fa'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 15 FOR UPDATE; buffer := 'mily="Arial" font-size="large" font-weight="bold" padding-bottom="2px" padding-top="2px"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-family="Arial" font-size="large" font-weight="bold" padding-bottom="2px" padding-top="2px"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </fo:block> </fo:block> </xsl:for-each> </xsl:for-each> </xsl:for-each> <xsl:for-each select="n1:Schedule"> <xsl:for-each select="n1:ScheduleMasterData"> <xsl:for-each select="n1:ScheduledTime"> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block text-align="center" margin="0pt"> <fo:block> <fo:inline font-family="Arial" font-size="larger" font-weight="bold" margin-bottom=" "> <xsl:value-of select="format-number(number(substring(string(string(.)), 1, 2)), ''00'')"/> <xsl:text>:</xsl:text> <xsl:value-of select="format-number(number(substring(string(string(.)), 4, 2)), ''00'')"/> </fo:inline> </fo:block> </fo:block> </xsl:for-each> </xsl:for-each> </xsl:for-each> <xsl:for-each select="n1:Schedule"> <xsl:for-each select="n1:ScheduleMasterData"> <xsl:for-each select="n1:Place"> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block text-align="center" margin="0pt"> <fo:block> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-family="Arial" font-size="large" font-weight="bold"> <xsl:copy-of select="$value-of-template"/> </fo:block> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 15 FOR UPDATE; buffer := ' </xsl:when> <xsl:otherwise> <fo:inline font-family="Arial" font-size="large" font-weight="bold"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </fo:block> </fo:block> </xsl:for-each> </xsl:for-each> </xsl:for-each> <fo:block/> <fo:block/> <fo:inline font-family="Arial" font-size="9pt" font-weight="bold" text-decoration="underline"> <xsl:text>AGENDA ITEMS</xsl:text> </fo:inline> <fo:block/> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:list-block font-family="Arial" font-size="9pt" margin-bottom="0" margin-top="0" provisional-distance-between-starts="7mm" provisional-label-separation="2mm"> <fo:list-item> <fo:list-item-label end-indent="label-end()" text-align="right"> <fo:block font-family="Courier">&#x2022;</fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block> <xsl:if test="string-length( n1:Schedule/n1:PreviousSchedule/n1:ScheduleMasterData/n1:MeetingDate ) &gt; 0"> <fo:inline> <xsl:text>Review the minutes of the meeting held on</xsl:text> </fo:inline> </xsl:if> <fo:inline> <xsl:text>&#160;</xsl:text> </fo:inline> <xsl:for-each select="n1:Schedule"> <xsl:for-each select="n1:PreviousSchedule"> <xsl:for-each select="n1:ScheduleMasterData"> <xsl:for-each select="n1:MeetingDate"> <xsl:if test="string-length(.) &gt; 0"> <fo:inline> <xsl:value-of select="format-number(number(substring(string(string(.)), 6, 2)), ''00'')"/> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(string(.)), 9, 2)), ''00'')"/> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(string(string(.))), 1, 4)), ''0000'')"/> </fo:inline> <fo:inline> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 15 FOR UPDATE; buffer := ' <xsl:text>.</xsl:text> </fo:inline> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()" text-align="right"> <fo:block font-family="Courier">&#x2022;</fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block> <xsl:if test="string-length(n1:Schedule/n1:NextSchedule/n1:ScheduleMasterData/n1:ScheduledDate) &gt; 0"> <fo:inline> <xsl:text>The next meeting will be held on</xsl:text> </fo:inline> </xsl:if> <fo:inline> <xsl:text>&#160;</xsl:text> </fo:inline> <xsl:for-each select="n1:Schedule"> <xsl:for-each select="n1:NextSchedule"> <xsl:for-each select="n1:ScheduleMasterData"> <xsl:for-each select="n1:ScheduledDate"> <xsl:if test="string-length( . ) &gt;0"> <fo:inline> <xsl:value-of select="format-number(number(substring(string(string(.)), 6, 2)), ''00'')"/> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(string(.)), 9, 2)), ''00'')"/> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(string(string(.))), 1, 4)), ''0000'')"/> </fo:inline> <fo:inline> <xsl:text>.</xsl:text> </fo:inline> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> <fo:inline> <xsl:text>&#160; </xsl:text> </fo:inline> <xsl:if test="string-length( n1:Schedule/n1:NextSchedule/n1:ScheduleMasterData/n1:Place ) &gt; 0"> <fo:inline> <'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 15 FOR UPDATE; buffer := 'xsl:text>It is scheduled to be held in&#160; at</xsl:text> </fo:inline> </xsl:if> <fo:inline> <xsl:text>&#160; </xsl:text> </fo:inline> <xsl:for-each select="n1:Schedule"> <xsl:for-each select="n1:NextSchedule"> <xsl:for-each select="n1:ScheduleMasterData"> <xsl:for-each select="n1:Place"> <xsl:if test="string-length( . ) &gt;0"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> <fo:inline> <xsl:text>.</xsl:text> </fo:inline> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:list-item-body> </fo:list-item> </fo:list-block> <fo:block/> <fo:inline font-family="Arial" font-size="9pt" font-weight="bold" text-decoration="underline"> <xsl:text>PROTOCOLS SUBMITTED FOR REVIEW</xsl:text> </fo:inline> <fo:block/> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block font-family="Arial" font-size="9pt" font-variant="normal" margin="0pt"> <fo:block> <xsl:for-each select="n1:Schedule"> <xsl:for-each select="n1:ProtocolSubmission"> <xsl:for-each select="n1:SubmissionDetails"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 15 FOR UPDATE; buffer := ' <fo:block/> <xsl:for-each select="n1:SubmissionTypeDesc"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block font-family="Arial" font-size="9pt" font-weight="bold"> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline font-family="Arial" font-size="9pt" font-weight="bold"> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:for-each> <fo:block/> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block margin="0pt"> <fo:block> <xsl:for-each select="n1:ProtocolSummary"> <xsl:for-each select="n1:ProtocolMasterData"> <fo:inline> <xsl:text>&#160;</xsl:text> </fo:inline> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:table font-family="Arial" font-size="9pt" table-layout="fixed" width="100%" border-spacing="2pt"> <fo:table-column column-width="70"/> <fo:table-column column-width="110"/> <fo:table-co'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 15 FOR UPDATE; buffer := 'lumn column-width="111"/> <fo:table-column column-width="109"/> <fo:table-column column-width="109"/> <fo:table-body start-indent="0pt"> <fo:table-row> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <fo:inline font-weight="bold"> <xsl:text>Protocol #: </xsl:text> </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <xsl:for-each select="n1:ProtocolNumber"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:for-each> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <fo:inline '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 15 FOR UPDATE; buffer := 'font-family="Arial" font-size="9pt" font-weight="bold"> <xsl:text>Expiration Date:</xsl:text> </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" text-align="left" display-align="before"> <fo:block> <xsl:for-each select="n1:ExpirationDate"> <fo:inline> <xsl:value-of select="format-number(number(substring(string(string(.)), 6, 2)), ''00'')"/> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(string(.)), 9, 2)), ''00'')"/> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(string(string(.))), 1, 4)), ''0000'')"/> </fo:inline> </xsl:for-each> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" text-align="left" display-align="before"> <fo:block/> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <fo:inline font-weight="bold"> <xsl:text>Title:</xsl:text> </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell number-columns-spanned="4" padding="2pt" text-align="left" display-align="before"> <fo:block> <xsl:for-each select="n1:ProtocolTitle"> <xsl:variable name="value-of-template"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 15 FOR UPDATE; buffer := ' <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </xsl:for-each> </xsl:for-each> </fo:block> </fo:block> <xsl:for-each select="n1:ProtocolSummary"> <xsl:for-each select="n1:ProtocolMasterData"/> </xsl:for-each> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:table font-family="Arial" font-size="9pt" table-layout="fixed" width="100%" border-spacing="2pt"> <fo:table-column column-width="70"/> <fo:table-column column-width="187"/> <fo:table-body start-indent="0pt"> <fo:table-row> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <fo:inline font-weight="bold"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 15 FOR UPDATE; buffer := ' <xsl:text>PI:</xsl:text> </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <xsl:for-each select="n1:ProtocolSummary"> <xsl:for-each select="n1:Investigator"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Fullname"> <xsl:if test="../../n1:PI_flag = &apos;true&apos;"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </fo:block> </fo:block> <fo:block/> <fo:inline-container> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 15 FOR UPDATE; buffer := ' <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:table table-layout="fixed" width="100%" border-spacing="2pt"> <fo:table-column column-width="70"/> <fo:table-column column-width="25%"/> <fo:table-column column-width="70"/> <fo:table-column column-width="25%"/> <fo:table-body start-indent="0pt"> <fo:table-row> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block white-space="pre" white-space-collapse="false" wrap-option="wrap" white-space-treatment="ignore-if-surrounding-linefeed" margin="0pt"> <fo:block> <fo:inline font-weight="bold"> <xsl:text>Primary Reviewers:</xsl:text> </fo:inline> </fo:block> </fo:block> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <xsl:for-each select="n1:SubmissionDetails"> <xsl:for-each select="n1:ProtocolReviewer"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Fullname"> <xsl:if test="../../n1:ReviewerTypeCode = 1"> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block white-space="pre" white-space-collapse="false" wrap-option="wrap" white-space-treatment="ignore-if-surrounding-linefeed" margin="0pt"> <fo:block> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 15 FOR UPDATE; buffer := ' <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </fo:block> </fo:block> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <fo:inline font-weight="bold"> <xsl:text>Secondary Reviewers:</xsl:text> </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell padding="2pt" display-align="before"> <fo:block> <xsl:for-each select="n1:SubmissionDetails"> <xsl:for-each select="n1:ProtocolReviewer"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Fullname"> <xsl:if test="../../n1:ReviewerTypeCode = 2"> <fo:inli'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 15 FOR UPDATE; buffer := 'ne-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:block white-space="pre" white-space-collapse="false" wrap-option="wrap" white-space-treatment="ignore-if-surrounding-linefeed" margin="0pt"> <fo:block> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </fo:block> </fo:block> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:inline-container> <fo:block> <xsl:text>&#x2029;</xsl:text> </fo:block> </fo:inline-container> <fo:table table-layout="fixed" width="100%" border-spacing="2pt"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 15 FOR UPDATE; buffer := ' <fo:table-column column-width="proportional-column-width(1)"/> <fo:table-body start-indent="0pt"> <fo:table-row> <fo:table-cell padding="2pt" display-align="center"> <fo:block/> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </xsl:for-each> </xsl:for-each> </fo:block> </fo:block> </xsl:for-each> </fo:block> <fo:block id="SV_RefID_PageTotal"/> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> <xsl:template match="n1:ProtocolSubmission"> <fo:block/> <fo:block/> </xsl:template> <xsl:template match="n1:ProtocolSummary"> <fo:block/> </xsl:template> <xsl:template match="n1:ResearchArea"> <xsl:variable name="value-of-template"> <xsl:apply-templates/> </xsl:variable> <xsl:choose> <xsl:when test="contains(string($value-of-template),''&#x2029;'')"> <fo:block> <xsl:copy-of select="$value-of-template"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline> <xsl:copy-of select="$value-of-template"/> </fo:inline> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="double-backslash"> <xsl:param name="text"/> <xsl:param name="text-length"/> <xsl:variable name="text-after-bs" select="substring-after($text, ''\'')"/> <xsl:variable name="text-after-bs-length" select="string-length($text-after-bs)"/> <xsl:choose> <xsl:when test="$text-after-bs-length = 0"> <xsl:choose> <xsl:when test="substring($text, $text-length) = ''\''"> <xsl:value-of select="concat(substring($text,1,$text-length - 1), ''\\'')"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$text"/> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:value-of select="concat(substring($text,1,$text-length - $text-after-bs-length - 1), ''\\'')"/> <xsl:call-template name="double-backslash"> <xsl:with-param name="text" select="$text-after-bs"/> <xsl:with-param name="text-length" select="$text-after-bs-length"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:template> </xsl:stylesheet> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / INSERT INTO PROTO_CORRESP_TEMPL (COMMITTEE_ID,CORRESPONDENCE_TEMPLATE,FILE_NAME,OBJ_ID,PROTO_CORRESP_TEMPL_ID,PROTO_CORRESP_TYPE_CODE,UPDATE_TIMESTAMP,UPDATE_USER,VER_NBR) VALUES ('DEFAULT',EMPTY_CLOB(),'DEFAULT-23-ReminderToIrbNotification#1.xsl','9CD01EA17C659DADE040DC0A1F8A714D',16,'23',TO_DATE( '20110221133454', 'YYYYMMDDHH24MISS' ),'KCRELEASE',1) / -- Length: 17271 -- Chunks: 5 DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 16 FOR UPDATE; buffer := '<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:n1="http://irb.mit.edu/irbnamespace" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xsl:variable name="fo:layout-master-set"> <fo:layout-master-set> <fo:simple-page-master master-name="default-page" page-height="11in" page-width="8.5in" margin-left="0.8in" margin-right="0.8in"> <fo:region-body margin-top="0.45in" margin-bottom="0.45in" /> <fo:region-before extent="0.79in" /> </fo:simple-page-master> </fo:layout-master-set> </xsl:variable> <xsl:output version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="no" media-type="text/html" /> <xsl:template match="/"> <fo:root> <xsl:copy-of select="$fo:layout-master-set" /> <fo:page-sequence master-reference="default-page" initial-page-number="1" format="1"> <fo:flow flow-name="xsl-region-body"> <fo:block> <xsl:for-each select="n1:RenewalReminder"> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="43pt" /> <fo:table-column column-width="281pt" /> <fo:table-column column-width="100pt" /> <fo:table-column column-width="99pt" /> <fo:table-body> <fo:table-row> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" height="15pt" number-columns-spanned="4" text-align="right" width="43pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt"> <fo:block> <fo:external-graphic space-before.optimum="4pt" space-after.optimum="4pt"> <xsl:attribute name="src">url(''<xsl:text disable-output-escaping="yes">/export/home/www/https/tomcat5.0.25/webapps/coeus/images/couhes_byline2.gif</xsl:text>'')</xsl:attribute> </fo:external-graphic> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" height="15pt" text-align="right" width="43pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt"> <fo:block> <fo:inline font-weight="bold">To:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" height="15pt" width="281pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Investigator"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Fullname"> <xsl:if test="../../n1:PI_flag ='; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 16 FOR UPDATE; buffer := '&apos;true&apos;"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" height="15pt" text-align="right" width="100pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt"> <fo:block> <fo:inline font-weight="bold">Date:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" height="15pt" width="99pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <xsl:for-each select="n1:CurrentDate"> <fo:inline font-size="10pt"> <xsl:value-of select="format-number(number(substring(string(.), 6, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 9, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 1, 4)), ''0000'')" /> </fo:inline> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" height="15pt" text-align="right" width="43pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt"> <fo:block /> </fo:table-cell> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" height="15pt" width="281pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Investigator"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:OfficeLocation"> <xsl:if test="../../n1:PI_flag =&apos;true&apos;"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 16 FOR UPDATE; buffer := ' <xsl:apply-templates /> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" height="15pt" text-align="right" width="100pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt"> <fo:block /> </fo:table-cell> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" height="15pt" width="99pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block /> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" height="15pt" text-align="right" width="43pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt"> <fo:block> <fo:inline font-weight="bold">From:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" height="15pt" width="281pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <xsl:for-each select="n1:CommitteeMasterData"> <xsl:for-each select="n1:CommitteeName"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" height="15pt" text-align="right" width="100pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt"> <fo:block> <fo:inline font-weight="bold">Action Date:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" height="15pt" width="99pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 16 FOR UPDATE; buffer := ' <xsl:for-each select="n1:ProtocolMasterData"> <xsl:for-each select="n1:ExpirationDate"> <fo:inline font-size="10pt"> <xsl:value-of select="format-number(number(substring(string(.), 6, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 9, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 1, 4)), ''0000'')" /> </fo:inline> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:table font-size="10pt" width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="43pt" /> <fo:table-column column-width="281pt" /> <fo:table-body> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" text-align="right" width="43pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt"> <fo:block> <fo:inline font-weight="bold">Re:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="281pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block>Protocol #: <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:ProtocolMasterData"> <xsl:for-each select="n1:ProtocolNumber"> <xsl:apply-templates /> </xsl:for-each>: <xsl:for-each select="n1:ProtocolTitle"> <xsl:apply-templates /> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:inline font-size="10pt">This letter serves as an IRB notification reminder by the </fo:inline> <xsl:for-each select="n1:CommitteeMasterData"> <xsl:for-each select="n1:CommitteeName"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inl'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 16 FOR UPDATE; buffer := 'ine> </xsl:for-each> </xsl:for-each> <fo:inline font-size="10pt">.&#160; Recently a protocol was returned to you with a request for revision.&#160; It is the primary responsibility of the Principal Investigator to ensure that the protocol is resubmitted with the necessary changes.&#160; </fo:inline> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:inline font-size="10pt">P</fo:inline> <fo:inline font-size="10pt">lease note that the level of scrutiny given to the resubmitted protocol is the same as that of any new protocol.&#160; All requests for approval must be reviewed at a convened IRB meeting, except for those protocols that meet the criteria for expedited review.&#160;</fo:inline> <fo:block> <xsl:text>&#xA;</xsl:text> </fo:block> </xsl:for-each> </fo:block> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> </xsl:stylesheet> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / INSERT INTO PROTO_CORRESP_TEMPL (COMMITTEE_ID,CORRESPONDENCE_TEMPLATE,FILE_NAME,OBJ_ID,PROTO_CORRESP_TEMPL_ID,PROTO_CORRESP_TYPE_CODE,UPDATE_TIMESTAMP,UPDATE_USER,VER_NBR) VALUES ('DEFAULT',EMPTY_CLOB(),'DEFAULT-24-ReminderToIrbNotification#2.xsl','9CD01EA17C669DADE040DC0A1F8A714D',17,'24',TO_DATE( '20110221133454', 'YYYYMMDDHH24MISS' ),'KCRELEASE',1) / -- Length: 17271 -- Chunks: 5 DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 17 FOR UPDATE; buffer := '<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:n1="http://irb.mit.edu/irbnamespace" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xsl:variable name="fo:layout-master-set"> <fo:layout-master-set> <fo:simple-page-master master-name="default-page" page-height="11in" page-width="8.5in" margin-left="0.8in" margin-right="0.8in"> <fo:region-body margin-top="0.45in" margin-bottom="0.45in" /> <fo:region-before extent="0.79in" /> </fo:simple-page-master> </fo:layout-master-set> </xsl:variable> <xsl:output version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="no" media-type="text/html" /> <xsl:template match="/"> <fo:root> <xsl:copy-of select="$fo:layout-master-set" /> <fo:page-sequence master-reference="default-page" initial-page-number="1" format="1"> <fo:flow flow-name="xsl-region-body"> <fo:block> <xsl:for-each select="n1:RenewalReminder"> <fo:table width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="43pt" /> <fo:table-column column-width="281pt" /> <fo:table-column column-width="100pt" /> <fo:table-column column-width="99pt" /> <fo:table-body> <fo:table-row> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" height="15pt" number-columns-spanned="4" text-align="right" width="43pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt"> <fo:block> <fo:external-graphic space-before.optimum="4pt" space-after.optimum="4pt"> <xsl:attribute name="src">url(''<xsl:text disable-output-escaping="yes">/export/home/www/https/tomcat5.0.25/webapps/coeus/images/couhes_byline2.gif</xsl:text>'')</xsl:attribute> </fo:external-graphic> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" height="15pt" text-align="right" width="43pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt"> <fo:block> <fo:inline font-weight="bold">To:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" height="15pt" width="281pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Investigator"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:Fullname"> <xsl:if test="../../n1:PI_flag ='; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 17 FOR UPDATE; buffer := '&apos;true&apos;"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" height="15pt" text-align="right" width="100pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt"> <fo:block> <fo:inline font-weight="bold">Date:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" height="15pt" width="99pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" display-align="center" text-align="start"> <fo:block> <xsl:for-each select="n1:CurrentDate"> <fo:inline font-size="10pt"> <xsl:value-of select="format-number(number(substring(string(.), 6, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 9, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 1, 4)), ''0000'')" /> </fo:inline> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" height="15pt" text-align="right" width="43pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt"> <fo:block /> </fo:table-cell> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" height="15pt" width="281pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:Investigator"> <xsl:for-each select="n1:Person"> <xsl:for-each select="n1:OfficeLocation"> <xsl:if test="../../n1:PI_flag =&apos;true&apos;"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 17 FOR UPDATE; buffer := ' <xsl:apply-templates /> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" height="15pt" text-align="right" width="100pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt"> <fo:block /> </fo:table-cell> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" height="15pt" width="99pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block /> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" height="15pt" text-align="right" width="43pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt"> <fo:block> <fo:inline font-weight="bold">From:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" height="15pt" width="281pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <xsl:for-each select="n1:CommitteeMasterData"> <xsl:for-each select="n1:CommitteeName"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inline> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" height="15pt" text-align="right" width="100pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt"> <fo:block> <fo:inline font-weight="bold">Action Date:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell line-height="10pt" border-style="solid" border-width="1pt" border-color="white" display-align="before" height="15pt" width="99pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block> <xsl:for-each select="n1:Protocol"> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 17 FOR UPDATE; buffer := ' <xsl:for-each select="n1:ProtocolMasterData"> <xsl:for-each select="n1:ExpirationDate"> <fo:inline font-size="10pt"> <xsl:value-of select="format-number(number(substring(string(.), 6, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 9, 2)), ''00'')" /> <xsl:text>/</xsl:text> <xsl:value-of select="format-number(number(substring(string(.), 1, 4)), ''0000'')" /> </fo:inline> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:table font-size="10pt" width="100%" space-before.optimum="1pt" space-after.optimum="2pt"> <fo:table-column column-width="43pt" /> <fo:table-column column-width="281pt" /> <fo:table-body> <fo:table-row> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" text-align="right" width="43pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt"> <fo:block> <fo:inline font-weight="bold">Re:</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell border-style="solid" border-width="1pt" border-color="white" display-align="before" width="281pt" padding-start="3pt" padding-end="3pt" padding-before="3pt" padding-after="3pt" text-align="start"> <fo:block>Protocol #: <xsl:for-each select="n1:Protocol"> <xsl:for-each select="n1:ProtocolMasterData"> <xsl:for-each select="n1:ProtocolNumber"> <xsl:apply-templates /> </xsl:for-each>: <xsl:for-each select="n1:ProtocolTitle"> <xsl:apply-templates /> </xsl:for-each> </xsl:for-each> </xsl:for-each> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:inline font-size="10pt">This letter serves as an IRB notification reminder by the </fo:inline> <xsl:for-each select="n1:CommitteeMasterData"> <xsl:for-each select="n1:CommitteeName"> <fo:inline font-size="10pt"> <xsl:apply-templates /> </fo:inl'; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; / DECLARE data CLOB; buffer VARCHAR2(32000); BEGIN SELECT CORRESPONDENCE_TEMPLATE INTO data FROM PROTO_CORRESP_TEMPL WHERE PROTO_CORRESP_TEMPL_ID = 17 FOR UPDATE; buffer := 'ine> </xsl:for-each> </xsl:for-each> <fo:inline font-size="10pt">.&#160; Recently a protocol was returned to you with a request for revision.&#160; It is the primary responsibility of the Principal Investigator to ensure that the protocol is resubmitted with the necessary changes.&#160; </fo:inline> <fo:block> <fo:leader leader-pattern="space" /> </fo:block> <fo:inline font-size="10pt">P</fo:inline> <fo:inline font-size="10pt">lease note that the level of scrutiny given to the resubmitted protocol is the same as that of any new protocol.&#160; All requests for approval must be reviewed at a convened IRB meeting, except for those protocols that meet the criteria for expedited review.&#160;</fo:inline> <fo:block> <xsl:text>&#xA;</xsl:text> </fo:block> </xsl:for-each> </fo:block> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> </xsl:stylesheet> '; DBMS_LOB.writeappend(data,LENGTH(buffer),buffer); END; /
true
5dd2940ad64a895e158c91ae0a20dbde3d90df62
SQL
SonuShaikh/Oracle-DBA
/SQL DEV/2019/AUDIT_TRIGGER.sql
UTF-8
1,244
3.46875
3
[]
no_license
-- AUDIT TRIGGER CREATE TABLE SUPERHEROS (sp_name VARCHAR2(30)); CREATE TABLE sp_audit( new_name VARCHAR2(30), old_name VARCHAR2(30), user_name VARCHAR2(30), opr_date VARCHAR2(30), operation VARCHAR2(30)); -- TRIGGER CREATE OR REPLACE TRIGGER superheros_audit BEFORE INSERT OR DELETE OR UPDATE ON superheros FOR EACH ROW ENABLE DECLARE v_user VARCHAR2(30); v_date VARCHAR2(30); BEGIN SELECT user,TO_CHAR(SYSDATE,'DD/MM/YY HH24:MI:SS') INTO v_user,v_date FROM dual; IF INSERTING THEN INSERT INTO sp_audit (new_name,old_name,user_name,opr_date,operation) VALUES(:NEW.sp_name,NULL,v_user,v_date,'INSERTING'); ELSIF DELETING THEN INSERT INTO sp_audit (new_name,old_name,user_name,opr_date,operation) VALUES(NULL,:OLD.sp_name, v_user,v_date,'DELETING'); ELSIF UPDATING THEN INSERT INTO sp_audit (new_name,old_name,user_name,opr_date,operation) VALUES(:NEW.sp_name,:OLD.sp_name,v_user,v_date,'UPDATING'); END IF; END; / SELECT * FROM superheros; SELECT * FROM sp_audit; INSERT INTO superheros VALUES('MONU'); UPDATE supeRheros SET sp_name = 'Ironman' WHERE sp_name = 'SONU'; DELETE FROM SUPERHEROS WHERE sp_name = 'Ironman'; DELETE FROM SUPERHEROS;
true
fbca876cf9d4b83a37a65373393c04d1735b1957
SQL
Needrima/mysql-scripts
/LIKE operator.sql
UTF-8
725
3.765625
4
[]
no_license
-- the LIKE operator -- used to get matches with a particular string -- two commonly used characters with the LIKE operator are "%" and "_" SELECT * FROM customers WHERE last_name LIKE "b%"; -- give customers with last name starting from b(case insensitive) -- "%d" results with specified field ending with "d" -- "%a%" results with specified fields containing an "a" at any position SELECT * FROM customers WHERE last_name LIKE "_y"; -- customers whose lastname is exactly three characters ending two characters ending with "y" -- number of underscores determine the number of characters that will preceed or proceed after the specified letter -- "___g__" means three charecters befor "g" and two characters after "g"
true
86e783afb74e92d9a5f7fca67571a0aff966f3b8
SQL
Bobert127/python_and_postgresql
/ownerlern/day4_2.sql
UTF-8
1,393
3.8125
4
[]
no_license
CREATE DATABASE exercises_db_day4; SELECT * FROM customer; SELECT * FROM address; SELECT * FROM customer, address; SELECT * FROM customer, address WHERE customer.id = address.customer_id; -- (SELECT * FROM) (customer, address) WHERE (customer.id = address.customer_id); -- (SELECT * FROM) (customer JOIN address) on (customer.id = address.customer_id); -- EXPLAIN ANALYZE SELECT * FROM customer, address WHERE customer.id = address.customer_id; -- inner join SELECT * FROM customer a INNER JOIN address b on a.id = b.customer_id; -- EXPLAIN ANALYZE SELECT * FROM customer INNER JOIN address on customer.id = address.customer_id; SELECT * FROM customer JOIN address on customer.id = address.customer_id; -- EXPLAIN ANALYZE SELECT * FROM customer INNER JOIN address on customer.id = address.customer_id; -- left join SELECT * FROM customer LEFT JOIN address on customer.id = address.customer_id; -- EXPLAIN ANALYZE SELECT * FROM customer LEFT JOIN address on customer.id = address.customer_id; -- right join SELECT * FROM customer RIGHT JOIN address on customer.id = address.customer_id; -- EXPLAIN ANALYZE SELECT * FROM customer RIGHT JOIN address on customer.id = address.customer_id; -- full join SELECT * FROM customer FULL JOIN address on customer.id = address.customer_id; -- EXPLAIN ANALYZE SELECT * FROM customer FULL JOIN address on customer.id = address.customer_id;
true
973f1769494295206b52ebf7fb491339b34cb2cd
SQL
AgusVelez5/BaseDeDatos2
/Clase6.sql
UTF-8
2,457
3.96875
4
[]
no_license
-- Ejercicio 1 SELECT f1.last_name, f1.first_name FROM actor f1 WHERE last_name IN(SELECT last_name FROM actor f2 WHERE f1.last_name = f2.last_name AND f1.actor_id <> f2.actor_id) ORDER BY 1 -- Ejercicio 2 SELECT first_name, last_name FROM actor f1 WHERE f1.actor_id NOT IN(SELECT DISTINCT actor_id FROM film_actor f2) -- Ejercicio 3 SELECT first_name, last_name FROM customer f1 WHERE NOT EXISTS(SELECT * FROM rental f2, customer f3 WHERE f3.customer_id = f2.customer_id AND f1.customer_id <> f2.customer_id) -- Ejercicio 4 SELECT first_name, last_name FROM customer f1 WHERE EXISTS(SELECT * FROM rental f2, customer f3 WHERE f3.customer_id = f2.customer_id AND f1.customer_id <> f2.customer_id) -- Ejercicio 5 SELECT DISTINCT actor_id FROM actor f1 WHERE actor_id IN (SELECT f3.actor_id FROM film f2, film_actor f3 WHERE f3.film_id = f2.film_id AND title LIKE '%BETRAYED REAR%' AND f1.actor_id = f3.actor_id) OR actor_id IN (SELECT f3.actor_id FROM film f2, film_actor f3 WHERE f3.film_id = f2.film_id AND title LIKE '%CATCH AMISTAD%' AND f1.actor_id = f3.actor_id) -- Ejercicio 6 SELECT DISTINCT actor_id FROM actor f1 WHERE actor_id IN (SELECT f3.actor_id FROM film f2, film_actor f3 WHERE f3.film_id = f2.film_id AND title LIKE '%BETRAYED REAR%' AND f1.actor_id = f3.actor_id) AND actor_id NOT IN (SELECT f3.actor_id FROM film f2, film_actor f3 WHERE f3.film_id = f2.film_id AND title LIKE '%CATCH AMISTAD%' AND f1.actor_id = f3.actor_id) -- Ejercicio 7 SELECT DISTINCT actor_id FROM actor f1 WHERE actor_id IN (SELECT f3.actor_id FROM film f2, film_actor f3 WHERE f3.film_id = f2.film_id AND title LIKE '%BETRAYED REAR%' AND f1.actor_id = f3.actor_id) AND actor_id IN (SELECT f3.actor_id FROM film f2, film_actor f3 WHERE f3.film_id = f2.film_id AND title LIKE '%CATCH AMISTAD%' AND f1.actor_id = f3.actor_id) -- Ejercicio 8 SELECT DISTINCT actor_id FROM actor f1 WHERE actor_id NOT IN (SELECT f3.actor_id FROM film f2, film_actor f3 WHERE f3.film_id = f2.film_id AND title LIKE '%BETRAYED REAR%' AND f1.actor_id = f3.actor_id) AND actor_id NOT IN (SELECT f3.actor_id FROM film f2, film_actor f3 WHERE f3.film_id = f2.film_id AND title LIKE '%CATCH AMISTAD%' AND f1.actor_id = f3.actor_id) ORDER BY 1
true
46aecbf16cd17b584db9c61c0ca3db16420863c4
SQL
prashantbhargava2311/SQL-country-club
/1584480990_SQLTasks_Tier_2.sql
UTF-8
10,980
4.28125
4
[]
no_license
/* Welcome to the SQL mini project. You will carry out this project partly in the PHPMyAdmin interface, and partly in Jupyter via a Python connection. This is Tier 2 of the case study, which means that there'll be less guidance for you about how to setup your local SQLite connection in PART 2 of the case study. This will make the case study more challenging for you: you might need to do some digging, aand revise the Working with Relational Databases in Python chapter in the previous resource. Otherwise, the questions in the case study are exactly the same as with Tier 1. PART 1: PHPMyAdmin You will complete questions 1-9 below in the PHPMyAdmin interface. Log in by pasting the following URL into your browser, and using the following Username and Password: URL: https://sql.springboard.com/ Username: student Password: learn_sql@springboard The data you need is in the "country_club" database. This database contains 3 tables: i) the "Bookings" table, ii) the "Facilities" table, and iii) the "Members" table. In this case study, you'll be asked a series of questions. You can solve them using the platform, but for the final deliverable, paste the code for each solution into this script, and upload it to your GitHub. Before starting with the questions, feel free to take your time, exploring the data, and getting acquainted with the 3 tables. */ /* QUESTIONS /* Q1: Some of the facilities charge a fee to members, but some do not. Write a SQL query to produce a list of the names of the facilities that do. */ ANS:1 SELECT name FROM Facilities WHERE membercost > 0; name Tennis Court 1 Tennis Court 2 Massage Room 1 Massage Room 2 Squash Court /* Q2: How many facilities do not charge a fee to members? */ SELECT count( * ) FROM Facilities WHERE membercost = 0 4 /* Q3: Write an SQL query to show a list of facilities that charge a fee to members, where the fee is less than 20% of the facility's monthly maintenance cost. Return the facid, facility name, member cost, and monthly maintenance of the facilities in question. */ SELECT facid, name, membercost, monthlymaintenance FROM `Facilities` WHERE membercost >0 AND ( membercost / monthlymaintenance ) < 0.2; facid name membercost monthlymaintenance 0 Tennis Court 1 5.0 200 1 Tennis Court 2 5.0 200 4 Massage Room 1 9.9 3000 5 Massage Room 2 9.9 3000 6 Squash Court 3.5 80 /* Q4: Write an SQL query to retrieve the details of facilities with ID 1 and 5. Try writing the query without using the OR operator. */ SELECT * FROM `Facilities` WHERE facid IN ( 1, 5 ); facid name membercost Ascending guestcost initialoutlay monthlymaintenance 1 Tennis Court 2 5.0 25.0 8000 200 5 Massage Room 2 9.9 80.0 4000 3000 /* Q5: Produce a list of facilities, with each labelled as 'cheap' or 'expensive', depending on if their monthly maintenance cost is more than $100. Return the name and monthly maintenance of the facilities in question. */ SELECT name, `monthlymaintenance` , CASE WHEN `monthlymaintenance` >100 THEN 'expensive' ELSE 'cheap' END AS label FROM Facilities name monthlymaintenance label Tennis Court 1 200 expensive Tennis Court 2 200 expensive Badminton Court 50 cheap Table Tennis 10 cheap Massage Room 1 3000 expensive Massage Room 2 3000 expensive Squash Court 80 cheap Snooker Table 15 cheap Pool Table 15 cheap /* Q6: You'd like to get the first and last name of the last member(s) who signed up. Try not to use the LIMIT clause for your solution. */ SELECT firstname, surname FROM Members WHERE joindate IN (SELECT max(joindate) FROM Members ); firstname surname Darren Smith /* Q7: Produce a list of all members who have used a tennis court. Include in your output the name of the court, and the name of the member formatted as a single column. Ensure no duplicate data, and order by the member name. */ SELECT DISTINCT ( concat( M.firstname, ' ', M.surname ) ) AS Name, F.name AS Facilities FROM Members AS M LEFT JOIN Bookings AS B ON M.memid = B.memid LEFT JOIN Facilities AS F ON F.facid = B.facid WHERE F.facid IN ( 0, 1 ) ORDER BY Name Name Ascending Facilities Anne Baker Tennis Court 2 Anne Baker Tennis Court 1 Burton Tracy Tennis Court 1 Burton Tracy Tennis Court 2 Charles Owen Tennis Court 2 Charles Owen Tennis Court 1 Darren Smith Tennis Court 2 David Farrell Tennis Court 2 David Farrell Tennis Court 1 David Jones Tennis Court 2 David Jones Tennis Court 1 David Pinker Tennis Court 1 Douglas Jones Tennis Court 1 Erica Crumpet Tennis Court 1 Florence Bader Tennis Court 2 Florence Bader Tennis Court 1 Gerald Butters Tennis Court 2 Gerald Butters Tennis Court 1 GUEST GUEST Tennis Court 1 GUEST GUEST Tennis Court 2 Henrietta Rumney Tennis Court 2 Jack Smith Tennis Court 2 Jack Smith Tennis Court 1 Janice Joplette Tennis Court 1 Janice Joplette Tennis Court 2 Jemima Farrell Tennis Court 1 Jemima Farrell Tennis Court 2 Joan Coplin Tennis Court 1 John Hunt Tennis Court 2 John Hunt Tennis Court 1 Matthew Genting Tennis Court 1 Millicent Purview Tennis Court 2 Nancy Dare Tennis Court 1 Nancy Dare Tennis Court 2 Ponder Stibbons Tennis Court 1 Ponder Stibbons Tennis Court 2 Ramnaresh Sarwin Tennis Court 1 Ramnaresh Sarwin Tennis Court 2 Tim Boothe Tennis Court 2 Tim Boothe Tennis Court 1 Tim Rownam Tennis Court 1 Tim Rownam Tennis Court 2 Timothy Baker Tennis Court 2 Timothy Baker Tennis Court 1 Tracy Smith Tennis Court 1 Tracy Smith Tennis Court 2 /* Q8: Produce a list of bookings on the day of 2012-09-14 which will cost the member (or guest) more than $30. Remember that guests have different costs to members (the listed costs are per half-hour 'slot'), and the guest user's ID is always 0. Include in your output the name of the facility, the name of the member formatted as a single column, and the cost. Order by descending cost, and do not use any subqueries. */ SELECT f.name,(m.firstname || m.surname) as User_Name, CASE WHEN b.facid = 0 THEN (f.guestcost*b.slots) WHEN b.facid != 0 THEN (f.membercost*b.slots ) END AS cost FROM bookings AS b LEFT JOIN facilities f ON b.facid = f.facid LEFT JOIN members AS m ON b.memid = m.memid WHERE b.starttime LIKE '2012-09-14%' and cost >30; name User_Name cost Tennis Court 1 BurtonTracy 75 Tennis Court 1 DavidPinker 75 Tennis Court 1 GeraldButters 75 Tennis Court 1 TimRownam 75 Tennis Court 1 GUESTGUEST 75 Tennis Court 1 DouglasJones 75 Tennis Court 1 GUESTGUEST 75 Massage Room 1 JemimaFarrell 39.6 Massage Room 2 GUESTGUEST 39.6 /* Q9: This time, produce the same result as in Q8, but using a subquery. */ SELECT bf.name,(m.firstname || m.surname) as User_Name, bf.cost from (SELECT b.memid,b.slots,f.name, CASE WHEN b.facid = 0 THEN (f.guestcost*b.slots) WHEN b.facid != 0 THEN (f.membercost*b.slots) END AS cost from Bookings as b LEFT join Facilities as f ON b.facid=f.facid WHERE b.starttime LIKE "2012-09-14%") as bf LEFT JOIN Members as m on bf.memid=m.memid WHERE bf.cost>30; name User_Name cost Tennis Court 1 BurtonTracy 75 Tennis Court 1 DavidPinker 75 Tennis Court 1 GeraldButters 75 Tennis Court 1 TimRownam 75 Tennis Court 1 GUESTGUEST 75 Tennis Court 1 DouglasJones 75 Tennis Court 1 GUESTGUEST 75 Massage Room 1 JemimaFarrell 39.6 Massage Room 2 GUESTGUEST 39.6 /* PART 2: SQLite Export the country club data from PHPMyAdmin, and connect to a local SQLite instance from Jupyter notebook for the following questions. QUESTIONS: /* Q10: Produce a list of facilities with a total revenue less than 1000. The output of facility name and total revenue, sorted by revenue. Remember that there's a different cost for guests and members! */ select name, revenue from ( select facs.name, sum(case when memid = 0 then slots * facs.guestcost else slots * membercost end) as revenue from bookings bks inner join facilities facs on bks.facid = facs.facid group by facs.name ) as agg where revenue < 1000 order by revenue; Facilities revenue Table Tennis 180 Snooker Table 240 Pool Table 270 /* Q11: Produce a report of members and who recommended them in alphabetic surname,firstname order */ SELECT m2.surname,m2.firstname, m1.surname,m1.firstname from Members as m1 JOIN Members as m2 on m1.memid=m2.recommendedby ORDER by m2.surname, m2.firstname; Sname Fname R_Sname R_Fname Bader Florence Stibbons Ponder Baker Anne Stibbons Ponder Baker Timothy Farrell Jemima Boothe Tim Rownam Tim Butters Gerald Smith Darren Coplin Joan Baker Timothy Crumpet Erica Smith Tracy Dare Nancy Joplette Janice Genting Matthew Butters Gerald Hunt John Purview Millicent Jones David Joplette Janice Jones Douglas Jones David Joplette Janice Smith Darren Mackenzie Anna Smith Darren Owen Charles Smith Darren Pinker David Farrell Jemima Purview Millicent Smith Tracy Rumney Henrietta Genting Matthew Sarwin Ramnaresh Bader Florence Smith Jack Smith Darren Stibbons Ponder Tracy Burton Worthington-Smyth Henry Smith Tracy /* Q12: Find the facilities with their usage by member, but not guests */ SELECT strftime('%m', starttime) as Month,count(memid) as Count_memid, memid from Bookings GROUP by Month, memid; month Count_memid memid 07 178 0 07 100 1 07 83 2 07 132 3 07 63 4 07 50 5 07 18 6 07 18 7 07 16 8 08 304 0 08 94 1 08 77 2 08 153 3 08 56 4 08 64 5 08 111 6 08 57 7 08 103 8 08 54 9 08 69 10 08 56 11 08 52 12 08 37 13 08 43 14 08 39 15 08 62 16 08 23 17 08 10 20 08 8 21 09 401 0 09 67 1 09 50 2 09 123 3 09 40 4 09 49 5 09 47 6 09 42 7 09 69 8 09 50 9 09 62 10 09 59 11 09 66 12 09 43 13 09 46 14 09 81 15 09 104 16 09 48 17 09 62 20 09 118 21 09 53 22 09 70 24 09 14 26 09 20 27 09 34 28 09 41 29 09 16 30 09 16 33 09 15 35 09 7 36 /* Q13: Find the facilities usage by month, but not guests */ SELECT strftime('%m', starttime) as Month,count(facid) as Count_facid, facid from Bookings GROUP by Month, facid; Month Count_facid facid 07 88 0 07 68 1 07 56 2 07 51 3 07 123 4 07 12 5 07 75 6 07 75 7 07 110 8 08 146 0 08 149 1 08 146 2 08 147 3 08 224 4 08 40 5 08 170 6 08 159 7 08 291 8 09 174 0 09 172 1 09 181 2 09 205 3 09 282 4 09 59 5 09 195 6 09 210 7 09 435 8
true
25e7a26845e3902fb9d67949bc1d1700717c7a36
SQL
ankitsilaich/shiningfloor
/main_site/db/shiningfloor.sql
UTF-8
7,606
3
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.4 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: May 12, 2015 at 03:07 PM -- Server version: 5.6.12-log -- PHP Version: 5.4.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; -- -- Database: `shiningfloor` -- CREATE DATABASE IF NOT EXISTS `shiningfloor` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci; USE `shiningfloor`; -- -------------------------------------------------------- -- -- Table structure for table `artificials` -- CREATE TABLE IF NOT EXISTS `artificials` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `usages_area` varchar(50) , `design` varchar(50), `design_material` varchar(50), `surface_type` varchar(50), `brand` varchar(100), `finish_type` varchar(50), `price` int(11), `color` varchar(50), `thickness` int(11), `size_lengh` int(11), `size_width` int(11), `size_unit` varchar(10), `product_name` varchar(100), `product_desc` varchar(300), `rating` float, `supplierID` int(11) NOT NULL, `product_img` varchar(100), `discountAvailable` int(11) DEFAULT '0', `productAvailable` int(11) NOT NULL DEFAULT '1', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; -- -- Table structure for table `marble` -- CREATE TABLE IF NOT EXISTS `marble` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `usages_area` varchar(50) , `design` varchar(50), `design_material` varchar(50), `surface_type` varchar(50), `brand` varchar(100), `finish_type` varchar(50), `price` int(11), `color` varchar(50), `thickness` int(11), `size_lengh` int(11), `size_width` int(11), `size_unit` varchar(10), `product_name` varchar(100), `product_desc` varchar(300), `rating` float, `supplierID` int(11) NOT NULL, `product_img` varchar(100), `discountAvailable` int(11) DEFAULT '0', `productAvailable` int(11) NOT NULL DEFAULT '1', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `stone` -- CREATE TABLE IF NOT EXISTS `stone` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `usages_area` varchar(50) , `design` varchar(50), `design_material` varchar(50), `surface_type` varchar(50), `brand` varchar(100), `finish_type` varchar(50), `price` int(11), `color` varchar(50), `thickness` int(11), `size_lengh` int(11), `size_width` int(11), `size_unit` varchar(10), `product_name` varchar(100), `product_desc` varchar(300), `rating` float, `supplierID` int(11) NOT NULL, `product_img` varchar(100), `discountAvailable` int(11) DEFAULT '0', `productAvailable` int(11) NOT NULL DEFAULT '1', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `tiles` -- CREATE TABLE IF NOT EXISTS `tiles` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `usages_area` varchar(50) , `design` varchar(50), `design_material` varchar(50), `surface_type` varchar(50), `brand` varchar(100), `finish_type` varchar(50), `price` int(11), `color` varchar(50), `thickness` int(11), `size_lengh` int(11), `size_width` int(11), `size_unit` varchar(10), `product_name` varchar(100), `product_desc` varchar(300), `rating` float, `supplierID` int(11) NOT NULL, `product_img` varchar(100), `discountAvailable` int(11) DEFAULT '0', `productAvailable` int(11) NOT NULL DEFAULT '1', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `wallpapers` -- CREATE TABLE IF NOT EXISTS `wallpapers` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `usages_area` varchar(50) , `design` varchar(50), `design_material` varchar(50), `surface_type` varchar(50), `brand` varchar(100), `finish_type` varchar(50), `price` int(11), `color` varchar(50), `thickness` int(11), `size_lengh` int(11), `size_width` int(11), `size_unit` varchar(10), `product_name` varchar(100), `product_desc` varchar(300), `rating` float, `supplierID` int(11) NOT NULL, `product_img` varchar(100), `discountAvailable` int(11) DEFAULT '0', `productAvailable` int(11) NOT NULL DEFAULT '1', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `woods` -- CREATE TABLE IF NOT EXISTS `woods` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `usages_area` varchar(50) , `design` varchar(50), `design_material` varchar(50), `surface_type` varchar(50), `brand` varchar(100), `finish_type` varchar(50), `price` int(11), `color` varchar(50), `thickness` int(11), `size_lengh` int(11), `size_width` int(11), `size_unit` varchar(10), `product_name` varchar(100), `product_desc` varchar(300), `rating` float, `supplierID` int(11) NOT NULL, `product_img` varchar(100), `discountAvailable` int(11) DEFAULT '0', `productAvailable` int(11) NOT NULL DEFAULT '1', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -------------------------------------------------------- -- -- Table structure for table `orders` -- CREATE TABLE IF NOT EXISTS `orders` ( `orderNo` bigint(20) NOT NULL AUTO_INCREMENT , `customerID` int(11) , `supplierID` int(11) , `productID` int(11) , `product_type` varchar(50), `price` int(11) , `quantity` int(11) , `discount` int(11), `total` int(11) , `color` int(11) , `orderDate` varchar(20) , `shipDate` varchar(20), `salesTax` float , `transactStatus` varchar(100), `paymentDate` varchar(20), PRIMARY KEY (`orderNo`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `suppliers` -- CREATE TABLE IF NOT EXISTS `suppliers` ( `supplierID` int(11) NOT NULL AUTO_INCREMENT, `companyName` varchar(100) , `contactFirstName` varchar(30) , `contactLastName` varchar(30) , `contactTitle` varchar(30) , `address` varchar(500) , `city` varchar(20) , `state` varchar(20), `country` varchar(20) , `contactNo` varchar(20), `email` varchar(100) , `url` varchar(100) , `paymentMethods` varchar(100) , `postalcode` varchar(10), PRIMARY KEY (`supplierID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `customers` -- CREATE TABLE IF NOT EXISTS `customers` ( `customerID` int(11) NOT NULL AUTO_INCREMENT, `firstName` varchar(50) , `lastName` varchar(50) , `address` varchar(500) , `city` varchar(30) , `state` varchar(30) , `country` varchar(30), `contactNo1` varchar(15), `contactNo2` varchar(15), `email` varchar(100), `password` varchar(100), `postalcode` varchar(10), `joiningDate` varchar(15), PRIMARY KEY (`customerID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
true
f7c7b941591c657f813d2f29468550f7c943453d
SQL
yamasy1549/akashi_cafeteria
/postgres/createdb.sql
UTF-8
333
2.625
3
[]
no_license
/* 本番サーバでは既に実行済み - user作成 - DB作成 - userのDBへの紐づけ */ \set db_name `echo "$DB_NAME"` \set db_user `echo "$DB_USER"` \set db_pass `echo "$DB_PASS"` create user :db_user login password :'db_pass'; create database :db_name; grant all privileges on database :db_name to :db_user;
true
b17ba3013561e2f8833f761615c1f3dc987e4fad
SQL
grouault/howto
/sgbd/sqlserver/how-to/how-to-format-date.sql
UTF-8
263
2.703125
3
[]
no_license
-- convertir une date au format dd/mm/yyyy CONVERT(char(10), co.date_cde, 103) as date_cmd, -- convertir une date au format yyyy-MM-dd SELECT CONVERT(NVARCHAR, GETDATE(), 23) -- convertir une date au format dd/MM/yyyy SELECT CONVERT(NVARCHAR, GETDATE(), 103)
true
ccddb660679072e6f1c8b411538601e5521f1fb5
SQL
ShartepStudy/SQL
/11.04.15/query/podzapros_4.sql
WINDOWS-1251
311
3.28125
3
[]
no_license
-- , Odessa USE Petrash SELECT name FROM Products WHERE id_producer IN ( SELECT id FROM Producer WHERE id_address IN ( SELECT id FROM [Address] WHERE id_city IN ( SELECT id FROM City WHERE name Like 'Odessa' ) ) )
true
b889242eed63c68063b028add6866f337fc11018
SQL
Jrtg97/Prueba
/usuarios/usuarios.sql
UTF-8
1,398
2.796875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1:3306 -- Tiempo de generación: 25-09-2018 a las 13:59:38 -- Versión del servidor: 5.7.19 -- Versión de PHP: 5.6.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Base de datos: `base` -- -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `usuarios` -- DROP TABLE IF EXISTS `usuarios`; CREATE TABLE IF NOT EXISTS `usuarios` ( `id` int(20) UNSIGNED NOT NULL AUTO_INCREMENT, `nombre` varchar(250) NOT NULL, `pass` char(32) NOT NULL, `fecha` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; -- -- Volcado de datos para la tabla `usuarios` -- INSERT INTO `usuarios` (`id`, `nombre`, `pass`, `fecha`) VALUES (1, 'oscargalileo', '202cb962ac59075b964b07152d234b70', '2018-09-25 12:52:52'); COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
true
425e5f96a511cc6ce8660f1c1396d44870927ff1
SQL
JonathanJGQ/springbootRest
/algamoney-api/src/main/resources/db/migration/V02__criar_tabela_pessoa.sql
UTF-8
999
2.890625
3
[]
no_license
CREATE TABLE pessoa ( codigo BIGSERIAL PRIMARY KEY, nome VARCHAR(50) NOT NULL, ativo BOOLEAN NOT NULL, logradouro VARCHAR(150), numero VARCHAR(10), complemento VARCHAR(100), bairro VARCHAR(50), cep VARCHAR(50), cidade VARCHAR(50), estado VARCHAR(50) ); INSERT INTO pessoa (nome,ativo,logradouro,numero,complemento,bairro,cep,cidade,estado) values ('Jonathan',true,'Rua F', '131','Casa','Cúrio','60213301','Fortaleza', 'Ceará'); INSERT INTO pessoa (nome,ativo,logradouro,numero,complemento,bairro,cep,cidade,estado) values ('Felipe',true,'Rua A', '1131','Casa','Parquelandia','60128392','Fortaleza', 'Ceará'); INSERT INTO pessoa (nome,ativo,logradouro,numero,complemento,bairro,cep,cidade,estado) values ('Nataly',true,'Rua K', '410','Casa','Messejana','60247623','Fortaleza', 'Ceará'); INSERT INTO pessoa (nome,ativo,logradouro,numero,complemento,bairro,cep,cidade,estado) values ('Paulo',true,'Rua B', '123','Casa','Cidade dos Funcionários','60213301','Fortaleza', 'Ceará');
true
e5c3103287be0b636671da75eb55754f74750986
SQL
romana0819/ct-kea-2021-gr37
/ddl_statements.sql
UTF-8
3,399
4.1875
4
[]
no_license
-- creating database named module4_quiz CREATE SCHEMA IF NOT EXISTS `module4_quiz` DEFAULT CHARACTER SET utf8mb4 ; -- using the newly created database USE `module4_quiz`; -- creating Table `user`, only in case it does not exist yet, with columns and specifying the data types CREATE TABLE IF NOT EXISTS `module4_quiz`.`user` ( `user_id` INT NOT NULL AUTO_INCREMENT, `first_name` VARCHAR(45) NOT NULL, `last_name` VARCHAR(45) NOT NULL, `birth_date` DATETIME NOT NULL, `gender` VARCHAR(45) NOT NULL, `country` VARCHAR(45) NOT NULL, `email` VARCHAR(45) NOT NULL, `category` VARCHAR(45) NULL DEFAULT 'UNDEFINED', PRIMARY KEY (`user_id`)); -- creating Table `test`, only in case it does not exist yet, with columns and specifying the data types CREATE TABLE IF NOT EXISTS `module4_quiz`.`test` ( `test_id` INT NOT NULL AUTO_INCREMENT, `name` VARCHAR(45) NOT NULL, PRIMARY KEY (`test_id`)); -- creating Table `question`, only in case it does not exist yet, with columns and specifying the data types CREATE TABLE IF NOT EXISTS `module4_quiz`.`question` ( `question_id` INT NOT NULL AUTO_INCREMENT, `fk_test_id` INT NOT NULL, `question` VARCHAR(250) NOT NULL, `category` VARCHAR(45) NOT NULL, PRIMARY KEY (`question_id`), INDEX `fk_test_id_idx` (`fk_test_id` ASC) VISIBLE, CONSTRAINT `fk_test_id` FOREIGN KEY (`fk_test_id`) REFERENCES `module4_quiz`.`test` (`test_id`) ON DELETE NO ACTION ON UPDATE NO ACTION); -- creating Table `answer`, only in case it does not exist yet, with columns and specifying the data types CREATE TABLE IF NOT EXISTS `module4_quiz`.`answer` ( `answer_id` INT NOT NULL AUTO_INCREMENT, `answer` BOOLEAN NOT NULL, `fk_question_id` INT NOT NULL, PRIMARY KEY (`answer_id`), INDEX `fk_question_id_idx` (`fk_question_id` ASC) VISIBLE, CONSTRAINT `fk_question_id` FOREIGN KEY (`fk_question_id`) REFERENCES `module4_quiz`.`question` (`question_id`) ON DELETE NO ACTION ON UPDATE NO ACTION); -- creating Table `user_has_answer`, only in case it does not exist yet, with columns and specifying the data types CREATE TABLE IF NOT EXISTS `module4_quiz`.`user_has_answer` ( `fk_user_id` INT NOT NULL, `fk_answer_id` INT NOT NULL, `has_id` INT NOT NULL AUTO_INCREMENT, INDEX `fk_user_has_answer_user_idx` (`fk_user_id` ASC) VISIBLE, INDEX `fk_answer_id_idx` (`fk_answer_id` ASC) VISIBLE, PRIMARY KEY (`has_id`), CONSTRAINT `fk_user_id` FOREIGN KEY (`fk_user_id`) REFERENCES `module4_quiz`.`user` (`user_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_answer_id` FOREIGN KEY (`fk_answer_id`) REFERENCES `module4_quiz`.`answer` (`answer_id`) ON DELETE NO ACTION ON UPDATE NO ACTION); -- creating Table `takes`, only in case it does not exist yet, with columns and specifying the data types CREATE TABLE IF NOT EXISTS `module4_quiz`.`takes` ( `takes_id` INT NOT NULL AUTO_INCREMENT, `fk_user` INT, `fk_test` INT, PRIMARY KEY (`takes_id`), INDEX `fk_user_idx` (`fk_user` ASC) VISIBLE, INDEX `fk_test_idx` (`fk_test` ASC) VISIBLE, CONSTRAINT `fk_user` FOREIGN KEY (`fk_user`) REFERENCES `module4_quiz`.`user` (`user_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_test` FOREIGN KEY (`fk_test`) REFERENCES `module4_quiz`.`test` (`test_id`) ON DELETE NO ACTION ON UPDATE NO ACTION);
true
6058e5c8093a8f373601658ab4db4fb81f2badc7
SQL
pagotarane/program_for_reffer
/mysql/Demo/L10/fact.sql
UTF-8
448
3.453125
3
[]
no_license
-- factorial of number delimiter $$ drop procedure if exists fact $$ create procedure fact(num bigint) begin declare f bigint default 1; declare i int default 1; if (num < 0) then select 'be +ve' as MSG; elseif (num = 0 or num = 1) then select 'fact = 1' as MSG; else aa :loop begin set f = f * i; set i = i + 1; if i = num + 1 then leave aa; end if; end; end loop; select f as FACTORIAL; end if; end $$ delimiter ;
true
8ab21c79f312134b8daf7e27289f1aed1f8b809e
SQL
vijaydairyf/TimelyFish
/SolomonApp/dbo/Views/dbo.pjdirutl.sql
UTF-8
385
3.09375
3
[]
no_license
 create view pjdirutl as select a.employee employee, a.fiscalno fiscalno, round(sum(round(a.units,2)),2) units, round(sum(round(a.cost,2)),2) cost, round(sum(round(a.revenue,2)),2) revenue, round(sum(round(a.adjustments,2)),2) adjustments from pjutlrol a, pjuttype b where a.utilization_type = b.utilization_type and b.direct = "Y" group by a.employee, a.fiscalno
true
636f09b48c7280127e666478eb700022d3c4e48b
SQL
fadikamohamed/sqlP6
/sqlP6.sql
UTF-8
496
3.484375
3
[]
no_license
-- Affichage des frameworks qui ont une version 2.x (x etant un nombre)-- SELECT `id`, `framework`, `version` FROM `frameworks` WHERE `version` LIKE '2.%'; -- Affichage des frameworks ayant pour id 1 et 3 -- SELECT `id`, `framework`, `version` FROM `frameworks` WHERE `id`='1' OR `id`='3'; -- Affichage des frameworks ayant une date comprise entre le premier janvier 2010 et le 31 décembre 2011 SELECT `id`, `framework`, `version` FROM `ide` WHERE `date`>'2010-01-01' AND `date`<'2011-12-31';
true
23667cb4e46d2d0f9e61eaac88ed380db65296d5
SQL
mtejas88/esh
/Projects_SotS_2017/upgrades/no_low_cost/dist_upgraded_at_no_low_cost.sql
UTF-8
444
3.453125
3
[]
no_license
select count(a.esh_id) from public.fy2017_districts_deluxe_matr a left join public.fy2016_districts_deluxe_matr b on a.esh_id = b.esh_id where a.include_in_universe_of_districts = 'True' and a.district_type = 'Traditional' and a.upgrade_indicator = 'True' and a.exclude_from_ia_analysis = 'False' and a.exclude_from_ia_cost_analysis = 'False' and a.ia_bw_mbps_total > b.ia_bw_mbps_total and a. ia_monthly_cost_total <= b.ia_monthly_cost_total
true