sql
stringlengths
6
1.05M
SELECT name, weight, price, ROUND(CAST(price / weight * 1000 AS NUMERIC), 2)::FLOAT AS price_per_kg FROM products ORDER BY price_per_kg, name ASC
CREATE TABLE 'employeedb'.'employee' ( 'id' MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT, 'firstName' VARCHAR(255) NULL, 'lastName' VARCHAR(255) NULL, 'birthdate' VARCHAR(255) NULL, PRIMARY KEY ('id') ) AUTO_INCREMENT=1;
<filename>src/main/resources/db/postgresql/find-popular-articles.sql -- Function for popular articles searching -- Author: <NAME> -- Date: 29.06.2019 create or replace function articles.find_popular_articles() returns table( article_id uuid, article_title varchar(100), article_creation_date timestamp, author_id uuid, author_login varchar(50) ) as $$ begin return query ( select arcls.article_id, arcls.article_title, arcls.article_creation_date, arcls.author_id, arcls.author_login from articles.popular_articles arcls ); end $$ language plpgsql;
create table oa_notify ( id varchar(64) not null comment '编号' primary key, type char null comment '类型', title varchar(200) null comment '标题', content varchar(2000) null comment '内容', files varchar(2000) null comment '附件', status char null comment '状态', create_by varchar(64) not null comment '创建者', create_date datetime not null comment '创建时间', update_by varchar(64) not null comment '更新者', update_date datetime not null comment '更新时间', remarks varchar(255) null comment '备注信息', del_flag char default '0' not null comment '删除标记' ) comment '通知通告' charset = utf8; create index oa_notify_del_flag on oa_notify (del_flag);
/*creates table in default dev db and loaded data into the table*/ CREATE TABLE amazon_reviews( marketplace char(2), customer_id varchar(10), review_id varchar(20), product_id varchar(15), product_parent varchar(15), product_title varchar(500), product_category varchar(30), star_rating int, helpful_votes int, total_votes int, vine char(1), verified_purchase char(1), review_headline varchar(200), review_body varchar(max), review_date date); /* Note: A role must be associated with your cluster and should have AmazonS3ReadOnlyAccess policy associated with it */ copy amazon_reviews from 's3://amazon-reviews-pds/tsv/amazon_reviews' \ credentials 'aws_iam_role=<arn_of_role_with_policy_AmazonS3ReadOnlyAccess>' gzip delimiter '\t' ignoreheader as 1; /*In case you are using an access key/secret pair*/ copy amazon_reviews from 's3://amazon-reviews-pds/tsv/amazon_reviews' \ credentials 'aws_access_key_id= aws_secret_access_key= ' \ gzip delimiter '\t' ignoreheader as 1;
<filename>db/init.sql -- template: `process-${MM-DD}` DROP TABLE IF EXISTS `process`; CREATE TABLE `process`( `id` INT UNSIGNED AUTO_INCREMENT, `app` INT NOT NULL, `agent` VARCHAR(50) NOT NULL, `pid` INT NOT NULL, `uptime` INT UNSIGNED COMMENT 'prcess uptime (sec)', `log_time` DATETIME NOT NULL COMMENT 'process log created time on agent', `version` VARCHAR(50) NOT NULL COMMENT 'xprofiler version', -- cpu `cpu_now` FLOAT(5,2), `cpu_15` FLOAT(5,2), `cpu_30` FLOAT(5,2), `cpu_60` FLOAT(5,2), -- memory -- overview `rss` BIGINT, `heap_used` INT UNSIGNED, `heap_available` INT UNSIGNED, `heap_total` INT UNSIGNED, `heap_limit` INT UNSIGNED, `heap_executeable` INT UNSIGNED, `total_physical_size` INT UNSIGNED, `malloced_memory` INT UNSIGNED, `amount_of_external_allocated_memory` INT UNSIGNED, -- new space size `new_space_size` INT UNSIGNED, `new_space_used` INT UNSIGNED, `new_space_available` INT UNSIGNED, `new_space_committed` INT UNSIGNED, -- old space size `old_space_size` INT UNSIGNED, `old_space_used` INT UNSIGNED, `old_space_available` INT UNSIGNED, `old_space_committed` INT UNSIGNED, -- code space size `code_space_size` INT UNSIGNED, `code_space_used` INT UNSIGNED, `code_space_available` INT UNSIGNED, `code_space_committed` INT UNSIGNED, -- map space size `map_space_size` INT UNSIGNED, `map_space_used` INT UNSIGNED, `map_space_available` INT UNSIGNED, `map_space_committed` INT UNSIGNED, -- large object space size `lo_space_size` INT UNSIGNED, `lo_space_used` INT UNSIGNED, `lo_space_available` INT UNSIGNED, `lo_space_committed` INT UNSIGNED, -- read only space size `read_only_space_size` INT UNSIGNED, `read_only_space_used` INT UNSIGNED, `read_only_space_available` INT UNSIGNED, `read_only_space_committed` INT UNSIGNED, -- new large object space size `new_lo_space_size` INT UNSIGNED, `new_lo_space_used` INT UNSIGNED, `new_lo_space_available` INT UNSIGNED, `new_lo_space_committed` INT UNSIGNED, -- code large object space size `code_lo_space_size` INT UNSIGNED, `code_lo_space_used` INT UNSIGNED, `code_lo_space_available` INT UNSIGNED, `code_lo_space_committed` INT UNSIGNED, -- gc `total_gc_times` INT UNSIGNED COMMENT 'total count of gc', `total_gc_duration` INT UNSIGNED COMMENT 'total duration of gc', `total_scavange_duration` INT UNSIGNED COMMENT 'total scavange duration of gc', `total_marksweep_duration` INT UNSIGNED COMMENT 'total marksweep duration of gc', `total_incremental_marking_duration` INT UNSIGNED COMMENT 'total incremental marking duration of gc', `gc_time_during_last_record` INT UNSIGNED COMMENT 'duration of last gc', `scavange_duration_last_record` INT UNSIGNED COMMENT 'scavange duration of last gc', `marksweep_duration_last_record` INT UNSIGNED COMMENT 'marksweep duration of last gc', `incremental_marking_duration_last_record` INT UNSIGNED COMMENT 'incremental marking duration of last gc', -- uv handles `active_handles` INT UNSIGNED, `active_file_handles` INT UNSIGNED, `active_and_ref_file_handles` INT UNSIGNED, `active_tcp_handles` INT UNSIGNED, `active_and_ref_tcp_handles` INT UNSIGNED, `active_udp_handles` INT UNSIGNED, `active_and_ref_udp_handles` INT UNSIGNED, `active_timer_handles` INT UNSIGNED, `active_and_ref_timer_handles` INT UNSIGNED, -- http `response_codes` VARCHAR(1024) DEFAULT '', `live_http_request` INT UNSIGNED, `http_response_close` INT UNSIGNED, `http_response_sent` INT UNSIGNED, `http_request_timeout` INT UNSIGNED, `http_patch_timeout` INT UNSIGNED, `http_rt` DOUBLE, `gm_modified` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `gm_create` DATETIME DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), INDEX (`app`, `agent`, `pid`) )ENGINE=InnoDB DEFAULT CHARSET=utf8; -- template: `osinfo-${MM-DD}` DROP TABLE IF EXISTS `osinfo`; CREATE TABLE `osinfo`( `id` INT UNSIGNED AUTO_INCREMENT, `app` INT NOT NULL, `agent` VARCHAR(50) NOT NULL, `uptime` INT UNSIGNED NOT NULL COMMENT 'system uptime', `log_time` DATETIME NOT NULL COMMENT 'system log created time on agent', `position` TINYINT UNSIGNED NOT NULL COMMENT '0: from system_log, 1: from xprofiler_log', `version` VARCHAR(50) DEFAULT '' COMMENT 'xprofiler version', -- cpu `used_cpu` DOUBLE, `cpu_count` INT UNSIGNED, -- mem `total_memory` BIGINT UNSIGNED, `free_memory` BIGINT UNSIGNED, -- load `load1` DOUBLE, `load5` DOUBLE, `load15` DOUBLE, -- disks `disks` VARCHAR(1024), -- node count `node_count` INT UNSIGNED, -- gc `total_gc_times` INT UNSIGNED COMMENT 'total count of gc (all process)', `total_gc_duration` INT UNSIGNED COMMENT 'total duration of gc (all process)', `total_scavange_duration` INT UNSIGNED COMMENT 'total scavange duration of gc (all process)', `total_marksweep_duration` INT UNSIGNED COMMENT 'total marksweep duration of gc (all process)', `total_incremental_marking_duration` INT UNSIGNED COMMENT 'total incremental marking duration of gc (all process)', `gc_time_during_last_record` INT UNSIGNED COMMENT 'duration of last gc (all process)', `scavange_duration_last_record` INT UNSIGNED COMMENT 'scavange duration of last gc (all process)', `marksweep_duration_last_record` INT UNSIGNED COMMENT 'marksweep duration of last gc (all process)', `incremental_marking_duration_last_record` INT UNSIGNED COMMENT 'incremental marking duration of last gc (all process)', -- http `response_codes` VARCHAR(1024) DEFAULT '', `live_http_request` INT UNSIGNED, `http_response_close` INT UNSIGNED, `http_response_sent` INT UNSIGNED, `http_request_timeout` INT UNSIGNED, `http_patch_timeout` INT UNSIGNED, `http_rt` DOUBLE, `gm_modified` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `gm_create` DATETIME DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), INDEX (`app`, `agent`) )ENGINE=InnoDB DEFAULT CHARSET=utf8; -- template: `alarm-${MM-DD}` DROP TABLE IF EXISTS `alarm`; CREATE TABLE `alarm`( `id` INT UNSIGNED AUTO_INCREMENT, `strategy` INT UNSIGNED NOT NULL, `agent` VARCHAR(50) NOT NULL, `message` VARCHAR(250) NOT NULL, `pid` INT DEFAULT NULL, `gm_modified` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `gm_create` DATETIME DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), INDEX (`strategy`) )ENGINE=InnoDB DEFAULT CHARSET=utf8;
--+ holdcas on; --select timediff(timestamp('2015-8-6',sec_to_time(82800)),timestamp('2015-8-5',sec_to_time(81000))): print error set timezone '+02:00'; set @x1=(select if(datediff(current_date,utc_date())=0,timediff(timestamp(current_date,sec_to_time(82800)),timestamp(utc_date(),sec_to_time(81000))),timediff(timestamp(current_date,sec_to_time(81000)),timestamp(utc_date(),sec_to_time(82800))))); select if (time(@x1)=time('00:30:00') or time(@x1)=time('11:30:00 pm'),'ok','nok'); drop variable @x1; select timediff(timestamp(current_datetime,sec_to_time(82800)),timestamp(utc_timestamp(),sec_to_time(81000))); select timediff(timestamp(current_timestamp,sec_to_time(82800)),timestamp(utc_timestamp(),sec_to_time(81000))); select timediff(timestamp(current_datetime(),sec_to_time(82800)),timestamp(utc_timestamp(),sec_to_time(81000))); select timediff(timestamp(current_timestamp(),sec_to_time(82800)),timestamp(utc_timestamp(),sec_to_time(81000))); set timezone '+01:00'; select timediff(timestamp(now(),sec_to_time(82800)),timestamp(utc_timestamp(),sec_to_time(81000))); select timediff(timestamp(localtimestamp,sec_to_time(82800)),timestamp(utc_timestamp(),sec_to_time(81000))); select timediff(timestamp(localtime(),sec_to_time(82800)),timestamp(utc_timestamp(),sec_to_time(81000))); select timediff(timestamp(localtimestamp(),sec_to_time(82800)),timestamp(utc_timestamp(),sec_to_time(81000))); select timediff(timestamp(localtime,sec_to_time(82800)),timestamp(utc_timestamp(),sec_to_time(81000))); set timezone 'Asia/Seoul'; select timediff(timestamp(now(),sec_to_time(82800)),timestamp(utc_timestamp(),sec_to_time(81000))); select timediff(timestamp(localtimestamp,sec_to_time(82800)),timestamp(utc_timestamp(),sec_to_time(81000))); select timediff(timestamp(localtime(),sec_to_time(82800)),timestamp(utc_timestamp(),sec_to_time(81000))); select timediff(timestamp(localtimestamp(),sec_to_time(82800)),timestamp(utc_timestamp(),sec_to_time(81000))); select timediff(timestamp(localtime,sec_to_time(82800)),timestamp(utc_timestamp(),sec_to_time(81000))); set timezone 'Asia/Shanghai'; select timediff(timestamp(now(),sec_to_time(82800)),timestamp(utc_timestamp(),sec_to_time(81000))); select timediff(timestamp(localtimestamp,sec_to_time(82800)),timestamp(utc_timestamp(),sec_to_time(81000))); select timediff(timestamp(localtime(),sec_to_time(82800)),timestamp(utc_timestamp(),sec_to_time(81000))); select timediff(timestamp(localtimestamp(),sec_to_time(82800)),timestamp(utc_timestamp(),sec_to_time(81000))); select timediff(timestamp(localtime,sec_to_time(82800)),timestamp(utc_timestamp(),sec_to_time(81000))); set timezone 'Asia/Shanghai'; select timediff(timestamp(systimestamp,sec_to_time(82800)),timestamp(utc_timestamp(),sec_to_time(81000))); select timediff(timestamp(sys_timestamp,sec_to_time(82800)),timestamp(utc_timestamp(),sec_to_time(81000))); select timediff(timestamp(sysdatetime,sec_to_time(82800)),timestamp(utc_timestamp(),sec_to_time(81000))); select timediff(timestamp(sys_datetime,sec_to_time(82800)),timestamp(utc_timestamp(),sec_to_time(81000))); set timezone 'Asia/Seoul'; --+ holdcas off;
<gh_stars>0 ----------------------------------------------------------------------------------- --Do not modify this file, instead use an alter proc to over-write the procedure.-- --Make sure you follow the same expected interface of parameters, and resultsets.-- ----------------------------------------------------------------------------------- IF EXISTS(SELECT * FROM [dbo].[sysobjects] WHERE ID=object_id(N'[Auth].[Permission_Search]') AND OBJECTPROPERTY(id, N'IsProcedure')=1) DROP PROC [Auth].[Permission_Search] GO-- CREATE PROCEDURE [Auth].[Permission_Search] @PermissionName varchar(100) = NULL, @Title varchar(150) = NULL AS --Generated-- BEGIN SET NOCOUNT ON; SELECT [PermissionId], [PermissionName], [Title], [IsRead] FROM [Auth].[Permission] WHERE (@PermissionName IS NULL OR [PermissionName] LIKE '%' + @PermissionName + '%') AND (@Title IS NULL OR [Title] LIKE '%' + @Title + '%') END
<reponame>mjochab/PZ_2019_Lab2_Gr5<filename>src/main/resources/db/migration/V1.8__AddWholeDayColumnToTask.sql ALTER TABLE `task` ADD COLUMN `whole_day_task` BIT(1) NOT NULL DEFAULT 0;
<filename>aula12.sql select * from cursos where descricao like '%dados%'; select * from cursos where descricao not like '%a_%'; select distinct nacionalidade from gafanhotos; select count(*) from cursos; select count(*) from cursos where carga > 40; select count(nome) from cursos; select max(carga) from cursos; select max(totaulas) from cursos where ano = '2016'; select min(totaulas) from cursos; select sum(carga) from cursos; select avg(totaulas) from cursos;
<gh_stars>0 SELECT * FROM CITY WHERE COUNTRYCODE='JPN';
<reponame>izyware/apps-sqlconsole-rekey CREATE TABLE `batchTrackingTable_izyware_sqldashboard_rekey` ( `recordid` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `originalId` bigint(20) NOT NULL, `tbl` char(30) NOT NULL, `newId` bigint(20) DEFAULT NULL, `processed` timestamp NULL DEFAULT NULL, UNIQUE KEY `originalId_newId` (`originalId`,`newId`), KEY `recordid` (`recordid`) USING BTREE, KEY `tbl` (`tbl`), KEY `processed` (`processed`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8
ALTER TABLE [dbo].[People] ADD CONSTRAINT [FK_People_CommunicationOptions] FOREIGN KEY ([CommunicationOptionId]) REFERENCES [dbo].[CommunicationOptions] ([Id]) ON DELETE NO ACTION ON UPDATE NO ACTION;
declare @o varchar(200); set @o = 'SysPec_p_ListAnimaisByLote'; if object_id(@o, 'P') is not null begin declare @d nvarchar(250); set @d = 'drop procedure ' + @o; execute sp_executesql @d; end; go create procedure SysPec_p_ListAnimaisByLote( @IdLote int ) with encryption as begin select Animal.* from SysPec_c_Animais [Animal] where Lote = @IdLote for xml auto, elements, root('Animais'); end; go
DROP DATABASE IF EXISTS portfolio_db; CREATE DATABASE portfolio_db; DROP DATABASE IF EXISTS test_portfolio_db; CREATE DATABASE test_portfolio_db; use portfolio_db; SHOW TABLES; #DROP TABLE projects; #DROP TABLE messages; SELECT * FROM messages; SELECT * FROM projects;
-- file:union.sql ln:314 expect:true create table other_events (event_id int primary key)
<filename>backend/de.metas.handlingunits.base/src/main/sql/postgresql/system/5466421_sys_gh490webui_drop_AD_Column_IsLocalPK.sql<gh_stars>1000+ alter table AD_Column drop column IsLocalPK;
<filename>Sql-Injection-in-Java/New Project 20111207 1454.sql -- MySQL Administrator dump 1.4 -- -- ------------------------------------------------------ -- Server version 5.1.55 /*!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 */; /*!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' */; -- -- Create schema test -- CREATE DATABASE IF NOT EXISTS test; USE test; -- -- Definition of table `User` -- DROP TABLE IF EXISTS `User`; CREATE TABLE `User` ( `userId` varchar(255) NOT NULL, `password` varchar(255) DEFAULT NULL, `city` varchar(255) DEFAULT NULL, `country` varchar(255) DEFAULT NULL, `email` varchar(255) DEFAULT NULL, `phone` varchar(255) DEFAULT NULL, `firstName` varchar(255) DEFAULT NULL, `lastName` varchar(255) DEFAULT NULL, PRIMARY KEY (`userId`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `User` -- /*!40000 ALTER TABLE `User` DISABLE KEYS */; INSERT INTO `User` (`userId`,`password`,`city`,`country`,`email`,`phone`,`firstName`,`lastName`) VALUES ('sandeep','sandeep123','<PASSWORD>','In<PASSWORD>','<EMAIL>','999999999','SANDEEP','MALVIYA'), ('ramki','ramki123','PUne','INdia','<EMAIL>','9999999999','<PASSWORD>','E.P.'), ('test','test123','city','country','<EMAIL>','0000000000','test','test'), ('tess','sss','ss','ss','<EMAIL>','3333333333','sss','sss'), ('tesss','1111','1111','1111','<EMAIL>','1111111111','1111','1111'), ('TESSDF','111','111','11','<EMAIL>','1111111111','111','111'), ('dsdsad','1111','fds','fds','<EMAIL>','3432222222','fdsf','fdsfs'), ('harshal1','1','1','1','<EMAIL>','1111111111','1','1'), ('g21','g12','sdf','Albania','<EMAIL>','1111111111','g12','sdf'), ('wqwq','qq','qq','qq','<EMAIL>','1212121212','qq','qq'), ('rerere','qq','qq','Albania','<EMAIL>','1212121212','qq','qq'), ('sasasa','sa','sad','Bhutan','<EMAIL>','2133333333','sa','sa'), ('tqwt','wq','sad','Angola','<EMAIL>','1222222222','wq','wq'), ('tetststst','kl','df','Bahrain','<EMAIL>','1211111111','kl','lk'), ('ghfh','34','fsd','<NAME>','<EMAIL>','3244444444','34','34'), ('renug','123','sda','Switzerland','<EMAIL>','2333333333','123','123'), ('testt','123','sda','Algeria','<EMAIL>','2222222222','123','12'), ('ghtyghty','67','jgh','Australia','<EMAIL>','7777777777','67','67'), ('test90','90','bvc','Antigua And Barbuda','<EMAIL>','1111111111','90','bcv'), ('popopo','po','po','Christmas Island','<EMAIL>','1111111111','po','po'), ('pipipi','pi','pi','Antigua And Barbuda','<EMAIL>','1111111111','pi','pi'), ('pipipipi','pi','df','Antarctica','<EMAIL>','1222222222','pi','pi'); /*!40000 ALTER TABLE `User` ENABLE KEYS */; /*!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 */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/* Copyright 2020 Curtin University Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Author: <NAME> */ CREATE TEMP FUNCTION is_isbn13(input STRING) RETURNS BOOLEAN LANGUAGE js AS r""" function calc_isbn13_check_digit(isbn13) { var mask = [1,3,1,3,1,3,1,3,1,3,1,3]; var prefix = []; for(let i = 0; i < 12; i++) { prefix.push(Number(isbn13[i])); } let check_digit = 0; for(let i = 0; i < 12; i++) { check_digit += mask[i]*prefix[i]; } return (10-(check_digit % 10)) % 10; } if(input == null) { return false; } if(input.length != 13) { return false; } if(isNaN(Number(input))) { return false; } let check_digit = String(calc_isbn13_check_digit(input)); return check_digit == input[12]; """; CREATE TEMP FUNCTION normalised_isbn(input STRING) RETURNS STRING LANGUAGE js AS r""" function calc_isbn13_check_digit(isbn13) { var mask = [1,3,1,3,1,3,1,3,1,3,1,3]; var prefix = []; for(let i = 0; i < 12; i++) { prefix.push(Number(isbn13[i])); } let check_digit = 0; for(let i = 0; i < 12; i++) { check_digit += mask[i]*prefix[i]; } return (10-(check_digit % 10)) % 10; } function calc_isbn10_check_digit(isbn10) { var mask = [10,9,8,7,6,5,4,3,2]; var prefix = []; for(let i = 0; i < 9; i++) { prefix.push(Number(isbn10[i])); } let check_digit = 0; for(let i = 0; i < 9; i++) { check_digit += mask[i]*prefix[i]; } check_digit = (11-(check_digit % 11)) % 11; if(check_digit == 10) return 'X'; return check_digit; } function is_isbn13(isbn) { if(isbn.length != 13) { return false; } if(isNaN(Number(isbn))) { return false; } let check_digit = String(calc_isbn13_check_digit(isbn)); return check_digit == isbn[12]; } function is_isbn10(isbn) { if(isbn.length != 10) { return false; } if(isNaN(Number(isbn.slice(0,9)))) { return false; } let check_digit = String(calc_isbn10_check_digit(isbn)); return check_digit == isbn[9]; } function convert_isbn10_to_isbn13(isbn10) { let isbn = "978" + isbn10.slice(0, 9); let check_digit = calc_isbn13_check_digit(isbn); isbn += String(check_digit); return isbn; } function strip_isbn_string(isbn) { var regexp = /[^0-9X]/gi; return isbn.replace(regexp, ""); } if(input == null) { return null; } // Check if valid ISBN10 or ISBN13 let stripped = strip_isbn_string(input); if(stripped.length == 13 && is_isbn13(stripped)) { return stripped; } if(stripped.length == 10 && is_isbn10(stripped)) { return convert_isbn10_to_isbn13(stripped); } return null; """;
<gh_stars>10-100 WITH data AS ( -- SELECT "123456789012" x SELECT "202201222022222222222222210222222222221222220202222222022222222222222221222200221022222222222220222222220220202221222222222222222221222221222212022202202220222222222222222222221220222222220222222212222222022222222222222222222220220122222222222220222222221220212221222222222222222221222221222202122222212211222022222222222222212220222222222222221212222222022222222222222222222221221122222222222221222222202220222220222222222222222221222220222212022222222220222022222222222202221220222222222222220202222222022222222222222221222202222022222222222222222222200222222221222222222222221222222222222222222202212220222022222222222212220220222222221222221202222222222222222222222222222202221222222222222221222222202221202221222222222222222220222220222212122222212212222222202222222200220222222222221222222222222222122222222222222222222210221022222222202221222222211220202222222222222222220222222222222222222202222200222022212222222212202221222222222222221212222222022222222222222220222211220222222222212220222222212222212220222222222222222220222220222222022202202211222022222222222221221221202222222222222202222222222222222222222220222211222122222222222221222212220222212221222222222222222221222211222212122222202210222122202222222212211220202222220222221202222222122222222222222220222221221222222222222222222212200220222222222222222222221220222202222212122202202221222222202222222222211222222222220222222202222222122222222222222221222212221122222222202220222202201222212220222222222222221220222212222222022222222200222122212222222200212220212222220222220222222222022222222022222220222202220222222222212221222212211220202220222222222222220221222200222222022222212200222022210222222211222221212222220222220212022222022222222222222222222220220022222222222220222212221221212220222222222222222221222212222212222212202211222222211222222200202220212222221222221202022222222222222022222221222212222022222222202220222202221222212220222222222222222222222200222212222212212220222222221222222210220222222222221222221202022222022222222222222222222220222222222222212222222212220220212222222222222222221222222221222212222202222221122122211222222211221220222222222222221202122222222222222122222221222222221122222222212222222222212221212222222222222222221220222221222222022222212211122222220222222210212222202222220222221222022222022222222022222222222220222122222222212220222212201220222222222222222222222220222202222202122212212221222122201222222220222220202222220222222212122222122222222122222220222211221022212222222221222202222222202220222222222222220221222200222212222222212211222222221222222202200222222222222202220222022222122222222022222221222202222122222222222221222202212222222220222222222222220222222211222222222202222210222122200222222212201220202222220202221212122222222222222222222221222222220222202222222220222222212222222221222222222222222222222220222222222222212210022022202222222221222220202222221202221202222222122222222122222220222201221122222222202222222222221220212221222222222222222220222200222202222222212201122222220222222221222222212222222212220222022222022222222022222222222201221122212222202221222212202221212222222222222222221222222211222202122212222201222222202222222212200222200222221202222222022222022222222222022221222220222222212222222222222202222221212222222222222222222222222212222212022212222222122022221222222210221200220222220222220202222222222222222122122222222220222022222222202222222222200222212222222222222222210221222221222222222222202221022122220222222211212201220222222022220212022222022222220222022220222210221022202222222221222212212220212221220222222222212221222200222202122222212211222122210222222200221212201221220112220212022202222222221022022220222210221122202222212220222212211220202222220222222222201221222221222212222202222221122222222222222210220201220222221112222212022222022222220222222222222201221122212222202222222222211221222222221222222222221222222200222202022222222202022122202222222221221202202221220202221222222212122222221222022221220222221022202222202221222222221220202221220222222222202222222221222222122202212202122022220222222210200202202222220122222212122202022222221220222220221201222122212222222222222212211220202221222222222222200220222211222222222210222202022122201222222220211220201220221202220222022202222222220020122222222220220222212222222222222202212221212221222222222222222222222220220222122222212212122122222222222222201202200221221002221212222222222222221221122220222221221122202222202221222222222221222222220222222222200220222211222222222221202200222222211222222222212212222221221112221102222222122222222020122220221221221022222222202220222222210221212220221222222222210222222221220202022211202222222022202222222222202221220221221122222012022202222222221222222222220220220122202222222220222222202222202222221222222222210222222221221202122200222201022222201222222202201221221221222012220002122222122222221121122220220222221122212222222222222202221221222221222222222222221221222212221202022222222211022022202222222220222220211222221202222002222212022222220021122222221201221222212222212220222222201222212221221222022222220222222221221202222222222220022122222222222211200211200220220202220002222212122222222022222222222210221022202222202220222212212221222220222222022222210221222200221202122212222202122122211222222202211221221222221102211222222212122222221120122221222200220122202222202221222202221222222222220222222222220220222201221202022220222222022222222022222221201210200222220212201212122212122222221121022222220210222222212222212222222212210220222220221222222222211221222211120202222220212202222122202222222200220202200022221222202122022212022222221222222222221210221022212222202221222202211222202221021222222222220222222201120212022210212212022222201022222200221221221020220212210212022212022222221221022222222222221122222222222221222212210221202220220222022222221220222210222212122201212200222122210222222201211212222021222002221222222212122222220022122220221221220222212220222221222202200120222222022222222222201220222210220222222220212200022122202222222202201201200122221022212202112212022222220020022220221222222122212220212222222202200021202220121222022222212222212221121212022202222212022222201222222212210201222220221122211012022222122222221121222220220201221122202222202222222222200021222220021222222222220222212212120202022201212200222122202122222210221210210220222002201012022202122222220021022222220200222022212222202221222212200121222220022222022222222221222210022212122222212212122222211222222212200201200021220012211202022202022222222122122222220220222222222220212221222202212020202222222222222222200222212222120222022201222221022022201221222200210220211220220122200202022212122220221022222222222222222022202221212221222222201020202202121222022222210221222200022202222212222212122022220122222210210200212020222012222102002212022221220122222222220222221022202221212222222212202220212220122222022222200221222211022212222221222221022022200222222200220220221122221102222022222212122220220122022221222222222222202220212221222202221021222212221222222222211221212212122202022201202201022022201121222021200220200220222222212102212222022222222220222220222201220222212220202222222222220221212221220222222221221221222202121212122222222211022021222020222212212201211222221022220002102212122222222021022222222210220022202220222220222212220121202220022222222222221222202211122222122202222212122221221122222111212222211122220212222112222202122221221222022220221212222022222222222222222222222022212201220222022220110220212200121202122222212220022021201122222022212212222021222012210222212222122221220020222222220221222122222220222221222212221220212212121222022220000221212212021222222202222221122020200120222010202202211220220202210202202202122220220100022222222221222122222221222222222222212022222202122222222220221221212210221212122221200221122221202020222022200200211121220022212222202202122222220020022222220200221122212222212222222202201222212200022222222222102222202220020222122202220211122222220222222121202211220021220222201202122222022222221000122221220201222022222220222220222210222220222221120222022220201222112221021212022202221201022122201121222202212220221220222212201212012212122221220122022222221221222222202220202221222221222222202221220222122222120220102202122222222222201221122022200122222220211222210220222022210112112212212222221102122221220212221122202220222222222212222121202201022222022221101222122202120200122212202211022121210022222200221221200022221222220012022202112220222120022222220220220222200222222222222220201120222221021222022222000221222201222201222221222201222220211020222220202211220201220212200202202212122220221200222222221202221222202221212221222212202021222211020222122220101221012212222201222202212022122121220022222221110212211210221112222202002222012220222002222220220222220222202220212220222212200121202211121222222222220222222221121200022222210210222222201221222122002211201121220112211022202212122221222102122222220220221022212220202222222222220122222220222222222221221220202210220200022212211121222122212222222020221221200100220222212002102212122222220012022221221211220122210220222220222220221121222202020222222220011222022200020200022212122211222221210120222002222220202220222002212102002222202220222210022222221201221202221220202221222202201021222201021222022220210221002221121221122222100212122121211122222021011221221201220002201002002212202221220111022222220201221012202221202222222210221122212201220222022220110220202222122221222211112200222120212221222222202212200220221022201012102222212221222202022220211210221110221222202221222200211121222212121222022222021222102201222202222211010220222221212021222020012212221201222122222102002212212222221120022220201201220110202222212220222212202220222222021222021220210222122200121200122220010122012222210222222110112210202002200112222022112222112222220202122220010222221201200222222222222211210122202202120222221221101221022201220202022220112110002021211222222100021221201201220212212122002222012220221211022221200210220012200220212222220200221022212201022222020220210222102211021212022221200012212021201221222101202221212011222222222100112212112221221221022220210202221021221220202220222212222220222201111222220220200220212210120201122220012012022120210121222212100210222122202102211121122222202221222101222221212200222210202220202120222202221122222211102222122222220220002200221210022210220001112120202020222122012201212010222202212110202202112220220222022221001221220000220222202220220200211022202211211222222220120222112222222222022210101210211020200021222120122222211001202102202100102222102221220101022222120221221120212220222020222200211122202210001222121222222220022210121212222212012012122022222221222121200201220222201002211020102202222221222012121221211211222110212221012222220212201222212201000222022222122222102201220222122201111221020021201120222102112220221002222222201200102222222222222012221220210222200200212220112122222211211021212220210222220222212222112021222221222201211010001022210021222022120202202200201002221120002222022222221220120220110221200022200221212121222201211222212201222222022222021222002011021200122201100112110220211222222010122211222020221112210112122202202220221211121220201210212222220221222021221221220121202221202222022220101222122101221110122212000220002022221020222201012212110022221202211122012212112220221210020220210211211110200220202021222211220021222201200222122221100221012001120022022221212000222221202120222100010211021012011022212110012202202222220210122221210202202011222220012022222212201220202202010222220222211221222011220221022200000001222020222120222202010210010000211022202001012202102222220001120220220212210020220221012202220201211022202222012222022221112222202111220200222221012000012022210222222022222211020101222222002201202222122222220222220221120222222220202222112012222210202120222221220222122222001221012210122122220200120010100220222022222000120220102112002222222010202222222220220020221220020201201222221220012112222200221221212221211222022222121221102002022202022121110012010221212021222212001221202220000202210210122212022221221001122221120220200212201220202220221212222122212220222222221221001221222021020111221020011202111221220120222200201220010000020002012121022202001222222001020221101201022021201220202000222202212020212220211222221222210221212202021222121112022211201220222220221021111221211010122022202020012212121221221020120222220220220222200210002101221222221221202201122222121221111222102122121220021211001210021222202101220011102210112122021012020200112202201220222111121220222200122210200222002001220201210222212201020222221221020220122110021222000022122001120221212210220101210221120120010202020222121202102202222120020222022220102101020200012111220220221120212212000222120221010222212001020211210200020110012222221121220222002222122001121210201100212222020202221010220220000220110101002202212011220210200121202202021222222222120222222220221212201022110101202021212202220210012210112112012102121122102202222222221002221222112210112122022221112110221200210121202212111222020220002221222022021211111002022111110120222221221220212201121122101022211120000222022211222101022220102221222210210202212000021212221220212210101222122222001222222120022021111022222101120220222020220212001221201022102002022020110212021201220112122222002211112002101200202222122220202022222200222222021221101221002121020111122011021210200221202200220102111202120211201100111120100202000212221112021220200210211120201121112210021210222120222210110222202022012220122011220120200202011112012220202200122212001221121122002110102002001202221212222212022220200222122022102100212110121200201021222221111222221120002222212221221011010001001012111121221100221001200202001100121121120120200012000200222110021221111222011221010110112102120211210122212202022222101121122221112000022002202121121010111120200200221001011212220212122010122001222002001201220011022222101220212111000002002120122211210021202212112222110122001221222022222220010011002222100221202121220121212210011211202100111022022102110221220101100221200201022121210011222101221220220221212220000222001021100220222010022122202220220211101122201211222212000201211112112220202020222112212200220220201220012202000210120012022121220201200021212200211222110022010210212112222121201220221110100221212100220122101221001101001020200111121112122201221212110221112200022211111020022222220201212020222222121222000021211211212012221202210201012022101121211102121002211200202221222202020111101112201212222010100221022202020022001112022022022221202022202222122222212121021220102010120200221020221112120122212210122011221220101220000021012021102122002200220002110221221212100220000010112020120212211020212220121222200021212202112200121201002121221102001122221200121001002202020022102111210222221022101222222012220222110220222211210201102120122212221121202210021222222021002202012212021112120111020011111201112102102212202020011021111000202212221000200121102110022000220101221122110102000022212020012102001021012010002202202002010222201201112100" x ), layers AS ( SELECT * -- FROM UNNEST((SELECT REGEXP_EXTRACT_ALL(x, '.{6}') FROM data)) layer WITH OFFSET i FROM UNNEST((SELECT REGEXP_EXTRACT_ALL(x, '.{150}') FROM data)) layer WITH OFFSET i ), splitten AS ( SELECT i, j, xy FROM layers, UNNEST(REGEXP_EXTRACT_ALL(layer, '.')) xy WITH OFFSET j ), counts AS ( SELECT i, xy, IFNULL((SELECT COUNT(*) FROM splitten WHERE a.xy=xy AND b.i=i GROUP BY i), 0) c FROM (SELECT DISTINCT xy FROM splitten) a, (SELECT DISTINCT i FROM splitten) b ) SELECT (SELECT c FROM counts WHERE i=a.i AND xy='1') * (SELECT c FROM counts WHERE i=a.i AND xy='2') FROM ( SELECT i FROM counts WHERE xy='0' ORDER BY c LIMIT 1 ) a
set tab on set trim on @tab @q @sql set echo on -- -- CREATE INDEX (visible) -- create index new1 on t1 (val2) deferred invalidation; create index new2 on t2 (val2) local deferred invalidation; set echo off @sql pause Press <CR> @tab @q @sql set echo on -- -- CREATE INDEX (invisible) -- create index new1 on t1 (val2) invisible deferred invalidation; create index new2 on t2 (val2) invisible local deferred invalidation; set echo off @sql pause Press <CR> @tab @q @sql set echo on -- -- DROP INDEX -- drop index t1i deferred invalidation; drop index t2i deferred invalidation; set echo off @sql pause Press <CR> @tab @q @sql set echo on -- -- INDEX UNUSABLE -- alter index t1i unusable deferred invalidation; alter index t2i modify partition p1i unusable deferred invalidation; alter session set CURSOR_INVALIDATION = 'deferred'; alter index t2i modify partition p1i unusable; alter session set CURSOR_INVALIDATION = 'immediate'; set echo off @sql pause Press <CR> @tab @q @sql set echo on -- -- INDEX REBUILD -- alter index t1i rebuild deferred invalidation; alter index t2i rebuild partition p1i deferred invalidation; set echo off @sql @tab prompt Get rid of indexes... set echo on drop index t1i; drop index t2i; set echo off @q @sql set echo on -- -- TRUNCATE TABLE/PARTITION -- -- ## NOTE Accepted but might not implemented because T1 is not partitioned... truncate table t1 deferred invalidation; alter table t2 truncate partition p1 deferred invalidation; set echo off prompt ### Truncate partition is fine-grained, but truncate table is not @sql @tab prompt Get rid of indexes... set echo on drop index t1i; drop index t2i; set echo off @q @sql set echo on -- -- MOVE TABLE/PARTITION -- -- ## NOTE Accepted but might not implemented... alter table t1 move deferred invalidation; alter table t2 move partition p1 deferred invalidation; set echo off prompt ### Truncate partition is fine-grained, but truncate table is not @sql @tab prompt Get rid of indexes... set echo on drop index t1i; drop index t2i; set echo off @q @sql set echo on -- -- MOVE TABLE/PARTITION -- -- ## NOTE Accepted but might not be implemented... alter table t1 move deferred invalidation; alter table t2 move deferred invalidation; set echo off @sql @tab prompt Get rid of indexes... set echo on drop index t1i; drop index t2i; set echo off @q @sql set echo on -- -- TRUNCATE NON-PARTITIONED VS PARTITIONED TABLE -- -- ## NOTE Accepted but might not implemented for non-partitioned table truncate table t1 deferred invalidation; truncate table t2 deferred invalidation; set echo off prompt ### Truncate partition is fine-grained, but truncate table is not @sql @tab prompt Get rid of indexes... set echo on drop index t1i; drop index t2i; set echo off @q @sql set echo on -- -- ADD PARTITION -- alter table t2 add partition p3 values less than (300000) deferred invalidation; set echo off @sql @tab prompt Get rid of indexes... set echo on drop index t1i; drop index t2i; alter table t2 add partition p3 values less than (300000); set echo off @q @sql set echo on -- -- DROP PARTITION -- alter table t2 drop partition p3 deferred invalidation; set echo off @sql @tab prompt Get rid of indexes... set echo on drop index t1i; drop index t2i; alter table t2 add partition p3 values less than (300000); set echo off @q @sql set echo on -- -- SPLIT PARTITION -- alter table t2 split partition p1 at (50000) into (partition p1,partition p1a) deferred invalidation; set echo off @sql @tab prompt Get rid of indexes... set echo on drop index t1i; drop index t2i; alter table t2 add partition p3 values less than (300000); set echo off @q @sql set echo on -- -- MERGE PARTITION -- Note: hash-ADD, COALESCE should behave in same way - not tested here -- alter table t2 merge partitions p2 to p3 into partition px deferred invalidation; set echo off @sql @tab prompt Get rid of indexes... set echo on drop index t1i; drop index t2i; alter table t2 add partition p3 values less than (300000); set echo off @q @sql set echo on -- -- SHRINK -- -- Probably fails... alter table t2 shrink space deferred invalidation; set echo off @sql @tab prompt Get rid of indexes... set echo on drop index t1i; drop index t2i; set echo off @q @sql set echo on -- -- ADD CONSTRAINT -- -- ## NOTE Accepted but might not be implemeted. alter table t1 add constraint mypk1 primary key (id) deferred invalidation; alter table t2 add constraint mypk2 primary key (id) deferred invalidation; set echo off @sql set echo on -- ## NOTE Accepted but not not be implemeted. alter table t1 drop constraint mypk1 deferred invalidation; set echo off @tab prompt rename set echo on drop index t1i; drop index t2i; set echo off @q @sql set echo on alter table t2 rename partition p2 to p2x deferred invalidation; set echo off @sql set echo on @tab prompt rename set echo on drop index t1i; drop index t2i; set echo off @q @sql set echo on alter table t2 modify partition p2 read only deferred invalidation; set echo off @sql set echo on @tab prompt rename set echo on drop index t1i; drop index t2i; set echo off @q @sql set echo on alter table t1 parallel 4 deferred invalidation; alter table t2 parallel 4 deferred invalidation; set echo off @sql set echo on @tab prompt rename set echo on drop index t1i; drop index t2i; set echo off @q @sql set echo on alter table t1 read only deferred invalidation; alter table t2 read only deferred invalidation; set echo off @sql set echo on @tab prompt rename set echo on drop index t1i; drop index t2i; set echo off @q @sql set echo on alter table t2 modify default attributes tablespace system deferred invalidation; set echo off @sql set echo on
<filename>data/sql/a_27.sql<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: May 13, 2016 at 05:41 AM -- Server version: 5.6.17 -- PHP Version: 5.5.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: `a_27` -- -- -------------------------------------------------------- -- -- Table structure for table `allocation_categories` -- CREATE TABLE IF NOT EXISTS `allocation_categories` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(64) NOT NULL, `display_name` varchar(64) NOT NULL, `symbol` varchar(1) NOT NULL, `description` varchar(255) DEFAULT NULL, `note` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=3; -- -- Dumping data for table `allocation_categories` -- INSERT INTO `allocation_categories` (`id`, `name`, `display_name`, `symbol`, `description`, `note`) VALUES (1, 'property-investment-allocation', 'Property Investment Allocation', '$', 'Money an investor has invested which has been allocated to an assigned property.', 'This amount will be returned to the investor at point of cash-out (sale of assigned property)'), (2, 'property-profit-share', 'Property Profit Share', '%', 'An investors entitled percentage of an assigned property.', 'Optionally paid out in yearly dividends and or at time of cash-out (sale of assigned property).'); -- -------------------------------------------------------- -- -- Table structure for table `expenses` -- CREATE TABLE IF NOT EXISTS `expenses` ( `id` int(11) NOT NULL AUTO_INCREMENT, `author_id` int(11) NOT NULL, `property_id` int(11) NOT NULL, `category_id` int(11) NOT NULL, `rate_id` int(11) NOT NULL, `amount` decimal(9,2) NOT NULL, `date_filed` date DEFAULT NULL, `date_from` date DEFAULT NULL, `date_to` date DEFAULT NULL, `description` varchar(255) DEFAULT NULL, `note` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`), KEY `property_id` (`property_id`,`category_id`,`rate_id`), KEY `rate_id` (`rate_id`), KEY `category_id` (`category_id`), KEY `author_id` (`author_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `extra` -- CREATE TABLE `extra` ( `id` int(11) NOT NULL, `type_id` int(11) NOT NULL, `name` varchar(32) COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `extra` -- INSERT INTO `extra` (`id`, `type_id`, `name`) VALUES (1, 2, 'Garbage'), (2, 2, 'Water'), (3, 2, 'Sewage'), (4, 3, 'Screened Porch'), (5, 3, 'Dishwasher'), (6, 3, 'Microwave'), (7, 3, 'Range/Oven'), (8, 3, 'Refrigerator'), (9, 3, 'Washer/Dryer Hookups'), (10, 3, 'Washer/Dryer'), (11, 3, 'Water Front'), (12, 3, 'Fireplace'), (13, 1, 'Pool'), (14, 1, 'Hot Tub/Spa'), (15, 1, 'Tennis Courts'), (16, 1, 'Fitness Center'), (17, 1, 'Clubhouse'), (18, 1, 'Car Wash Station'); -- -------------------------------------------------------- -- -- Table structure for table `extra_type` -- CREATE TABLE `extra_type` ( `id` int(11) NOT NULL, `name` varchar(32) COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `extra_type` -- INSERT INTO `extra_type` (`id`, `name`) VALUES (1, 'Amenity'), (2, 'Include'), (3, 'Feature'); -- -------------------------------------------------------- -- -- Table structure for table `financial_categories` -- CREATE TABLE IF NOT EXISTS `financial_categories` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(64) NOT NULL, `display_name` varchar(64) NOT NULL, `description` varchar(255) DEFAULT NULL, `note` varchar(255) DEFAULT NULL, `excl_cash_flow` tinyint(1) NOT NULL DEFAULT '0', `excl_all` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=22; -- -- Dumping data for table `financial_categories` -- INSERT INTO `financial_categories` (`id`, `name`, `display_name`, `description`, `note`, `excl_cash_flow`, `excl_all`) VALUES (1, 'legal', 'Legal', 'Any and all legal expenses', NULL, 0, 0), (2, 'office-supplies', 'Office Supplies', 'Any supplies used to conduct business', NULL, 0, 0), (3, 'license-permits', 'License & Permit', 'Any and all expenses due to license and permit', NULL, 0, 0), (4, 'rent', 'Rent', 'Rent (income)', NULL, 0, 0), (5, 'purchase', 'Purchase', 'Anything included with the properties initial purchase', NULL, 1, 0), (6, 'hoa', 'HOA', 'Any and all HOA expenses', NULL, 0, 0), (7, 'repair-materials', 'Repair Materials', 'Any and all material expenses for repairs and maintenance', NULL, 0, 0), (8, 'repair-labor', 'Repair Labor', 'Labor for repairs and maintenance', NULL, 0, 0), (9, 'bank-fee', 'Bank Fee', 'Any and all bank fee expenses', NULL, 0, 0), (10, 'taxes', 'Taxes', 'Any and all tax expenses', NULL, 0, 0), (11, 'bad-debt', 'Bad Debt', 'Any and all bad debts', NULL, 0, 0), (12, 'improvement-labor', 'Improvement Labor', 'Any and all labor expense for property improvements', NULL, 0, 0), (13, 'improvement-materials', 'Improvement Materials', 'Any and all material expenses for property improvement', NULL, 0, 0), (14, 'advertising', 'Advertising', 'Any and all expenses for advertising', '', 0, 0), (15, 'utility', 'Utility', 'Any and all utility expenses', NULL, 0, 0), (16, 'property_asset', 'Zestimate®', 'Property Asset (income)', NULL, 1, 0), (17, 'gas', 'Gas', 'Any and all travel related expenses', NULL, 0, 0), (18, 'deposit', 'Deposit', 'All rental property deposits', '', 1, 1), (19, 'fee', 'Fee', 'Any and all fees collected (income)', NULL, 0, 0), (20, 'technology', 'Technology', 'Any and all expenses for technology', NULL, 0, 0), (21, 'capital-gain', 'Capital Gain', 'Used for reporting quarterly capital gains from the stock market.', NULL, 0, 0); -- -------------------------------------------------------- -- -- Table structure for table `incomes` -- CREATE TABLE IF NOT EXISTS `incomes` ( `id` int(11) NOT NULL AUTO_INCREMENT, `author_id` int(11) NOT NULL, `property_id` int(11) NOT NULL, `category_id` int(11) NOT NULL, `rate_id` int(11) NOT NULL, `amount` decimal(9,2) NOT NULL, `date_filed` date DEFAULT NULL, `date_from` date DEFAULT NULL, `date_to` date DEFAULT NULL, `description` varchar(255) DEFAULT NULL, `note` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`), KEY `property_id` (`property_id`,`category_id`,`rate_id`), KEY `rate_id` (`rate_id`), KEY `category_id` (`category_id`), KEY `author_id` (`author_id`), ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `investor_allocations` -- CREATE TABLE IF NOT EXISTS `investor_allocations` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL, `category_id` int(11) NOT NULL, `property_id` int(11) NOT NULL, `allocation` float(9,2) NOT NULL, `note` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `property_category_investor_allocation` (`category_id`,`property_id`), KEY `user_id` (`user_id`), KEY `category_id` (`category_id`), KEY `property_id` (`property_id`), ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `permissions` -- CREATE TABLE IF NOT EXISTS `permissions` ( `id` int(11) NOT NULL AUTO_INCREMENT, `permission_name` varchar(128) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `UNIQ_2DEDCC6FFEDE5A6` (`permission_name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=51; -- -- Dumping data for table `permissions` -- INSERT INTO `permissions` (`id`, `permission_name`) VALUES (38, 'add_allocation'), (39, 'add_allocation_category'), (11, 'add_expense'), (12, 'add_financial_category'), (10, 'add_income'), (49, 'add_investor'), (13, 'add_permission'), (44, 'add_person'), (25, 'add_property'), (17, 'add_role'), (29, 'add_tenant'), (22, 'add_user'), (37, 'delete_allocation'), (41, 'delete_allocation_category'), (3, 'delete_expense'), (6, 'delete_financial_category'), (9, 'delete_income'), (16, 'delete_permission'), (47, 'delete_person'), (28, 'delete_property'), (20, 'delete_role'), (32, 'delete_tenant'), (24, 'delete_user'), (36, 'edit_allocation'), (40, 'edit_allocation_category'), (2, 'edit_expense'), (5, 'edit_financial_category'), (8, 'edit_income'), (50, 'edit_investor'), (14, 'edit_permission'), (45, 'edit_person'), (26, 'edit_property'), (18, 'edit_role'), (31, 'edit_tenant'), (23, 'edit_user'), (34, 'financial_report'), (33, 'financial_summary'), (35, 'view_allocation'), (42, 'view_allocation_category'), (1, 'view_expense'), (4, 'view_financial_category'), (7, 'view_income'), (43, 'view_investment'), (48, 'view_investor'), (15, 'view_permission'), (46, 'view_person'), (27, 'view_property'), (19, 'view_role'), (30, 'view_tenant'), (21, 'view_user'); -- -------------------------------------------------------- -- -- Table structure for table `properties` -- CREATE TABLE IF NOT EXISTS `properties` ( `id` int(11) NOT NULL AUTO_INCREMENT, `zpid` varchar(32) DEFAULT NULL, `status_id` int(1) DEFAULT '0', `name` varchar(64) NOT NULL, `street_address` varchar(128) NOT NULL, `unit` varchar(8) DEFAULT NULL, `city` varchar(64) NOT NULL, `state` char(2) NOT NULL, `zip` int(5) NOT NULL, PRIMARY KEY (`id`), KEY `zpid` (`zpid`), KEY `status_id` (`status_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `properties_description` -- CREATE TABLE IF NOT EXISTS `properties_description` ( `property_id` int(11) NOT NULL, `summary` varchar(1024) DEFAULT NULL, `notes` varchar(512) DEFAULT NULL, UNIQUE KEY `property_id` (`property_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `properties_images` -- CREATE TABLE IF NOT EXISTS `properties_images` ( `id` int(11) NOT NULL AUTO_INCREMENT, `property_id` int(11) NOT NULL, `name` varchar(32) NOT NULL, `description` varchar(64) DEFAULT NULL, `file` varchar(128) NOT NULL, PRIMARY KEY (`id`), KEY `properties_id` (`property_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `properties_info` -- CREATE TABLE IF NOT EXISTS `properties_info` ( `property_id` int(11) NOT NULL, `sqft` int(4) NOT NULL DEFAULT '0', `bedrooms` int(1) NOT NULL DEFAULT '0', `bathrooms` decimal(3,2) NOT NULL DEFAULT '0.00', `property_taxes` decimal(6,2) NOT NULL DEFAULT '0.00', `hoa_fees` decimal(6,2) NOT NULL DEFAULT '0.00', `year_built` int(4) NOT NULL, PRIMARY KEY (`property_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `property_extras` -- CREATE TABLE IF NOT EXISTS `property_extras` ( `property_id` int(11) NOT NULL, `extra_id` int(11) NOT NULL, UNIQUE KEY `property_extra` (`property_id`, `extra_id`), KEY `property_id` (`property_id`), KEY `extra_id` (`extra_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `rates` -- CREATE TABLE IF NOT EXISTS `rates` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(16) NOT NULL, `monthly` decimal(7,4) NOT NULL, `quarterly` decimal(7,4) NOT NULL, `semi_annual` decimal(7,4) NOT NULL, `annual` decimal(7,4) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=6; -- -- Dumping data for table `rates` -- INSERT INTO `rates` (`id`, `name`, `monthly`, `quarterly`, `semi_annual`, `annual`) VALUES (1, 'Monthly', '1.0000', '3.0000', '6.0000', '12.0000'), (2, 'Quarterly', '0.3333', '1.0000', '2.0000', '4.0000'), (3, 'Semi-Annual', '0.1667', '0.5000', '1.0000', '2.0000'), (4, 'Annual', '0.0833', '0.2500', '0.5000', '1.0000'), (5, 'One Time', '1.0000', '1.0000', '1.0000', '1.0000'); -- -------------------------------------------------------- -- -- Table structure for table `rental_listings` -- CREATE TABLE IF NOT EXISTS `rental_listings` ( `property_id` int(11) NOT NULL, `rent` decimal(6,2) NOT NULL DEFAULT '0.00', `deposit` decimal(6,2) NOT NULL DEFAULT '0.00', `available` date NOT NULL, `contact_name` varchar(32) NOT NULL, `contact_number` varchar(32) NOT NULL, `summary` varchar(512) DEFAULT NULL, `notes` varchar(256) DEFAULT NULL, `cta_button` varchar(32) DEFAULT NULL, `cta_title` varchar(32) DEFAULT NULL, `cta_message` varchar(256) DEFAULT NULL, `cta_footer` varchar(32) DEFAULT NULL, PRIMARY KEY (`property_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `roles` -- CREATE TABLE IF NOT EXISTS `roles` ( `id` int(11) NOT NULL AUTO_INCREMENT, `role_name` varchar(48) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `UNIQ_B63E2EC7E09C0C92` (`role_name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=25; -- -- Dumping data for table `roles` -- INSERT INTO `roles` (`id`, `role_name`) VALUES (15, 'account'), (10, 'account_admin'), (8, 'admin'), (6, 'agent'), (7, 'agent_admin'), (23, 'demo'), (24, 'demo_admin'), (1, 'guest'), (5, 'investor'), (22, 'investor_admin'), (3, 'landlord'), (4, 'landlord_admin'), (9, 'super_admin'), (21, 'tenant'); -- -------------------------------------------------------- -- -- Table structure for table `role_permission` -- CREATE TABLE IF NOT EXISTS `role_permission` ( `role_id` int(11) NOT NULL, `permission_id` int(11) NOT NULL, PRIMARY KEY (`role_id`,`permission_id`), KEY `IDX_6F7DF886D60322AC` (`role_id`), KEY `IDX_6F7DF886FED90CCA` (`permission_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `role_permission` -- INSERT INTO `role_permission` (`role_id`, `permission_id`) VALUES (3, 29), (3, 30), (4, 31), (4, 32), (5, 43), (6, 10), (6, 11), (6, 26), (6, 27), (7, 26), (7, 27), (8, 25), (8, 28), (9, 13), (9, 14), (9, 15), (9, 16), (9, 17), (9, 18), (9, 19), (9, 20), (9, 21), (9, 22), (9, 23), (9, 24), (10, 2), (10, 3), (10, 5), (10, 6), (10, 8), (10, 9), (10, 10), (10, 11), (10, 12), (15, 1), (15, 4), (15, 7), (15, 33), (15, 34), (22, 29), (22, 35), (22, 36), (22, 37), (22, 38), (22, 39), (22, 40), (22, 41), (22, 42), (22, 48), (22, 49), (22, 50), (23, 44), (23, 46), (24, 45), (24, 47); -- -------------------------------------------------------- -- -- Table structure for table `role_role` -- CREATE TABLE IF NOT EXISTS `role_role` ( `parent_id` int(11) NOT NULL, `child_id` int(11) NOT NULL, PRIMARY KEY (`parent_id`,`child_id`), KEY `IDX_E9D6F8FE727ACA70` (`parent_id`), KEY `IDX_E9D6F8FEDD62C21B` (`child_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `role_role` -- INSERT INTO `role_role` (`parent_id`, `child_id`) VALUES (3, 1), (4, 3), (5, 15), (6, 15), (7, 10), (8, 7), (9, 8), (10, 15), (15, 1), (21, 1), (22, 5), (23, 1), (24, 23); -- -------------------------------------------------------- -- -- Table structure for table `tenants` -- CREATE TABLE `tenants` ( `id` int(11) NOT NULL, `author_id` int(11) NOT NULL, `first_name` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `middle_initial` varchar(1) COLLATE utf8_unicode_ci DEFAULT NULL, `last_name` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `birth_date` date NOT NULL, `code` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`), KEY `author_id` (`author_id`) ) ENGINE=InnoDB AUTO_INCREMENT=76 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `user` -- CREATE TABLE IF NOT EXISTS `user` ( `id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `display_name` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `password` varchar(128) COLLATE utf8_unicode_ci NOT NULL, `state` smallint(1) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `UNIQ_8D93D649E7927C74` (`email`), UNIQUE KEY `UNIQ_8D93D649F85E0677` (`username`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `user_role` -- CREATE TABLE IF NOT EXISTS `user_role` ( `user_id` int(11) NOT NULL, `role_id` int(11) NOT NULL, PRIMARY KEY (`user_id`,`role_id`), KEY `IDX_2DE8C6A3A76ED395` (`user_id`), KEY `IDX_2DE8C6A3D60322AC` (`role_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Constraints for dumped tables -- -- -- Constraints for table `expenses` -- ALTER TABLE `expenses` ADD CONSTRAINT `fk_expenses_category_id` FOREIGN KEY (`category_id`) REFERENCES `financial_categories` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `fk_expenses_property_id` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `fk_expenses_author_id` FOREIGN KEY (`author_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION, ADD CONSTRAINT `fk_expenses_rate_id` FOREIGN KEY (`rate_id`) REFERENCES `rates` (`id`); -- -- Constraints for table `extra` -- ALTER TABLE `extra` ADD CONSTRAINT `extra_type` FOREIGN KEY (`type_id`) REFERENCES `extra_type` (`id`) ON DELETE CASCADE; -- -- Constraints for table `incomes` -- ALTER TABLE `incomes` ADD CONSTRAINT `fk_incomes_property_id` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `fk_incomes_author_id` FOREIGN KEY (`author_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION, ADD CONSTRAINT `fk_incomes_category_id` FOREIGN KEY (`category_id`) REFERENCES `financial_categories` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `fk_incomes_rate_id` FOREIGN KEY (`rate_id`) REFERENCES `rates` (`id`); -- -- Constraints for table `investors` -- ALTER TABLE `investors` ADD CONSTRAINT `fk_investors_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE; -- -- Constraints for table `investor_allocations` -- ALTER TABLE `investor_allocations` ADD CONSTRAINT `fk_investor_allocations_category_id` FOREIGN KEY (`category_id`) REFERENCES `allocation_categories` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `fk_investor_allocations_property_id` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `fk_investor_allocations_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE; -- -- Constraints for table `properties_images` -- ALTER TABLE `properties_images` ADD CONSTRAINT `fk_properties_images_property_id` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE; -- -- Constraints for table `properties_info` -- ALTER TABLE `properties_info` ADD CONSTRAINT `properties_info_property_id` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE; -- -- Constraints for table `property_extras` -- ALTER TABLE `property_extras` ADD CONSTRAINT `extra_extra` FOREIGN KEY (`extra_id`) REFERENCES `extra` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `extra_property` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE; -- -- Constraints for table `rental_listings` -- ALTER TABLE `rental_listings` ADD CONSTRAINT `fk_rental_listings_property_id` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE; -- -- Constraints for table `role_permission` -- ALTER TABLE `role_permission` ADD CONSTRAINT `fk_role_permission_role_id` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `fk_role_permission_permission_id` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE; -- -- Constraints for table `role_role` -- ALTER TABLE `role_role` ADD CONSTRAINT `fk_role_role_parent_id` FOREIGN KEY (`parent_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `fk_role_child_id` FOREIGN KEY (`child_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE; -- -- Constraints for table `user_role` -- ALTER TABLE `user_role` ADD CONSTRAINT `fk_user_role_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `fk_user_role_role_id` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE; -- -- Constraints for table `tenants` -- ALTER TABLE `tenants` ADD CONSTRAINT `fk_tenants_author_id` FOREIGN KEY (`author_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION, /*!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 */;
CREATE DATABASE IF NOT EXISTS `ezegarraDB` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `ezegarraDB`; -- MySQL dump 10.13 Distrib 5.6.13, for Win32 (x86) -- -- Host: mysql.cs.pitt.edu Database: ezegarraDB -- ------------------------------------------------------ -- Server version 5.0.45-community-log /*!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 */; -- -- Not dumping tablespaces as no INFORMATION_SCHEMA.FILES table on this server -- -- -- Table structure for table `qa_iplimits` -- DROP TABLE IF EXISTS `qa_iplimits`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `qa_iplimits` ( `ip` int(10) unsigned NOT NULL, `action` char(1) character set ascii NOT NULL, `period` int(10) unsigned NOT NULL, `count` smallint(5) unsigned NOT NULL, UNIQUE KEY `ip` (`ip`,`action`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `qa_iplimits` -- LOCK TABLES `qa_iplimits` WRITE; /*!40000 ALTER TABLE `qa_iplimits` DISABLE KEYS */; INSERT INTO `qa_iplimits` VALUES (180567304,'L',365834,5),(213311762,'A',365921,2),(213311762,'Q',365920,1),(402816503,'L',366218,1),(402816529,'A',367024,1),(402816529,'L',366240,1),(402816529,'Q',367025,1),(402854332,'L',368956,3),(402855048,'L',367661,3),(402855217,'L',366424,16),(402898008,'A',367695,1),(402898390,'L',366478,3),(402912489,'Q',366024,1),(403494621,'A',365951,1),(411246587,'A',369502,1),(411246587,'C',369503,2),(411246587,'L',368878,1),(411260129,'L',367677,1),(411303753,'V',367633,15),(1074275046,'L',368665,1),(1134807961,'L',366241,4),(1134807961,'Q',367377,1),(1135296534,'L',370564,1),(1135296694,'L',367050,3),(1135296694,'V',367087,30),(1135296744,'L',366243,6),(1135297877,'L',367060,1),(1136263312,'L',370574,4),(1136264755,'A',367606,1),(1136264755,'C',367560,1),(1136264755,'Q',367560,1),(1136264755,'V',367651,1),(1136264818,'A',368664,1),(1136264818,'L',369508,1),(1136264818,'Q',368665,1),(1136270467,'L',365776,3),(1136270467,'V',365776,1),(1136270530,'C',369523,1),(1136270530,'L',368681,2),(1136270530,'Q',366567,1),(1136270530,'V',369498,2),(1166352865,'L',370947,1),(1195135250,'C',367633,1),(1195146737,'F',367699,2),(1195146737,'L',365558,2),(1195146737,'Q',367704,1),(1195146737,'V',367699,1),(1195184889,'A',365269,1),(1195184889,'L',365327,4),(1195225309,'L',365236,3),(1195225483,'L',368630,4),(1195225568,'A',369560,1),(1195225568,'L',369525,1),(1195226338,'L',365207,2),(1203155625,'L',366237,2),(1203156445,'L',366423,3),(1203164414,'L',366882,4),(1203165937,'L',366142,1),(1203173087,'L',365966,5),(1203174036,'L',366134,2),(1204248811,'L',367696,1),(1204253369,'A',367697,1),(1204253369,'F',367698,2),(1204253369,'L',368618,1),(1204253369,'Q',368907,1),(1204253369,'V',367695,1),(1204253516,'A',367367,1),(1204253516,'C',369602,1),(1204253516,'L',369057,2),(1204253516,'Q',369559,1),(1204253526,'L',366410,7),(1204253526,'Q',367661,1),(1204255664,'L',365246,1),(1204732104,'L',369585,1),(1204735120,'A',367707,1),(1204735120,'C',367382,1),(1204735120,'L',365848,1),(1204735120,'Q',367362,1),(1204735120,'V',366858,1),(1204743687,'L',366219,1),(1204743687,'V',366068,1),(1204743790,'L',369528,1),(1204744155,'L',365211,1),(1204745755,'L',365997,3),(1213021592,'L',365811,4),(1222092561,'L',366406,3),(1222092561,'V',366406,1),(1248816143,'L',369603,1),(1248818130,'L',375875,2),(1283313715,'A',369321,1),(1283313715,'C',369403,1),(1283313715,'L',369263,1),(1283313715,'Q',369263,1),(1283315384,'L',365770,4),(1319594147,'L',370815,1),(1626015101,'Q',368785,1),(1626015101,'V',368824,1),(1626017600,'L',368662,1),(1626021017,'A',366411,1),(1626021017,'C',366026,1),(1626021017,'L',367371,2),(1626021017,'V',366028,1),(1626114849,'L',368690,2),(1626117312,'A',365725,1),(1626117312,'C',367168,1),(1626117312,'L',367168,3),(1626117312,'Q',366061,1),(1626117312,'V',365868,1),(1651495102,'C',367177,2),(1651495102,'L',367076,1),(1651495102,'Q',367076,1),(1651500030,'C',369521,1),(1651500030,'L',369605,1),(1651500030,'Q',369501,1),(1651500030,'V',369521,1),(1659637834,'A',369604,2),(1659637834,'V',369604,1),(1659650728,'L',365849,4),(1659650728,'Q',365849,1),(1659877455,'L',366195,3),(1812154294,'L',367709,1),(1813071203,'C',366087,1),(1813071203,'L',368736,2),(1813071203,'Q',366087,1),(1813071203,'V',367634,3),(1813077573,'A',369348,1),(1813077573,'C',367634,1),(1813077573,'L',368653,1),(1813077573,'Q',369348,1),(1813077573,'V',368822,1),(1915616439,'A',367632,4),(1915616439,'C',367632,1),(1915616439,'Q',367632,3),(1990851153,'A',367644,1),(2013316003,'L',365230,2),(2057429985,'Q',371551,1),(2163045187,'L',366935,2),(2163047521,'A',365354,1),(2163074422,'L',365995,1),(2163078845,'L',366163,1),(2163078873,'L',366771,1),(2166423845,'L',364219,1),(2184250029,'L',366721,1),(2184250029,'V',366721,2),(2184261044,'L',366089,1),(2184261251,'L',367381,1),(2184261268,'Q',366387,1),(2184264416,'L',368665,1),(2184266146,'L',369055,1),(2184267571,'L',365204,4),(2184269749,'L',368621,2),(2184285158,'A',369595,1),(2184285158,'L',369595,4),(2184285158,'Q',368587,1),(2184285158,'V',369595,1),(2184286233,'L',366332,1),(2184286255,'A',366087,1),(2184286255,'L',366087,6),(2184286255,'Q',366087,1),(2184286484,'A',366088,1),(2184286484,'L',366088,1),(2184286522,'A',367625,1),(2184286797,'L',365205,3),(2184286798,'L',365251,1),(2184286921,'L',366160,1),(2184286921,'V',366667,5),(2184286986,'L',365247,1),(2184287024,'Q',366404,2),(2184287032,'L',366219,1),(2184287098,'L',368621,1),(2184287131,'Q',366757,1),(2184287131,'V',366757,3),(2184287176,'L',365229,2),(2184287178,'L',367080,1),(2184287178,'V',367080,2),(2184287274,'L',366406,1),(2184287688,'A',368941,1),(2184287945,'L',365856,1),(2184287945,'V',365856,14),(2184287946,'L',366865,1),(2184290868,'Q',365895,1),(2184305714,'L',365204,3),(2184305715,'L',365204,3),(2184305716,'L',367052,3),(2184305716,'V',367052,34),(2184305717,'L',366910,1),(2184305717,'V',366716,1),(2184305718,'L',365876,1),(2184305719,'L',365876,2),(2184305720,'L',365204,3),(2184305721,'L',365204,2),(2184305722,'C',367388,1),(2184305722,'L',366045,1),(2184305723,'L',366427,1),(2184305725,'L',365229,3),(2184305726,'L',365204,1),(2184305727,'L',365708,2),(2184305729,'L',366044,1),(2184305732,'L',367100,8),(2184305732,'V',365252,1),(2184305733,'V',365252,1),(2184305734,'L',365708,1),(2184305735,'L',367604,2),(2184305735,'V',367604,23),(2184305736,'L',366403,1),(2184305737,'V',367698,2),(2184305739,'L',365204,4),(2184305746,'L',365229,1),(2184305747,'C',367698,2),(2184305747,'L',367433,1),(2184305747,'V',367698,5),(2184305798,'L',366044,1),(2184305820,'L',365272,2),(2184305826,'L',365205,1),(2184305845,'L',365206,2),(2184305951,'L',366786,3),(2184306040,'A',368711,1),(2184306080,'A',369266,1),(2184306080,'L',369264,1),(2184306141,'L',367388,1),(2184306160,'A',365271,1),(2184306201,'L',366260,1),(2184306215,'L',367372,1),(2184306215,'Q',367078,1),(2184306287,'L',367389,2),(2184306289,'L',365204,2),(2184306290,'L',365252,4),(2184306290,'V',365708,1),(2184306291,'L',365252,5),(2184306618,'L',365254,1),(2184306620,'L',367438,2),(2184306630,'A',364246,1),(2184306630,'L',365036,4),(2184306630,'Q',365248,4),(2184306652,'L',374802,3),(2291012205,'V',367698,6),(2291042845,'L',366014,1),(2291042845,'Q',366014,1),(2291068430,'L',388388,1),(2291070681,'L',369598,1),(2530476565,'L',370580,6),(2530476577,'L',365876,3),(2530476583,'V',366886,2),(2530476586,'A',366039,1),(2530476586,'C',366066,1),(2530476586,'V',366066,1),(2530476593,'L',365923,1),(2530476593,'Q',365923,1),(2530476618,'V',369595,1),(2530476632,'L',365709,4),(2530476640,'L',366814,2),(2530476654,'L',369578,1),(2530476680,'L',367099,1),(2530476702,'L',365709,2),(2530476707,'L',367556,1),(2530476710,'L',366719,1),(2530476710,'Q',366719,1),(2530476719,'L',365611,3),(2530476719,'Q',365611,1),(2530476721,'L',367100,2),(2530476735,'L',366280,3),(2530476757,'L',366884,1),(2530476774,'L',366046,2),(2530476785,'V',367699,3),(2530476794,'L',369497,1),(2530476803,'L',365917,5),(2530476803,'V',366046,1),(2530476805,'L',366541,7),(2530476807,'L',365846,1),(2530476810,'V',366066,1),(2530476852,'L',367699,1),(2530476863,'V',366086,1),(2530476869,'C',366427,1),(2530476875,'C',365873,1),(2530476912,'L',365923,1),(2530476922,'A',367700,1),(2530476926,'Q',367389,1),(2530476935,'A',367392,1),(2530476935,'L',365877,6),(2530476957,'L',367556,1),(2530476975,'L',367053,3),(2530476979,'A',366046,1),(2530476979,'L',366046,10),(2530476997,'C',367055,1),(2530476997,'L',367055,3),(2530476997,'Q',367055,1),(2530476997,'V',367055,1),(2530477005,'V',366886,1),(2530477014,'L',369282,1),(2530477034,'L',365709,12),(2530477038,'L',367437,1),(2530477042,'A',369498,1),(2530477042,'L',369497,2),(2530477042,'V',368778,1),(2530477045,'L',366904,1),(2530477140,'V',367195,1),(2530478682,'V',367364,2),(2530478862,'Q',366383,1),(2530484284,'Q',367623,1),(2530484720,'Q',367698,1),(2530486965,'A',366859,1),(2530487311,'A',367698,1),(2530487311,'L',367697,11),(2530487311,'U',367698,1),(2530487311,'V',367698,11),(2530487412,'Q',365748,1),(2530487429,'Q',367697,1),(2530487721,'L',365231,1),(2530487766,'C',367698,2),(2530487766,'F',367698,2),(2530487766,'L',367698,8),(2530487766,'V',367700,1),(2530487910,'A',365254,1),(2530487969,'L',365206,10),(2530488029,'A',365252,1),(2530488029,'V',365252,3),(2530488093,'L',365253,5),(2530488096,'L',365204,2),(2530488117,'A',365252,1),(2530488167,'L',365250,1),(2530488178,'L',365373,2),(2530491460,'Q',367368,1),(2530492056,'C',367606,1),(2530492056,'L',367606,1),(2530492056,'Q',367606,2),(2530492056,'V',367606,9),(2530492070,'L',367699,2),(2530492087,'Q',365781,1),(2530492098,'L',365798,6),(2530492121,'C',367363,1),(2530492121,'V',367363,1),(2530492371,'Q',367366,1),(2530492976,'Q',366855,1),(2530492976,'V',366856,5),(2530492978,'L',366253,2),(2530493005,'L',366446,7),(2530493005,'Q',366446,1),(2530493020,'V',367698,2),(2530493029,'L',367360,2),(2530493029,'Q',367360,1),(2530493044,'Q',366982,1),(2530493116,'A',367697,1),(2530493116,'L',367698,1),(2530493116,'Q',367698,2),(2530493116,'U',367697,1),(2530493116,'V',367698,5),(2530493178,'Q',366859,1),(2530493511,'L',365493,1),(2530493585,'L',365799,1),(2530493585,'Q',365799,1),(2530493879,'Q',368711,1),(2794676814,'L',368665,1),(2907159287,'L',371554,2),(2907375622,'A',367055,1),(2907380813,'A',366068,1),(2907380813,'L',365988,2),(2907380813,'Q',366827,1),(2907409109,'L',369358,3),(2907409109,'U',368635,1),(2935805125,'L',366237,2),(2959316545,'L',368059,1),(2992331112,'V',371484,1),(3331065037,'A',367381,1),(3331065037,'L',367362,3),(3538263616,'A',367661,2); /*!40000 ALTER TABLE `qa_iplimits` 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 2015-03-03 14:25:00
<gh_stars>1-10 -- Sequence: client_id_seq -- DROP SEQUENCE client_id_seq; CREATE SEQUENCE client_id_seq INCREMENT 1 MINVALUE 1 MAXVALUE 9223372036854775807 START 1 CACHE 1; ALTER TABLE client_id_seq OWNER TO postgres; -- Sequence: order_id_seq -- DROP SEQUENCE order_id_seq; CREATE SEQUENCE order_id_seq INCREMENT 1 MINVALUE 1 MAXVALUE 9223372036854775807 START 1 CACHE 1; ALTER TABLE order_id_seq OWNER TO postgres; -- Table: clientes -- DROP TABLE clientes; CREATE TABLE clientes ( "Id" numeric NOT NULL DEFAULT nextval('client_id_seq'::regclass), name character varying, lastname character varying, birthdate date, createdate date, CONSTRAINT "Id" PRIMARY KEY ("Id") ) WITH ( OIDS=FALSE ); ALTER TABLE clientes OWNER TO postgres; -- Table: ordenes -- DROP TABLE ordenes; CREATE TABLE ordenes ( "Id" numeric NOT NULL DEFAULT nextval('order_id_seq'::regclass), noorden character(10), datecreate date, total numeric(10,2), CONSTRAINT ordenes_pkey PRIMARY KEY ("Id") ) WITH ( OIDS=FALSE ); ALTER TABLE ordenes OWNER TO postgres;
<gh_stars>0 SELECT DepartmentID, Salary FROM (SELECT DepartmentId, MAX(Salary) AS Salary, DENSE_RANK() OVER (PARTITION BY DepartmentId ORDER BY Salary DESC) AS Rank FROM Employees GROUP BY DepartmentID, Salary) AS Salaries WHERE Rank = 3
/* Navicat MariaDB Data Transfer Source Server : local mariadb Source Server Version : 100122 Source Host : localhost:3307 Source Database : acceso Target Server Type : MariaDB Target Server Version : 100122 File Encoding : 65001 Date: 2019-04-12 20:12:14 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for users -- ---------------------------- DROP TABLE IF EXISTS `users`; CREATE TABLE `users` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `email` varchar(249) COLLATE utf8mb4_unicode_ci NOT NULL, `password` varchar(255) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL, `username` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `status` tinyint(2) unsigned NOT NULL DEFAULT '0', `verified` tinyint(1) unsigned NOT NULL DEFAULT '0', `resettable` tinyint(1) unsigned NOT NULL DEFAULT '1', `roles_mask` int(10) unsigned NOT NULL DEFAULT '0', `registered` int(10) unsigned NOT NULL, `last_login` int(10) unsigned DEFAULT NULL, `force_logout` mediumint(7) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `email` (`email`) ) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- ---------------------------- -- Records of users -- ---------------------------- INSERT INTO `users` VALUES ('1', '<EMAIL>', '$2y$10$s5aEKQZFZHVC7x2AMuFHMOqR6zWhGzN7yKcBmBOTT8BrhVo0ifXUm', 'zayro', '0', '1', '1', '1', '1532795515', '1544109798', '0'); INSERT INTO `users` VALUES ('2', '<EMAIL>', '$2y$10$Ea9JHTusZ36DxZu/otr2Y.gBYlKO.rieHhapzKMj0HOuaa.xM.KoK', 'demo', '0', '1', '1', '16', '1536006150', '1540326051', '0'); INSERT INTO `users` VALUES ('3', '<EMAIL>', '$2y$10$VasYINvoyNmFmmmFfU0EluX2IytfLaOuTafDFKQ64jjOUrwCqNkvi', 'test', '0', '1', '1', '5', '1540326118', '1542817035', '0'); INSERT INTO `users` VALUES ('4', '<EMAIL>', '$2y$10$Jx3fDiB.h4GxsUap4TRRhO9IWDxC7juvngWyTPvKUwknxyx1CGYny', 'olga', '0', '1', '1', '1', '1544107223', '1544107313', '0'); -- ---------------------------- -- Table structure for users_confirmations -- ---------------------------- DROP TABLE IF EXISTS `users_confirmations`; CREATE TABLE `users_confirmations` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `user_id` int(10) unsigned NOT NULL, `email` varchar(249) COLLATE utf8mb4_unicode_ci NOT NULL, `selector` varchar(16) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL, `token` varchar(255) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL, `expires` int(10) unsigned NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `selector` (`selector`), KEY `email_expires` (`email`,`expires`), KEY `user_id` (`user_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- ---------------------------- -- Records of users_confirmations -- ---------------------------- -- ---------------------------- -- Table structure for users_menu -- ---------------------------- DROP TABLE IF EXISTS `users_menu`; CREATE TABLE `users_menu` ( `id_users_menu` int(11) NOT NULL, `menu` varchar(50) NOT NULL, `link` varchar(50) NOT NULL, `order_menu` int(3) NOT NULL, PRIMARY KEY (`id_users_menu`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of users_menu -- ---------------------------- INSERT INTO `users_menu` VALUES ('1', 'MENU.sampling.title', 'table-export', '5'); INSERT INTO `users_menu` VALUES ('2', 'MENU.species.title', 'species', '8'); INSERT INTO `users_menu` VALUES ('3', 'test', 'test', '-100'); INSERT INTO `users_menu` VALUES ('4', 'home', 'home', '1'); INSERT INTO `users_menu` VALUES ('5', 'MENU.audit.title', 'audit', '-1'); INSERT INTO `users_menu` VALUES ('6', 'MENU.project.title', 'projects', '2'); INSERT INTO `users_menu` VALUES ('7', 'MENU.biozone.title', 'biozone', '6'); INSERT INTO `users_menu` VALUES ('8', 'MENU.basins.title', 'basin', '3'); INSERT INTO `users_menu` VALUES ('9', 'MENU.location.title', 'location', '4'); INSERT INTO `users_menu` VALUES ('10', 'MENU.import.title', 'import', '100'); INSERT INTO `users_menu` VALUES ('11', 'MENU.formations.title', 'formations', '7'); INSERT INTO `users_menu` VALUES ('12', 'MENU.samples.title', 'samples', '4'); INSERT INTO `users_menu` VALUES ('13', 'MENU.type_species.title', 'type_species', '0'); INSERT INTO `users_menu` VALUES ('14', 'MENU.residuos.title', 'residuos', '10'); INSERT INTO `users_menu` VALUES ('15', 'MENU.plates.title', 'plates', '9'); INSERT INTO `users_menu` VALUES ('16', 'MENU. finished_samples.title', 'finished_samples', '0'); -- ---------------------------- -- Table structure for users_privileges -- ---------------------------- DROP TABLE IF EXISTS `users_privileges`; CREATE TABLE `users_privileges` ( `id_users_privileges` int(11) NOT NULL AUTO_INCREMENT, `id_users_roles` int(11) NOT NULL, `id_users_menu` int(11) NOT NULL, PRIMARY KEY (`id_users_privileges`), UNIQUE KEY `id_users_roles_2` (`id_users_roles`,`id_users_menu`), KEY `id_users_roles` (`id_users_roles`,`id_users_menu`) ) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of users_privileges -- ---------------------------- INSERT INTO `users_privileges` VALUES ('1', '1', '1'); INSERT INTO `users_privileges` VALUES ('2', '1', '2'); INSERT INTO `users_privileges` VALUES ('4', '1', '4'); INSERT INTO `users_privileges` VALUES ('6', '1', '6'); INSERT INTO `users_privileges` VALUES ('7', '1', '7'); INSERT INTO `users_privileges` VALUES ('8', '1', '8'); INSERT INTO `users_privileges` VALUES ('9', '1', '9'); INSERT INTO `users_privileges` VALUES ('11', '1', '10'); INSERT INTO `users_privileges` VALUES ('12', '1', '11'); INSERT INTO `users_privileges` VALUES ('27', '1', '12'); INSERT INTO `users_privileges` VALUES ('28', '1', '14'); INSERT INTO `users_privileges` VALUES ('29', '1', '15'); INSERT INTO `users_privileges` VALUES ('15', '5', '1'); INSERT INTO `users_privileges` VALUES ('16', '5', '2'); INSERT INTO `users_privileges` VALUES ('17', '5', '3'); INSERT INTO `users_privileges` VALUES ('18', '5', '4'); INSERT INTO `users_privileges` VALUES ('19', '5', '5'); INSERT INTO `users_privileges` VALUES ('20', '5', '6'); INSERT INTO `users_privileges` VALUES ('21', '5', '7'); INSERT INTO `users_privileges` VALUES ('22', '5', '8'); INSERT INTO `users_privileges` VALUES ('23', '5', '9'); INSERT INTO `users_privileges` VALUES ('24', '5', '10'); INSERT INTO `users_privileges` VALUES ('25', '5', '11'); INSERT INTO `users_privileges` VALUES ('26', '5', '12'); -- ---------------------------- -- Table structure for users_remembered -- ---------------------------- DROP TABLE IF EXISTS `users_remembered`; CREATE TABLE `users_remembered` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `user` int(10) unsigned NOT NULL, `selector` varchar(24) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL, `token` varchar(255) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL, `expires` int(10) unsigned NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `selector` (`selector`), KEY `user` (`user`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- ---------------------------- -- Records of users_remembered -- ---------------------------- -- ---------------------------- -- Table structure for users_resets -- ---------------------------- DROP TABLE IF EXISTS `users_resets`; CREATE TABLE `users_resets` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `user` int(10) unsigned NOT NULL, `selector` varchar(20) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL, `token` varchar(255) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL, `expires` int(10) unsigned NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `selector` (`selector`), KEY `user_expires` (`user`,`expires`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- ---------------------------- -- Records of users_resets -- ---------------------------- -- ---------------------------- -- Table structure for users_roles -- ---------------------------- DROP TABLE IF EXISTS `users_roles`; CREATE TABLE `users_roles` ( `id_users_roles` int(11) NOT NULL, `name` varchar(100) NOT NULL, PRIMARY KEY (`id_users_roles`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of users_roles -- ---------------------------- INSERT INTO `users_roles` VALUES ('1', 'ADMIN'); INSERT INTO `users_roles` VALUES ('2', 'AUTHOR'); INSERT INTO `users_roles` VALUES ('4', 'CONSULTANT'); INSERT INTO `users_roles` VALUES ('5', 'DEVELOPER'); INSERT INTO `users_roles` VALUES ('16', 'CONSUMER'); -- ---------------------------- -- Table structure for users_throttling -- ---------------------------- DROP TABLE IF EXISTS `users_throttling`; CREATE TABLE `users_throttling` ( `bucket` varchar(44) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL, `tokens` float unsigned NOT NULL, `replenished_at` int(10) unsigned NOT NULL, `expires_at` int(10) unsigned NOT NULL, PRIMARY KEY (`bucket`), KEY `expires_at` (`expires_at`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- ---------------------------- -- Records of users_throttling -- ---------------------------- INSERT INTO `users_throttling` VALUES ('gfpgD6u8OVPqBE3UuiOWEQhatAycxVzxkwxzbp7u598', '498.04', '1536587577', '1536760377'); INSERT INTO `users_throttling` VALUES ('Jjl8HEbTSJpZBWoyXOajJXqciuUdngUbah061jwhliE', '18.0078', '1536587577', '1536623577'); INSERT INTO `users_throttling` VALUES ('ejWtPDKvxt-q7LZ3mFjzUoIWKJYzu47igC8Jd9mffFk', '72.3403', '1544109798', '1544649798'); INSERT INTO `users_throttling` VALUES ('QduM75nGblH2CDKFyk0QeukPOwuEVDAUFE54ITnHM38', '67.2453', '1537816876', '1538356876'); -- ---------------------------- -- View structure for view_privileges -- ---------------------------- DROP VIEW IF EXISTS `view_privileges`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `view_privileges` AS select `u`.`id` AS `id`,`u`.`username` AS `username`,`u`.`email` AS `email`,`ur`.`name` AS `name`,`um`.`menu` AS `menu`,`um`.`link` AS `link` from (((`users` `u` join `users_roles` `ur` on((`ur`.`id_users_roles` = `u`.`roles_mask`))) join `users_privileges` `up` on((`up`.`id_users_roles` = `ur`.`id_users_roles`))) join `users_menu` `um` on((`um`.`id_users_menu` = `up`.`id_users_menu`))) order by `um`.`order_menu` ; ; SET FOREIGN_KEY_CHECKS=1;
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Versión del servidor: 10.1.21-MariaDB - mariadb.org binary distribution -- SO del servidor: Win32 -- HeidiSQL Versión: 9.4.0.5173 -- -------------------------------------------------------- /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET NAMES utf8 */; /*!50503 SET NAMES utf8mb4 */; /*!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' */; -- Volcando estructura para tabla fortinet.activities DROP TABLE IF EXISTS `activities`; CREATE TABLE IF NOT EXISTS `activities` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL, `activity_type_id` int(11) NOT NULL, `country_id` int(11) NOT NULL, `technology_id` int(11) NOT NULL, `se_id` int(11) NOT NULL, `date` date NOT NULL, `quarter` int(11) DEFAULT NULL, `smart_ticket` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `customer` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `activity_executed` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `execution_date` date DEFAULT NULL, `time_used` int(11) NOT NULL DEFAULT '0', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla fortinet.activity_types DROP TABLE IF EXISTS `activity_types`; CREATE TABLE IF NOT EXISTS `activity_types` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `deleted_at` timestamp NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla fortinet.countries DROP TABLE IF EXISTS `countries`; CREATE TABLE IF NOT EXISTS `countries` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `territory` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `deleted_at` timestamp NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla fortinet.migrations DROP TABLE IF EXISTS `migrations`; CREATE TABLE IF NOT EXISTS `migrations` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `batch` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla fortinet.plos DROP TABLE IF EXISTS `plos`; CREATE TABLE IF NOT EXISTS `plos` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL, `owner_name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL, `owner_email` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla fortinet.projects DROP TABLE IF EXISTS `projects`; CREATE TABLE IF NOT EXISTS `projects` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL, `progress` int(11) NOT NULL, `estimated_start_at` datetime NOT NULL, `estimated_finish_at` datetime NOT NULL, `real_start_at` datetime NOT NULL, `real_finish_at` datetime NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla fortinet.ses DROP TABLE IF EXISTS `ses`; CREATE TABLE IF NOT EXISTS `ses` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `deleted_at` timestamp NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla fortinet.technologies DROP TABLE IF EXISTS `technologies`; CREATE TABLE IF NOT EXISTS `technologies` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `deleted_at` timestamp NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla fortinet.territories DROP TABLE IF EXISTS `territories`; CREATE TABLE IF NOT EXISTS `territories` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `deleted_at` timestamp NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla fortinet.users DROP TABLE IF EXISTS `users`; CREATE TABLE IF NOT EXISTS `users` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `deleted_at` timestamp NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `remember_token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- La exportación de datos fue deseleccionada. /*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */; /*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
SELECT rr.id FROM room_reserve as rr WHERE (date '2021-08-09', date '2021-08-23') OVERLAPS (rr.arrival_at, rr.departure_at) ::boolean AND rr.room_id = 1
SET FOREIGN_KEY_CHECKS=0; ALTER TABLE accountgroups ADD CONSTRAINT `accountgroups_ibfk_1` FOREIGN KEY (`sectioninaccounts`) REFERENCES `accountsection` (`sectionid`); ALTER TABLE audittrail ADD CONSTRAINT `audittrail_ibfk_1` FOREIGN KEY (`userid`) REFERENCES `www_users` (`userid`); ALTER TABLE bankaccounts ADD CONSTRAINT `bankaccounts_ibfk_1` FOREIGN KEY (`accountcode`) REFERENCES `chartmaster` (`accountcode`); ALTER TABLE banktrans ADD CONSTRAINT `banktrans_ibfk_1` FOREIGN KEY (`type`) REFERENCES `systypes` (`typeid`); ALTER TABLE banktrans ADD CONSTRAINT `banktrans_ibfk_2` FOREIGN KEY (`bankact`) REFERENCES `bankaccounts` (`accountcode`); ALTER TABLE bom ADD CONSTRAINT `bom_ibfk_1` FOREIGN KEY (`parent`) REFERENCES `stockmaster` (`stockid`); ALTER TABLE bom ADD CONSTRAINT `bom_ibfk_2` FOREIGN KEY (`component`) REFERENCES `stockmaster` (`stockid`); ALTER TABLE bom ADD CONSTRAINT `bom_ibfk_3` FOREIGN KEY (`workcentreadded`) REFERENCES `workcentres` (`code`); ALTER TABLE bom ADD CONSTRAINT `bom_ibfk_4` FOREIGN KEY (`loccode`) REFERENCES `locations` (`loccode`); ALTER TABLE buckets ADD CONSTRAINT `buckets_ibfk_1` FOREIGN KEY (`workcentre`) REFERENCES `workcentres` (`code`); ALTER TABLE chartdetails ADD CONSTRAINT `chartdetails_ibfk_1` FOREIGN KEY (`accountcode`) REFERENCES `chartmaster` (`accountcode`); ALTER TABLE chartdetails ADD CONSTRAINT `chartdetails_ibfk_2` FOREIGN KEY (`period`) REFERENCES `periods` (`periodno`); ALTER TABLE chartmaster ADD CONSTRAINT `chartmaster_ibfk_1` FOREIGN KEY (`group_`) REFERENCES `accountgroups` (`groupname`); ALTER TABLE contractbom ADD CONSTRAINT `contractbom_ibfk_1` FOREIGN KEY (`workcentreadded`) REFERENCES `workcentres` (`code`); ALTER TABLE contractbom ADD CONSTRAINT `contractbom_ibfk_2` FOREIGN KEY (`loccode`) REFERENCES `locations` (`loccode`); ALTER TABLE contractbom ADD CONSTRAINT `contractbom_ibfk_3` FOREIGN KEY (`component`) REFERENCES `stockmaster` (`stockid`); ALTER TABLE contractreqts ADD CONSTRAINT `contractreqts_ibfk_1` FOREIGN KEY (`contract`) REFERENCES `contracts` (`contractref`); ALTER TABLE contracts ADD CONSTRAINT `contracts_ibfk_1` FOREIGN KEY (`debtorno`, `branchcode`) REFERENCES `custbranch` (`debtorno`, `branchcode`); ALTER TABLE contracts ADD CONSTRAINT `contracts_ibfk_2` FOREIGN KEY (`categoryid`) REFERENCES `stockcategory` (`categoryid`); ALTER TABLE contracts ADD CONSTRAINT `contracts_ibfk_3` FOREIGN KEY (`typeabbrev`) REFERENCES `salestypes` (`typeabbrev`); ALTER TABLE custallocns ADD CONSTRAINT `custallocns_ibfk_1` FOREIGN KEY (`transid_allocfrom`) REFERENCES `debtortrans` (`id`); ALTER TABLE custallocns ADD CONSTRAINT `custallocns_ibfk_2` FOREIGN KEY (`transid_allocto`) REFERENCES `debtortrans` (`id`); ALTER TABLE custbranch ADD CONSTRAINT `custbranch_ibfk_1` FOREIGN KEY (`debtorno`) REFERENCES `debtorsmaster` (`debtorno`); ALTER TABLE custbranch ADD CONSTRAINT `custbranch_ibfk_2` FOREIGN KEY (`area`) REFERENCES `areas` (`areacode`); ALTER TABLE custbranch ADD CONSTRAINT `custbranch_ibfk_3` FOREIGN KEY (`salesman`) REFERENCES `salesman` (`salesmancode`); ALTER TABLE custbranch ADD CONSTRAINT `custbranch_ibfk_4` FOREIGN KEY (`defaultlocation`) REFERENCES `locations` (`loccode`); ALTER TABLE custbranch ADD CONSTRAINT `custbranch_ibfk_6` FOREIGN KEY (`defaultshipvia`) REFERENCES `shippers` (`shipper_id`); ALTER TABLE custbranch ADD CONSTRAINT `custbranch_ibfk_7` FOREIGN KEY (`taxgroupid`) REFERENCES `taxgroups` (`taxgroupid`); ALTER TABLE debtorsmaster ADD CONSTRAINT `debtorsmaster_ibfk_1` FOREIGN KEY (`holdreason`) REFERENCES `holdreasons` (`reasoncode`); ALTER TABLE debtorsmaster ADD CONSTRAINT `debtorsmaster_ibfk_2` FOREIGN KEY (`currcode`) REFERENCES `currencies` (`currabrev`); ALTER TABLE debtorsmaster ADD CONSTRAINT `debtorsmaster_ibfk_3` FOREIGN KEY (`paymentterms`) REFERENCES `paymentterms` (`termsindicator`); ALTER TABLE debtorsmaster ADD CONSTRAINT `debtorsmaster_ibfk_4` FOREIGN KEY (`salestype`) REFERENCES `salestypes` (`typeabbrev`); ALTER TABLE debtorsmaster ADD CONSTRAINT `debtorsmaster_ibfk_5` FOREIGN KEY (`typeid`) REFERENCES `debtortype` (`typeid`); ALTER TABLE debtortrans ADD CONSTRAINT `debtortrans_ibfk_1` FOREIGN KEY (`debtorno`) REFERENCES `custbranch` (`debtorno`); ALTER TABLE debtortrans ADD CONSTRAINT `debtortrans_ibfk_2` FOREIGN KEY (`type`) REFERENCES `systypes` (`typeid`); ALTER TABLE debtortrans ADD CONSTRAINT `debtortrans_ibfk_3` FOREIGN KEY (`prd`) REFERENCES `periods` (`periodno`); ALTER TABLE debtortranstaxes ADD CONSTRAINT `debtortranstaxes_ibfk_1` FOREIGN KEY (`taxauthid`) REFERENCES `taxauthorities` (`taxid`); ALTER TABLE debtortranstaxes ADD CONSTRAINT `debtortranstaxes_ibfk_2` FOREIGN KEY (`debtortransid`) REFERENCES `debtortrans` (`id`); ALTER TABLE deliverynotes ADD CONSTRAINT `deliverynotes_ibfk_1` FOREIGN KEY (`salesorderno`) REFERENCES `salesorders` (`orderno`); ALTER TABLE deliverynotes ADD CONSTRAINT `deliverynotes_ibfk_2` FOREIGN KEY (`salesorderno`, `salesorderlineno`) REFERENCES `salesorderdetails` (`orderno`, `orderlineno`); ALTER TABLE discountmatrix ADD CONSTRAINT `discountmatrix_ibfk_1` FOREIGN KEY (`salestype`) REFERENCES `salestypes` (`typeabbrev`); ALTER TABLE freightcosts ADD CONSTRAINT `freightcosts_ibfk_1` FOREIGN KEY (`locationfrom`) REFERENCES `locations` (`loccode`); ALTER TABLE freightcosts ADD CONSTRAINT `freightcosts_ibfk_2` FOREIGN KEY (`shipperid`) REFERENCES `shippers` (`shipper_id`); ALTER TABLE gltrans ADD CONSTRAINT `gltrans_ibfk_1` FOREIGN KEY (`account`) REFERENCES `chartmaster` (`accountcode`); ALTER TABLE gltrans ADD CONSTRAINT `gltrans_ibfk_2` FOREIGN KEY (`type`) REFERENCES `systypes` (`typeid`); ALTER TABLE gltrans ADD CONSTRAINT `gltrans_ibfk_3` FOREIGN KEY (`periodno`) REFERENCES `periods` (`periodno`); ALTER TABLE grns ADD CONSTRAINT `grns_ibfk_1` FOREIGN KEY (`supplierid`) REFERENCES `suppliers` (`supplierid`); ALTER TABLE grns ADD CONSTRAINT `grns_ibfk_2` FOREIGN KEY (`podetailitem`) REFERENCES `purchorderdetails` (`podetailitem`); ALTER TABLE locations ADD CONSTRAINT `locations_ibfk_1` FOREIGN KEY (`taxprovinceid`) REFERENCES `taxprovinces` (`taxprovinceid`); ALTER TABLE locstock ADD CONSTRAINT `locstock_ibfk_1` FOREIGN KEY (`loccode`) REFERENCES `locations` (`loccode`); ALTER TABLE locstock ADD CONSTRAINT `locstock_ibfk_2` FOREIGN KEY (`stockid`) REFERENCES `stockmaster` (`stockid`); ALTER TABLE loctransfers ADD CONSTRAINT `loctransfers_ibfk_1` FOREIGN KEY (`shiploc`) REFERENCES `locations` (`loccode`); ALTER TABLE loctransfers ADD CONSTRAINT `loctransfers_ibfk_2` FOREIGN KEY (`recloc`) REFERENCES `locations` (`loccode`); ALTER TABLE loctransfers ADD CONSTRAINT `loctransfers_ibfk_3` FOREIGN KEY (`stockid`) REFERENCES `stockmaster` (`stockid`); ALTER TABLE mrpdemands ADD CONSTRAINT `mrpdemands_ibfk_1` FOREIGN KEY (`mrpdemandtype`) REFERENCES `mrpdemandtypes` (`mrpdemandtype`); ALTER TABLE mrpdemands ADD CONSTRAINT `mrpdemands_ibfk_2` FOREIGN KEY (`stockid`) REFERENCES `stockmaster` (`stockid`); ALTER TABLE orderdeliverydifferenceslog ADD CONSTRAINT `orderdeliverydifferenceslog_ibfk_1` FOREIGN KEY (`stockid`) REFERENCES `stockmaster` (`stockid`); ALTER TABLE orderdeliverydifferenceslog ADD CONSTRAINT `orderdeliverydifferenceslog_ibfk_2` FOREIGN KEY (`debtorno`, `branch`) REFERENCES `custbranch` (`debtorno`, `branchcode`); ALTER TABLE orderdeliverydifferenceslog ADD CONSTRAINT `orderdeliverydifferenceslog_ibfk_3` FOREIGN KEY (`orderno`) REFERENCES `salesorders` (`orderno`); ALTER TABLE prices ADD CONSTRAINT `prices_ibfk_1` FOREIGN KEY (`stockid`) REFERENCES `stockmaster` (`stockid`); ALTER TABLE prices ADD CONSTRAINT `prices_ibfk_2` FOREIGN KEY (`currabrev`) REFERENCES `currencies` (`currabrev`); ALTER TABLE prices ADD CONSTRAINT `prices_ibfk_3` FOREIGN KEY (`typeabbrev`) REFERENCES `salestypes` (`typeabbrev`); ALTER TABLE purchdata ADD CONSTRAINT `purchdata_ibfk_1` FOREIGN KEY (`stockid`) REFERENCES `stockmaster` (`stockid`); ALTER TABLE purchdata ADD CONSTRAINT `purchdata_ibfk_2` FOREIGN KEY (`supplierno`) REFERENCES `suppliers` (`supplierid`); ALTER TABLE purchorderdetails ADD CONSTRAINT `purchorderdetails_ibfk_1` FOREIGN KEY (`orderno`) REFERENCES `purchorders` (`orderno`); ALTER TABLE purchorders ADD CONSTRAINT `purchorders_ibfk_1` FOREIGN KEY (`supplierno`) REFERENCES `suppliers` (`supplierid`); ALTER TABLE purchorders ADD CONSTRAINT `purchorders_ibfk_2` FOREIGN KEY (`intostocklocation`) REFERENCES `locations` (`loccode`); ALTER TABLE recurringsalesorders ADD CONSTRAINT `recurringsalesorders_ibfk_1` FOREIGN KEY (`branchcode`, `debtorno`) REFERENCES `custbranch` (`branchcode`, `debtorno`); ALTER TABLE recurringsalesorders ADD CONSTRAINT `recurrsalesorderdetails_ibfk_1` FOREIGN KEY (`recurrorderno`) REFERENCES `recurringsalesorders` (`recurrorderno`); ALTER TABLE recurrsalesorderdetails ADD CONSTRAINT `recurrsalesorderdetails_ibfk_2` FOREIGN KEY (`stkcode`) REFERENCES `stockmaster` (`stockid`); ALTER TABLE reportcolumns ADD CONSTRAINT `reportcolumns_ibfk_1` FOREIGN KEY (`reportid`) REFERENCES `reportheaders` (`reportid`); ALTER TABLE salesanalysis ADD CONSTRAINT `salesanalysis_ibfk_1` FOREIGN KEY (`periodno`) REFERENCES `periods` (`periodno`); ALTER TABLE salescatprod ADD CONSTRAINT `salescatprod_ibfk_1` FOREIGN KEY (`stockid`) REFERENCES `stockmaster` (`stockid`); ALTER TABLE salescatprod ADD CONSTRAINT `salescatprod_ibfk_2` FOREIGN KEY (`salescatid`) REFERENCES `salescat` (`salescatid`); ALTER TABLE salesorderdetails ADD CONSTRAINT `salesorderdetails_ibfk_1` FOREIGN KEY (`orderno`) REFERENCES `salesorders` (`orderno`); ALTER TABLE salesorderdetails ADD CONSTRAINT `salesorderdetails_ibfk_2` FOREIGN KEY (`stkcode`) REFERENCES `stockmaster` (`stockid`); ALTER TABLE salesorders ADD CONSTRAINT `salesorders_ibfk_1` FOREIGN KEY (`branchcode`, `debtorno`) REFERENCES `custbranch` (`branchcode`, `debtorno`); ALTER TABLE salesorders ADD CONSTRAINT `salesorders_ibfk_2` FOREIGN KEY (`shipvia`) REFERENCES `shippers` (`shipper_id`); ALTER TABLE salesorders ADD CONSTRAINT `salesorders_ibfk_3` FOREIGN KEY (`fromstkloc`) REFERENCES `locations` (`loccode`); ALTER TABLE securitygroups ADD CONSTRAINT `securitygroups_secroleid_fk` FOREIGN KEY (`secroleid`) REFERENCES `securityroles` (`secroleid`); ALTER TABLE securitygroups ADD CONSTRAINT `securitygroups_tokenid_fk` FOREIGN KEY (`tokenid`) REFERENCES `securitytokens` (`tokenid`); ALTER TABLE shipmentcharges ADD CONSTRAINT `shipmentcharges_ibfk_1` FOREIGN KEY (`shiptref`) REFERENCES `shipments` (`shiptref`); ALTER TABLE shipmentcharges ADD CONSTRAINT `shipmentcharges_ibfk_2` FOREIGN KEY (`transtype`) REFERENCES `systypes` (`typeid`); ALTER TABLE shipments ADD CONSTRAINT `shipments_ibfk_1` FOREIGN KEY (`supplierid`) REFERENCES `suppliers` (`supplierid`); ALTER TABLE stockcheckfreeze ADD CONSTRAINT `stockcheckfreeze_ibfk_1` FOREIGN KEY (`stockid`) REFERENCES `stockmaster` (`stockid`); ALTER TABLE stockcheckfreeze ADD CONSTRAINT `stockcheckfreeze_ibfk_2` FOREIGN KEY (`loccode`) REFERENCES `locations` (`loccode`); ALTER TABLE stockcounts ADD CONSTRAINT `stockcounts_ibfk_1` FOREIGN KEY (`stockid`) REFERENCES `stockmaster` (`stockid`); ALTER TABLE stockcounts ADD CONSTRAINT `stockcounts_ibfk_2` FOREIGN KEY (`loccode`) REFERENCES `locations` (`loccode`); ALTER TABLE stockmaster ADD CONSTRAINT `stockmaster_ibfk_1` FOREIGN KEY (`categoryid`) REFERENCES `stockcategory` (`categoryid`); ALTER TABLE stockmaster ADD CONSTRAINT `stockmaster_ibfk_2` FOREIGN KEY (`taxcatid`) REFERENCES `taxcategories` (`taxcatid`); ALTER TABLE stockmoves ADD CONSTRAINT `stockmoves_ibfk_1` FOREIGN KEY (`stockid`) REFERENCES `stockmaster` (`stockid`); ALTER TABLE stockmoves ADD CONSTRAINT `stockmoves_ibfk_2` FOREIGN KEY (`type`) REFERENCES `systypes` (`typeid`); ALTER TABLE stockmoves ADD CONSTRAINT `stockmoves_ibfk_3` FOREIGN KEY (`loccode`) REFERENCES `locations` (`loccode`); ALTER TABLE stockmoves ADD CONSTRAINT `stockmoves_ibfk_4` FOREIGN KEY (`prd`) REFERENCES `periods` (`periodno`); ALTER TABLE stockmovestaxes ADD CONSTRAINT `stockmovestaxes_ibfk_1` FOREIGN KEY (`taxauthid`) REFERENCES `taxauthorities` (`taxid`); ALTER TABLE stockserialitems ADD CONSTRAINT `stockserialitems_ibfk_1` FOREIGN KEY (`stockid`) REFERENCES `stockmaster` (`stockid`); ALTER TABLE stockserialitems ADD CONSTRAINT `stockserialitems_ibfk_2` FOREIGN KEY (`loccode`) REFERENCES `locations` (`loccode`); ALTER TABLE stockserialmoves ADD CONSTRAINT `stockserialmoves_ibfk_1` FOREIGN KEY (`stockmoveno`) REFERENCES `stockmoves` (`stkmoveno`); ALTER TABLE stockserialmoves ADD CONSTRAINT `stockserialmoves_ibfk_2` FOREIGN KEY (`stockid`, `serialno`) REFERENCES `stockserialitems` (`stockid`, `serialno`); ALTER TABLE suppallocs ADD CONSTRAINT `suppallocs_ibfk_1` FOREIGN KEY (`transid_allocfrom`) REFERENCES `supptrans` (`id`); ALTER TABLE suppallocs ADD CONSTRAINT `suppallocs_ibfk_2` FOREIGN KEY (`transid_allocto`) REFERENCES `supptrans` (`id`); ALTER TABLE suppliercontacts ADD CONSTRAINT `suppliercontacts_ibfk_1` FOREIGN KEY (`supplierid`) REFERENCES `suppliers` (`supplierid`); ALTER TABLE suppliers ADD CONSTRAINT `suppliers_ibfk_1` FOREIGN KEY (`currcode`) REFERENCES `currencies` (`currabrev`); ALTER TABLE suppliers ADD CONSTRAINT `suppliers_ibfk_2` FOREIGN KEY (`paymentterms`) REFERENCES `paymentterms` (`termsindicator`); ALTER TABLE suppliers ADD CONSTRAINT `suppliers_ibfk_3` FOREIGN KEY (`taxgroupid`) REFERENCES `taxgroups` (`taxgroupid`); ALTER TABLE suppliers ADD CONSTRAINT `suppliers_ibfk_4` FOREIGN KEY (`factorcompanyid`) REFERENCES `factorcompanies` (`id`); ALTER TABLE supptrans ADD CONSTRAINT `supptrans_ibfk_1` FOREIGN KEY (`type`) REFERENCES `systypes` (`typeid`); ALTER TABLE supptrans ADD CONSTRAINT `supptrans_ibfk_2` FOREIGN KEY (`supplierno`) REFERENCES `suppliers` (`supplierid`); ALTER TABLE supptranstaxes ADD CONSTRAINT `supptranstaxes_ibfk_1` FOREIGN KEY (`taxauthid`) REFERENCES `taxauthorities` (`taxid`); ALTER TABLE supptranstaxes ADD CONSTRAINT `supptranstaxes_ibfk_2` FOREIGN KEY (`supptransid`) REFERENCES `supptrans` (`id`); ALTER TABLE taxauthorities ADD CONSTRAINT `taxauthorities_ibfk_1` FOREIGN KEY (`taxglcode`) REFERENCES `chartmaster` (`accountcode`); ALTER TABLE taxauthorities ADD CONSTRAINT `taxauthorities_ibfk_2` FOREIGN KEY (`purchtaxglaccount`) REFERENCES `chartmaster` (`accountcode`); ALTER TABLE taxauthrates ADD CONSTRAINT `taxauthrates_ibfk_1` FOREIGN KEY (`taxauthority`) REFERENCES `taxauthorities` (`taxid`); ALTER TABLE taxauthrates ADD CONSTRAINT `taxauthrates_ibfk_2` FOREIGN KEY (`taxcatid`) REFERENCES `taxcategories` (`taxcatid`); ALTER TABLE taxauthrates ADD CONSTRAINT `taxauthrates_ibfk_3` FOREIGN KEY (`dispatchtaxprovince`) REFERENCES `taxprovinces` (`taxprovinceid`); ALTER TABLE taxgrouptaxes ADD CONSTRAINT `taxgrouptaxes_ibfk_1` FOREIGN KEY (`taxgroupid`) REFERENCES `taxgroups` (`taxgroupid`); ALTER TABLE taxgrouptaxes ADD CONSTRAINT `taxgrouptaxes_ibfk_2` FOREIGN KEY (`taxauthid`) REFERENCES `taxauthorities` (`taxid`); ALTER TABLE woitems ADD CONSTRAINT `woitems_ibfk_1` FOREIGN KEY (`stockid`) REFERENCES `stockmaster` (`stockid`); ALTER TABLE woitems ADD CONSTRAINT `woitems_ibfk_2` FOREIGN KEY (`wo`) REFERENCES `workorders` (`wo`); ALTER TABLE worequirements ADD CONSTRAINT `worequirements_ibfk_1` FOREIGN KEY (`wo`) REFERENCES `workorders` (`wo`); ALTER TABLE worequirements ADD CONSTRAINT `worequirements_ibfk_2` FOREIGN KEY (`stockid`) REFERENCES `stockmaster` (`stockid`); ALTER TABLE worequirements ADD CONSTRAINT `worequirements_ibfk_3` FOREIGN KEY (`wo`, `parentstockid`) REFERENCES `woitems` (`wo`, `stockid`); ALTER TABLE workcentres ADD CONSTRAINT `workcentres_ibfk_1` FOREIGN KEY (`location`) REFERENCES `locations` (`loccode`); ALTER TABLE workorders ADD CONSTRAINT `worksorders_ibfk_1` FOREIGN KEY (`loccode`) REFERENCES `locations` (`loccode`); ALTER TABLE www_users ADD CONSTRAINT `www_users_ibfk_1` FOREIGN KEY (`defaultlocation`) REFERENCES `locations` (`loccode`); SET FOREIGN_KEY_CHECKS=1;
CREATE DATABASE IF NOT EXISTS laravel_instagram; USE laravel_instagram; CREATE TABLE IF NOT EXISTS users( id int(255) auto_increment not null, role varchar(20), name varchar(100), surname varchar(200), nick varchar(100), email varchar(255), password varchar(255), image varchar(255), created_at datetime, updated_at datetime, remember_token varchar(255), CONSTRAINT pk_users PRIMARY KEY(id) )ENGINE=InnoDb; INSERT INTO users VALUES(NULL, 'user', 'Martin', 'Zayas', 'mzayas', '<EMAIL>', 'admin', NULL, CURTIME(), CURTIME(), NULL); INSERT INTO users VALUES(NULL, 'user', 'Alejandra', 'Parra', 'aleparra', '<EMAIL>', 'admin', NULL, CURTIME(), CURTIME(), NULL); INSERT INTO users VALUES(NULL, 'user', 'Manuel', 'Zayas', 'manuzayas', '<EMAIL>', 'admin', NULL, CURTIME(), CURTIME(), NULL); CREATE TABLE IF NOT EXISTS images( id int(255) auto_increment not null, user_id int(255), image_path varchar(255), description text, created_at datetime, updated_at datetime, CONSTRAINT pk_images PRIMARY KEY(id), CONSTRAINT fk_images_users FOREIGN KEY(user_id) REFERENCES users(id) )ENGINE=InnoDb; INSERT INTO images VALUES(NULL, 1, 'test.jpg', 'Descripción de prueba', CURTIME(), CURTIME()); INSERT INTO images VALUES(NULL, 1, 'test2.jpg', 'Descripción de prueba2', CURTIME(), CURTIME()); INSERT INTO images VALUES(NULL, 1, 'test3.jpg', 'Descripción de prueba3', CURTIME(), CURTIME()); INSERT INTO images VALUES(NULL, 1, 'test4.jpg', 'Descripción de prueba4', CURTIME(), CURTIME()); INSERT INTO images VALUES(NULL, 3, 'prueba.jpg', 'Descripción de prueba de prueba', CURTIME(), CURTIME()); CREATE TABLE IF NOT EXISTS comments( id int(255) auto_increment not null, user_id int(255), image_id int(255), content text, created_at datetime, updated_at datetime, CONSTRAINT pk_comments PRIMARY KEY(id), CONSTRAINT fk_comments_users FOREIGN KEY(user_id) REFERENCES users(id), CONSTRAINT fk_comments_images FOREIGN KEY(image_id) REFERENCES images(id) )ENGINE=InnoDb; INSERT INTO comments VALUES(NULL, 1, 4, 'Buena foto de familia', CURTIME(), CURTIME()); INSERT INTO comments VALUES(NULL, 2, 1, 'Buena foto de familia2', CURTIME(), CURTIME()); INSERT INTO comments VALUES(NULL, 2, 4, 'que bueno', CURTIME(), CURTIME()); INSERT INTO comments VALUES(NULL, 1, 4, 'Buena foto de familia3', CURTIME(), CURTIME()); CREATE TABLE IF NOT EXISTS likes( id int(255) auto_increment not null, user_id int(255), image_id int(255), created_at datetime, updated_at datetime, CONSTRAINT pk_likes PRIMARY KEY(id), CONSTRAINT fk_likes_users FOREIGN KEY(user_id) REFERENCES users(id), CONSTRAINT fk_likes_images FOREIGN KEY(image_id) REFERENCES images(id) )ENGINE=InnoDb; INSERT INTO likes VALUES(NULL, 1, 1, CURTIME(), CURTIME()); INSERT INTO likes VALUES(NULL, 1, 2, CURTIME(), CURTIME()); INSERT INTO likes VALUES(NULL, 2, 1, CURTIME(), CURTIME()); INSERT INTO likes VALUES(NULL, 3, 1, CURTIME(), CURTIME()); INSERT INTO likes VALUES(NULL, 3, 4, CURTIME(), CURTIME());
select distinct shop_name || store_name as store_name, datetime_format(receipt.date, '%Y-%m-%d') as date, total_due from stdin as receipt, ( select date, sum(price) as total_due from ( select date, counts * ceil((price + ceil(price * tax_rate)) * percentage_paid) as price from stdin ) group by date ) as tmp where receipt.date = tmp.date;
<reponame>ringmail/ringmail-backend SET FOREIGN_KEY_CHECKS = 0; ALTER TABLE `account_transaction` ADD CONSTRAINT `account_transaction-entity` FOREIGN KEY (`entity`) REFERENCES `payment` (`id`); ALTER TABLE `account_transaction` ADD CONSTRAINT `account_transaction-user_id` FOREIGN KEY (`user_id`) REFERENCES `ring_user` (`id`); ALTER TABLE `ring_cart` DROP INDEX `ring_cart-coupon`; ALTER TABLE `ring_conversation` DROP INDEX `from_identity_id_1`; ALTER TABLE `ring_conversation` DROP COLUMN `from_identity_id`; ALTER TABLE `ring_conversation` DROP COLUMN `to_identity_id`; ALTER TABLE `ring_conversation` ADD COLUMN `from_user_id` bigint(20) unsigned NOT NULL; ALTER TABLE `ring_conversation` ADD COLUMN `to_user_id` bigint(20) unsigned NOT NULL; ALTER TABLE `ring_conversation` ADD UNIQUE `from_user_id_1` (`from_user_id`, `to_user_id`); ALTER TABLE `ring_hashtag` ADD CONSTRAINT `ring_hashtag-ringpage_id` FOREIGN KEY (`ringpage_id`) REFERENCES `ring_page` (`id`); ALTER TABLE `ring_hashtag_directory` DROP INDEX user_id_3; ALTER TABLE `ring_phone` ADD CONSTRAINT `ring_phone-user_id` FOREIGN KEY (`user_id`) REFERENCES `ring_user` (`id`); ALTER TABLE `ring_target` DROP INDEX `hashtag_id_1`; ALTER TABLE `ring_target` DROP COLUMN `hashtag_id`; ALTER TABLE `ring_target` ADD CONSTRAINT `ring_target-user_id` FOREIGN KEY (`user_id`) REFERENCES `ring_user` (`id`); ALTER TABLE `ring_target` ADD CONSTRAINT `ring_target-email_id` FOREIGN KEY (`email_id`) REFERENCES `ring_email` (`id`); ALTER TABLE `ring_user_email` ADD CONSTRAINT `ring_user_email-email_id` FOREIGN KEY (`email_id`) REFERENCES `ring_email` (`id`); ALTER TABLE `ring_user_email` ADD CONSTRAINT `ring_user_email-user_id` FOREIGN KEY (`user_id`) REFERENCES `ring_user` (`id`); ALTER TABLE `ring_verify_email` ADD CONSTRAINT `ring_verify_email-email_id` FOREIGN KEY (`email_id`) REFERENCES `ring_email` (`id`); ALTER TABLE `ring_verify_email` ADD CONSTRAINT `ring_verify_email-user_id` FOREIGN KEY (`user_id`) REFERENCES `ring_user` (`id`); SET FOREIGN_KEY_CHECKS = 1; INSERT INTO sys_version SET id=27;
-- phpMyAdmin SQL Dump -- version 4.4.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jul 31, 2017 at 08:09 AM -- Server version: 5.6.26 -- PHP Version: 5.6.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 utf8mb4 */; -- -- Database: `project2` -- -- -------------------------------------------------------- -- -- Table structure for table `branches` -- CREATE TABLE IF NOT EXISTS `branches` ( `id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `company` varchar(255) NOT NULL, `address` text NOT NULL, `contact_person` varchar(255) NOT NULL, `contact_no` varchar(255) NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1; -- -- Dumping data for table `branches` -- INSERT INTO `branches` (`id`, `name`, `company`, `address`, `contact_person`, `contact_no`) VALUES (1, 'Alabang', 'New horizon finance Corp ', 'Alabang ', 'Tina Polido', '850-0748'), (2, 'Alaminos', 'New Horizon Finance Corp.', 'Alaminos, Pangasinan', '<NAME>', '(075)654-1085'), (3, 'Baguio', 'New horizon finance Corp', 'Baguio City, Philippines', '<NAME>', '(074)-443-9653'), (4, 'Balagtas', 'New horizon finance Corp', 'Balagtas', '<NAME>', '769-1349'), (5, 'Bangued', 'New horizon finance Corp', 'Bangued', 'Juliet Daria', '(074)-752-7578'); -- -------------------------------------------------------- -- -- Table structure for table `tbl_users` -- CREATE TABLE IF NOT EXISTS `tbl_users` ( `id` int(11) NOT NULL, `fname` varchar(255) NOT NULL, `lname` varchar(255) NOT NULL, `email` varchar(255) NOT NULL, `username` varchar(255) NOT NULL, `password` varchar(255) NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1; -- -- Dumping data for table `tbl_users` -- INSERT INTO `tbl_users` (`id`, `fname`, `lname`, `email`, `username`, `password`) VALUES (1, 'christian', '<PASSWORD>', '<EMAIL>', '<PASSWORD>', '<PASSWORD>'), (2, 'chanchan', 'aaasasas', '<EMAIL>', '<PASSWORD>', '<PASSWORD>'); -- -- Indexes for dumped tables -- -- -- Indexes for table `branches` -- ALTER TABLE `branches` ADD PRIMARY KEY (`id`); -- -- Indexes for table `tbl_users` -- ALTER TABLE `tbl_users` ADD PRIMARY KEY (`id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `branches` -- ALTER TABLE `branches` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=6; -- -- AUTO_INCREMENT for table `tbl_users` -- ALTER TABLE `tbl_users` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3; /*!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 */;
DROP TABLE IF EXISTS products; CREATE TABLE products ( id int(11) NOT NULL auto_increment, name varchar(255) default NULL, description text, image varchar(255) default NULL, PRIMARY KEY (id) ); INSERT INTO products VALUES (1, 'Imperial Bonsai', 'The largest and most majestic of all Bonsai trees', 'https://bonsaibark.com/wp-content/uploads/enri.jpg'); INSERT INTO products VALUES (2, 'Hachi-uye', 'Hachi-uye are large bonsai, up to 5 feet', 'https://australianbonsai.gallery/images/news/kuro-matsu-australian-bonsai-gallery-12.jpg'); INSERT INTO products VALUES (3, 'Chumono', 'The most appreciated because their proportions are well balanced', 'https://crataegus.files.wordpress.com/2011/02/mattsblackpine.jpg'); INSERT INTO products VALUES (4, 'Keshitsubo', 'Keshitsubo means poppy-seed, and are the smallest bonsai trees', 'https://i.pinimg.com/originals/2b/39/81/2b39815b0410b3d43c8ca603e86c6b0d.jpg'); DROP TABLE IF EXISTS users; CREATE TABLE users ( id int(11) NOT NULL auto_increment, username varchar(255) default NULL, password varchar(255) default NULL, PRIMARY KEY (id) ); INSERT INTO users VALUES (1, 'admin', '<PASSWORD>');
<filename>8.USING_NULL.sql -- List the teachers who have NULL for their department. -- You might think that the phrase dept=NULL would work here but it doesn't - you can use the phrase dept IS NULL SELECT name FROM teacher WHERE dept IS NULL -- Note the INNER JOIN misses the teachers with no department and the departments with no teacher. SELECT teacher.name, dept.name FROM teacher INNER JOIN dept ON (teacher.dept=dept.id) -- Use a different JOIN so that all teachers are listed. SELECT teacher.name, dept.name FROM teacher LEFT JOIN dept ON (teacher.dept=dept.id) -- Use a different JOIN so that all departments are listed. SELECT teacher.name, dept.name FROM teacher RIGHT JOIN dept ON (teacher.dept=dept.id) -- Use COALESCE to print the mobile number. Use the number '07986 444 2266' if there is no number given. Show teacher name and mobile number or '07986 444 2266' SELECT name, coalesce(mobile, '07986 444 2266') FROM teacher -- Use the COALESCE function and a LEFT JOIN to print the teacher name and department name. Use the string 'None' where there is no department. SELECT teacher.name, COALESCE(dept.name, 'None') FROM teacher LEFT JOIN dept ON (teacher.dept = dept.id) -- Use COUNT to show the number of teachers and the number of mobile phones. SELECT COUNT(id) AS NumberOfTeachers, COUNT(mobile) AS NumberOfMobiles FROM teacher -- Use COUNT and GROUP BY dept.name to show each department and the number of staff. Use a RIGHT JOIN to ensure that the Engineering department is listed. SELECT dept.name, COUNT(teacher.name) FROM teacher RIGHT JOIN dept ON (teacher.dept = dept.id) GROUP BY dept.name -- Use CASE to show the name of each teacher followed by 'Sci' if the teacher is in dept 1 or 2 and 'Art' otherwise. SELECT name, CASE WHEN dept = 1 THEN 'Sci' WHEN dept = 2 THEN 'Sci' ELSE 'Art' END FROM teacher -- Use CASE to show the name of each teacher followed by 'Sci' if the teacher is in dept 1 or 2, show 'Art' if the teacher's dept is 3 and 'None' otherwise. SELECT name, CASE WHEN dept = 1 THEN 'Sci' WHEN dept = 2 THEN 'Sci' WHEN dept = 3 THEN 'Art' ELSE 'None' END FROM teacher
-- 2019-09-30 13:42:36 : change capability pk to id and slack channel id ALTER TABLE public."Capability" DROP CONSTRAINT team_pk; ALTER TABLE public."Capability" ADD CONSTRAINT capability_pk PRIMARY KEY ("Id", "SlackChannelId");
IF EXISTS (select * from dbo.sysobjects where id = object_id(N'ufnGetEntityEmailListForNotifyByEntityIdent') and xtype in (N'FN', N'IF', N'TF')) DROP FUNCTION ufnGetEntityEmailListForNotifyByEntityIdent GO /* ufnGetEntityEmailListUnformattedByEntityIdent * * Returns a string of the active email addresses that are marked as notify concatinated together separated by commas w/o HTML * */ CREATE FUNCTION ufnGetEntityEmailListForNotifyByEntityIdent(@bntEntityIdent BIGINT, @nvrUsername NVARCHAR(75)) RETURNS NVARCHAR(MAX) AS BEGIN DECLARE @nvrEmailList NVARCHAR(MAX) SELECT @nvrEmailList = COALESCE(@nvrEmailList + ', ','') + EE.Email FROM EntityEmail EE WITH (NOLOCK) WHERE EntityIdent = @bntEntityIdent AND (Notify = 1 OR @nvrUsername = '') -- if they are not registered (username = ''), then return all emails because well send them the register email AND Active = 1 SELECT @nvrEmailList = COALESCE(@nvrEmailList, '') RETURN RTRIM(LTRIM(@nvrEmailList)) END GO -- SELECT dbo.ufnGetEntityEmailListUnformattedByEntityIdent(306512)
DROP TABLE IF EXISTS conreality.camera CASCADE; CREATE TABLE conreality.camera ( -- The camera's unique identifier. uuid uuid NOT NULL PRIMARY KEY REFERENCES conreality.object ON DELETE CASCADE, -- The camera's resolution (in 2D pixels). resolution point NULL, -- The camera's image format. format varchar(15) NULL, -- The camera's frame rate (per second). fps int2 NULL CHECK (fps > 0), -- The camera's f-number (the f/N focal ratio). fnumber int2 NULL CHECK (fnumber > 0) );
<reponame>Haikson/geekbdb<filename>topic10/examples.sql -- Базы данных. Урок 10. Вебинар. Транзакции, переменные, представления -- ДЗ к уроку 8 -- 1. Добавить необходимые внешние ключи для всех таблиц базы данных vk -- (приложить команды). -- 2.По созданным связям создать ER диаграмму, используя Dbeaver (приложить графический файл к ДЗ). -- 3.Переписать запросы, заданые к ДЗ урока 6 с использованием JOIN -- (четыре запроса). -- Пусть задан некоторый пользователь. -- Из всех друзей этого пользователя найдите человека, который больше всех -- общался с нашим пользоваетелем. SELECT (SELECT CONCAT(first_name, ' ', last_name) FROM users WHERE id = messages.from_user_id) AS friend_name, COUNT(DISTINCT messages.id) AS total_messages FROM users JOIN profiles ON users.id = profiles.user_id JOIN friendship friendship1 ON profiles.user_id = friendship1.user_id JOIN friendship friendship2 ON profiles.user_id = friendship2.friend_id JOIN messages ON messages.to_user_id = users.id AND (messages.from_user_id = friendship1.friend_id OR messages.from_user_id = friendship2.user_id) WHERE users.id = 52 GROUP BY messages.from_user_id ORDER BY total_messages DESC LIMIT 1; -- Подсчитать общее количество лайков, которые получили 10 самых молодых пользователей. SELECT SUM(got_likes) AS total_likes_for_yangest FROM ( SELECT COUNT(DISTINCT likes.user_id) AS got_likes FROM profiles LEFT JOIN likes ON likes.target_id = profiles.user_id AND target_type_id = 3 GROUP BY profiles.user_id ORDER BY profiles.birthday DESC LIMIT 20 ) AS yangest; -- Определить кто больше поставил лайков (всего) - мужчины или женщины? SELECT profiles.sex AS SEX, COUNT(likes.id) AS total_likes FROM likes JOIN profiles ON likes.user_id = profiles.user_id GROUP BY profiles.sex ORDER BY total_likes DESC LIMIT 1; -- Найти 10 пользователей, которые проявляют наименьшую активность в -- использовании социальной сети. SELECT users.id, COUNT(DISTINCT messages.to_user_id) + COUNT(DISTINCT likes.target_id) + COUNT(DISTINCT media.id) AS activity FROM users LEFT JOIN messages ON users.id = messages.from_user_id LEFT JOIN likes ON users.id = likes.user_id LEFT JOIN media ON users.id = media.user_id GROUP BY users.id ORDER BY activity DESC LIMIT 10; -- 4.(необязательно) Скорректировать запросы из урока (перечислены ниже) -- в части правильного подсчёта. "Количество друзей у пользователя с сортировкой" -- и "Количество друзей у пользователя (статус - активный) с сортировкой" SELECT id, first_name, last_name, COUNT(DISTINCT friendship1.friend_id) + COUNT(DISTINCT friendship2.user_id) AS total_friends FROM users LEFT JOIN friendship friendship1 ON users.id = friendship1.user_id AND friendship1.status_id = 1 LEFT JOIN friendship friendship2 ON users.id = friendship2.friend_id AND friendship2.status_id = 1 GROUP BY users.id ORDER BY total_friends DESC LIMIT 10; SELECT id, first_name, last_name, COUNT(DISTINCT user_id) AS total_friends FROM users LEFT JOIN friendship ON friendship.status_id = 1 AND (users.id = friendship.user_id OR users.id = friendship.friend_id) GROUP BY users.id ORDER BY total_friends DESC LIMIT 10; -- ДЗ к уроку 10 -- <NAME> -- Практическое задание по теме “Транзакции, переменные, представления” -- 1.В базе данных shop и sample присутствуют одни и те же таблицы, учебной базы данных. -- Переместите запись id = 1 из таблицы shop.users в таблицу sample.users. -- Используйте транзакции. SET @id_move_user=1; START TRANSACTION; INSERT INTO sample.users (SELECT * FROM shop.users WHERE id=@id_move_user); DELETE FROM shop.users WHERE id=@id_move_user; COMMIT; SELECT * FROM sample.users; SELECT * FROM shop.users; -- 2.Создайте представление, которое выводит название name товарной -- позиции из таблицы products и соответствующее название каталога name -- из таблицы catalogs. USE shop; DROP VIEW IF EXISTS view_products; CREATE VIEW view_products (name, catalog_name) AS (SELECT products.name, catalogs.name FROM products JOIN catalogs ON products.catalog_id=catalogs.id); SELECT * FROM view_products; -- 3.Пусть имеется таблица с календарным полем created_at. -- В ней размещены разряженые календарные записи за август 2018 года '2018-08-01', '2018-08-04', -- '2018-08-16' и 2018-08-17. Составьте запрос, который выводит полный список дат за август, -- выставляя в соседнем поле значение 1, если дата присутствует в исходном таблице и 0, если она отсутствует. USE example; DROP TABLE IF EXISTS tests; CREATE TABLE IF NOT EXISTS tests (id SERIAL, created_at DATE); INSERT INTO tests (created_at) VALUES ('2018-08-01'),('2018-08-04'),('2018-08-16'), ('2018-08-17'); SELECT tab.date_m, NOT isnull(created_at) AS created_at FROM ( SELECT adddate('2018-08-01',t1.i+t2.i) AS date_m FROM ( (SELECT 0 i UNION SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4 UNION SELECT 5 UNION SELECT 6 UNION SELECT 7 UNION SELECT 8 UNION SELECT 9) t1, (SELECT 0 i UNION SELECT 10 UNION SELECT 20 UNION SELECT 30) t2) WHERE adddate('2018-08-01',t1.i+t2.i) BETWEEN '2018-08-01' and '2018-08-31' ) tab LEFT JOIN tests ON tab.date_m=tests.created_at ORDER BY tab.date_m; ; -- 4.Пусть имеется любая таблица с календарным полем created_at. -- Создайте запрос, который удаляет устаревшие записи из таблицы, оставляя только 5 самых свежих записей. USE example; DROP TABLE IF EXISTS tests; CREATE TABLE IF NOT EXISTS tests (id SERIAL, created_at DATE); INSERT INTO tests (created_at) VALUES ('2018-08-01'),('2018-08-04'),('2018-08-16'), ('2018-09-17'), ('2018-09-01'),('2018-12-04'),('2018-11-16'), ('2018-07-17'), ('2018-11-11'),('2018-12-01'),('2018-08-14'), ('2018-09-15'); CREATE TEMPORARY TABLE temp (id INT, created_at DATE); INSERT INTO temp (SELECT * FROM tests ORDER BY created_at DESC LIMIT 5); DELETE FROM tests WHERE created_at NOT IN (SELECT temp.created_at FROM temp); SELECT * FROM tests ORDER BY created_at; DROP TEMPORARY TABLE IF EXISTS temp; -- Практическое задание по теме “Администрирование MySQL” -- (эта тема изучается по вашему желанию) --1.Создайте двух пользователей которые имеют доступ к базе данных shop. -- Первому пользователю shop_read должны быть доступны только запросы на чтение данных, -- второму пользователю shop — любые операции в пределах базы данных shop. DROP USER IF EXISTS 'shop'@'localhost'; DROP USER IF EXISTS 'shop_read'@'localhost'; CREATE USER IF NOT EXISTS 'shop'@'localhost' IDENTIFIED WITH sha256_password BY '<PASSWORD>'; GRANT ALL ON shop.* TO 'shop'@'localhost'; CREATE USER 'shop_read'@'localhost' IDENTIFIED WITH sha256_password BY '<PASSWORD>'; GRANT SELECT ON shop.* TO 'shop_read'@'localhost'; -- Практическое задание по теме “Хранимые процедуры и функции, триггеры" -- 1.Создайте хранимую функцию hello(), которая будет возвращать приветствие, -- в зависимости от текущего времени суток. С 6:00 до 12:00 функция должна -- возвращать фразу "Доброе утро", с 12:00 до 18:00 функция должна возвращать -- фразу "Добрый день", с 18:00 до 00:00 — "Добрый вечер", с 00:00 до 6:00 — -- "Доброй ночи". CREATE DEFINER=`root`@`localhost` FUNCTION `hello`() RETURNS text CHARSET utf8mb4 DETERMINISTIC BEGIN DECLARE return_text text; if hour(now())>=6 AND hour(now())<=12 then set return_text='Доброе утро'; elseif hour(now())>12 AND hour(now())<=18 then set return_text='Доброе день'; elseif hour(now())>18 AND hour(now())<=23 then set return_text='Добрый вечер'; else set return_text='Доброй ночи'; end if; RETURN return_text; END -- 2.В таблице products есть два текстовых поля: name с названием товара и description с его описанием. -- Допустимо присутствие обоих полей или одно из них. Ситуация, когда оба поля принимают неопределенное значение NULL неприемлема. -- Используя триггеры, добейтесь того, чтобы одно из этих полей или оба поля были заполнены. -- При попытке присвоить полям NULL-значение необходимо отменить операцию. CREATE TRIGGER check_catalog_id_insert BEFORE INSERT ON products FOR EACH ROW BEGIN IF isnull(NEW.name) and isnull(NEW.desription) THEN SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'UPDATE canceled'; END IF; END USE shop; UPDATE products SET desription = NULL WHERE id = 5; select * from products; -- 3.Напишите хранимую функцию для вычисления произвольного числа Фибоначчи. -- Числами Фибоначчи называется последовательность в которой число равно сумме двух предыдущих чисел. --# Вызов функции FIBONACCI(10) должен возвращать число 55. CREATE DEFINER=`root`@`localhost` FUNCTION `FIBONACCI`(num INT) RETURNS INTEGER DETERMINISTIC BEGIN DECLARE i INT; DECLARE new_number INT; DECLARE old_number1 INT; DECLARE old_number2 INT; DECLARE result INT; SET i=2; SET old_number1=1; SET old_number2=0; IF num=0 THEN RETURN 0; ELSEIF num=1 THEN RETURN 1; END IF; cycle: LOOP SET new_number=(old_number1)+(old_number2); IF i>=num THEN LEAVE cycle; END IF; SET old_number2=old_number1; SET old_number1=new_number; SET i=i+1; END LOOP; RETURN new_number; END -- Хранимые процедуры и функции -- 1. Создаём функцию -- Направленность дружбы -- Кол-во приглашений в друзья к пользователю -- / -- Кол-во приглашений в друзья от пользователя -- Чем больше - популярность выше -- Если значение меньше единицы - пользователь инициатор связей. USE vk; DROP FUNCTION IF EXISTS friendship_direction; DELIMITER // CREATE FUNCTION friendship_direction(check_user_id INT) RETURNS FLOAT READS SQL DATA BEGIN DECLARE requests_to_user INT; DECLARE requests_from_user INT; SET requests_to_user = (SELECT COUNT(*) FROM friendship WHERE friend_id = check_user_id); SET requests_from_user = (SELECT COUNT(*) FROM friendship WHERE user_id = check_user_id); RETURN requests_to_user / requests_from_user; END// DELIMITER ; SELECT TRUNCATE(friendship_direction(7), 2) AS friendship_direction; -- 2. Создаём процедуру -- Рассылка приглашений вида "Возможно, вам будет интересно пообщаться с ..." -- Варианты: -- из одного города -- состоят в одной группе -- друзья друзей -- Из выборки показывать 5 человек в случайной комбинации. DROP PROCEDURE IF EXISTS friendship_offers; DELIMITER // CREATE PROCEDURE friendship_offers (IN for_user_id INT) BEGIN ( SELECT pr2.user_id FROM profiles pr1 JOIN profiles pr2 ON pr1.hometown = pr2.hometown WHERE pr1.user_id = for_user_id UNION SELECT cu2.user_id FROM communities_users cu1 JOIN communities_users cu2 ON cu1.community_id = cu2.community_id WHERE cu1.user_id = for_user_id UNION SELECT DISTINCT(fr3.user_id) FROM friendship fr1 JOIN friendship fr2 ON fr1.friend_id = fr2.user_id JOIN friendship fr3 ON fr2.friend_id = fr3.user_id WHERE fr1.user_id = for_user_id AND fr2.status IS TRUE AND fr3.status IS TRUE ) ORDER BY RAND() LIMIT 5; END// DELIMITER ; CALL friendship_offers(1); -- Просмотр функций и процедур SHOW FUNCTION STATUS LIKE 'friendship_direction'\G SHOW CREATE FUNCTION friendship_direction; SHOW PROCEDURE STATUS LIKE 'friendship_offers'\G SHOW CREATE PROCEDURE friendship_offers; -- Индексы SELECT id, firstname, lastname FROM users WHERE email = '<EMAIL>'; SELECT id, firstname, lastname FROM users WHERE email = '<EMAIL>'; CREATE INDEX users_email_idx ON users(email); -- После этой операции MySQL начнет использовать индекс age для выполнения -- подобных запросов. -- Сортировка SELECT * FROM profiles ORDER BY birthday; -- действует такое же правило — создаем индекс на колонку, по которой происходит -- сортировка: CREATE INDEX profiles_birthday_idx ON profiles(birthday); -- Внутренности хранения индексов -- Представим, что наша таблица выглядит так: SELECT id, firstname, lastname, email FROM users; -- После создания индекса на колонку email, MySQL сохранит все ее значения в -- отсортированном виде: users_email_idx +-----------------------------+ | <EMAIL> | | <EMAIL> | | <EMAIL> | | <EMAIL> | | <EMAIL> | | <EMAIL> | | <EMAIL>ty.<EMAIL> | | <EMAIL> | | <EMAIL> | | <EMAIL> | +-----------------------------+ -- MySQL поддерживает также уникальные индексы. Это удобно для колонок, -- значения в которых должны быть уникальными по всей таблице. -- Такие индексы улучшают эффективность выборки для уникальных значений. SELECT * FROM users WHERE email = '<EMAIL>'; -- На колонку email необходимо создать уникальный индекс: CREATE UNIQUE INDEX users_email_uq ON users(email); DROP INDEX users_email_uq ON users; -- Составные индексы -- MySQL может использовать только один индекс для запроса (кроме случаев, -- когда MySQL способен объединить результаты выборок по нескольким индексам). -- Рассмотрим такой запрос: SELECT * FROM media WHERE user_id = 9 AND media_type_id = 3; -- Нам следует создать составной индекс на обе колонки: CREATE INDEX media_user_id_media_type_id_idx ON media(user_id, media_type_id); -- Устройство составного индекса -- media_user_id_media_type_id_idx 13 24 33 ... -- Сортировка -- Составные индексы также можно использовать, если выполняется сортировка: SELECT * FROM profiles WHERE sex = 'm' ORDER BY birthday; -- В этом случае нам нужно будет создать индекс в порядке -- WHERE ORDER BY -- Оконные функции -- Задача -- Найти сколько занимают места медиафайлы в разрезе типов в процентном соотношении -- Решаем традиционным способом, применяя агрегатные функции SELECT media_types.name, SUM(media.size) AS total_by_type, (SELECT SUM(size) FROM media) AS total_size, SUM(media.size)/(SELECT SUM(size) FROM media) * 100 AS "%%" FROM media JOIN media_types ON media.media_type_id = media_types.id GROUP BY media.media_type_id; -- Реализация используя агрегатные функции как оконные SELECT DISTINCT media_types.name, SUM(media.size) OVER(PARTITION BY media.media_type_id) AS total_by_type, SUM(media.size) OVER() AS total, SUM(media.size) OVER(PARTITION BY media.media_type_id) / SUM(media.size) OVER() * 100 AS "%%" FROM media JOIN media_types ON media.media_type_id = media_types.id; -- Расширяем вывод SELECT DISTINCT media_types.name, AVG(media.size) OVER(PARTITION BY media.media_type_id) AS average, MIN(media.size) OVER(PARTITION BY media.media_type_id) AS min, MAX(media.size) OVER(PARTITION BY media.media_type_id) AS max, SUM(media.size) OVER(PARTITION BY media.media_type_id) AS total_by_type, SUM(media.size) OVER() AS total, SUM(media.size) OVER(PARTITION BY media.media_type_id) / SUM(media.size) OVER() * 100 AS "%%" FROM media JOIN media_types ON media.media_type_id = media_types.id; -- Выносим окно отдельно SELECT DISTINCT media_types.name, AVG(media.size) OVER w AS average, MIN(media.size) OVER w AS min, MAX(media.size) OVER w AS max, SUM(media.size) OVER w AS total_by_type, SUM(media.size) OVER() AS total, SUM(media.size) OVER w / SUM(media.size) OVER() * 100 AS "%%" FROM (media JOIN media_types ON media.media_type_id = media_types.id) WINDOW w AS (PARTITION BY media.media_type_id); -- Оконные функции не сворачивают вывод -- Убираем DISTINCT SELECT media_types.name, AVG(media.size) OVER w AS average, MIN(media.size) OVER w AS min, MAX(media.size) OVER w AS max, SUM(media.size) OVER w AS total_by_type, SUM(media.size) OVER() AS total, SUM(media.size) OVER w / SUM(media.size) OVER() * 100 AS "%%" FROM (media JOIN media_types ON media.media_type_id = media_types.id) WINDOW w AS (PARTITION BY media.media_type_id); -- Применяем чистые оконные функции SELECT id, name, created_at, ROW_NUMBER() OVER w AS 'row_number', FIRST_VALUE(name) OVER w AS 'first', LAST_VALUE(name) OVER w AS 'last', NTH_VALUE(name, 2) OVER w AS 'second' FROM regions WINDOW w AS (PARTITION BY LEFT(created_at, 3) ORDER BY created_at);
<gh_stars>0 CREATE TABLE ERS_USERS ( ERS_USERS_ID NUMBER PRIMARY KEY, ERS_USERNAME VARCHAR2(50) UNIQUE NOT NULL, ERS_PASSWORD VARCHAR2(50) UNIQUE NOT NULL, USER_FIRST_NAME VARCHAR(100), USER_LAST_NAME VARCHAR(100), USER_EMAIL VARCHAR(150), USER_ROLE_ID NUMBER, CONSTRAINT USER_ROLES_FK FOREIGN KEY (USER_ROLE_ID) REFERENCES ERS_USER_ROLES(ERS_USER_ROLE_ID) ); commit; CREATE TABLE ERS_USER_ROLES( ERS_USER_ROLE_ID NUMBER PRIMARY KEY, USER_ROLE VARCHAR2(10) ); CREATE TABLE ERS_REIMBURSEMENT( REIMB_ID NUMBER PRIMARY KEY, REIMB_AMOUNT NUMBER, REIMB_SUBMITTED TIMESTAMP, REIMB_RESOLVED TIMESTAMP, REIMB_DESCRIPTION VARCHAR2(250), REIMB_RECEIPT BLOB, REIMB_AUTHOR NUMBER, REIMB_RESOLVER NUMBER, REIMB_STATUS_ID NUMBER, REIMB_TYPE_ID NUMBER, CONSTRAINT ERS_USERS_FK_AUTH FOREIGN KEY (REIMB_AUTHOR) REFERENCES ERS_USERS(ERS_USERS_ID), CONSTRAINT ERS_USERS_FK_RESOLVER FOREIGN KEY (REIMB_RESOLVER) REFERENCES ERS_USERS(ERS_USERS_ID), CONSTRAINT ERS_REIMBURSEMENT_STATUS_FK FOREIGN KEY (REIMB_STATUS_ID) REFERENCES ERS_REIMBURSEMENT_STATUS(REIMB_STATUS_ID),---- CONSTRAINT ERS_REIMBURSEMENT_TYPE_FK FOREIGN KEY (REIMB_TYPE_ID) REFERENCES ERS_REIMBURSEMENT_TYPE(REIMB_TYPE_ID)---- ); CREATE TABLE ERS_REIMBURSEMENT_STATUS( REIMB_STATUS_ID NUMBER PRIMARY KEY, REIMB_STATUS VARCHAR2(10) ); CREATE TABLE ERS_REIMBURSEMENT_TYPE( REIMB_TYPE_ID NUMBER PRIMARY KEY, REIMB_TYPE VARCHAR2(10) ); drop table ERS_REIMBURSEMENT_TYPE; drop table ERS_REIMBURSEMENT_STATUS; drop table ERS_REIMBURSEMENT; drop table ERS_USER_ROLES; drop table ERS_USERS; commit;
-- This schema was my interpretation of MTCProv model proposed in 2012. It is a modified version of prov -- this is supposed to work with sqlite3 so that I can integrate it in a tcl file --<NAME> is my updated schema based off of MTCProv CREATE TABLE ApplicationCatalog ( hashValue char(128) PRIMARY KEY, catalogEntries text ); CREATE TABLE ApplicationExecution ( applicationExecutionId char(128) PRIMARY KEY, try int, startTime datetime, duration int, finalState char(128), stdios char(128), arguments char(128), site char(128), notes text ); CREATE TABLE ApplicationFunctionCall ( startTime datetime, --what type should this be? duration int, finalState char(128), app_catalog_name char(128) ); CREATE TABLE ConsumesProperty ( parameter char(128) ); CREATE TABLE FunctionCall ( functionCallId char(128) PRIMARY KEY, type char(128), name char(128), notes text ); CREATE TABLE Mapped ( filename char(128) ); CREATE TABLE Primitive ( value text ); CREATE TABLE ProducesProperty ( parameter char(128) ); CREATE TABLE RuntimeSnapshot ( timestamp datetime PRIMARY KEY, cpuUsage float, maxPhysMem int, maxVirtMem int, ioRead int, ioWrite int ); CREATE TABLE Script ( hashValue char(128) PRIMARY KEY, sourceCode text ); CREATE TABLE ScriptRun ( scriptRunId char(128) PRIMARY KEY, scriptFileName char(128), logFileName char(128), --maybe use varchar depending on what we get for each swiftVersion char(128), cogVersion char(128), finalState char(128), starttime datetime, duration int, scriptHash char(128), applicationCatalogHash char(128), siteCatalogHash char(128) ); CREATE TABLE ScriptRunAnnotation ( key char(128) PRIMARY KEY, value text ); CREATE TABLE SiteCatalog ( hashValue char(128) PRIMARY KEY, catalogEntries text ); CREATE TABLE Variable ( variableId char(128) PRIMARY KEY ); CREATE TABLE VariableAnnotation ( key char(128) PRIMARY KEY, value text ); -- Here are some types that are now tables because of how sqlite3 works. CREATE TABLE compare_run_by_annot_num_type ( run_id varchar, name varchar, value numeric ); CREATE TABLE compare_run_by_annot_txt_type ( run_id varchar, name varchar, value varchar ); CREATE TABLE compare_run_by_key_numeric_type ( run_id varchar, name varchar, value numeric ); CREATE TABLE compare_run_by_key_text_type ( run_id varchar, name varchar, value varchar ); CREATE TABLE compare_run_by_parameter_type ( run_id varchar, parameter varchar, value varchar );
<reponame>james-cantrill/funda_components<filename>system_user/system_user_database/action_functions/test/test_action_user_login_master.sql -- system_user_schema.action_user_login -- the json object containng the inmput data, _in_data, is defined below. -- _in_data: { -- login: -- password: -- } -- prelminary preparation - DO $$ DECLARE _output_json json; BEGIN RAISE NOTICE 'TEST Login master user expected result: Success'; RAISE NOTICE ''; _output_json := (SELECT * FROM system_user_schema.action_user_login ('{"login": "muser", "password":"<PASSWORD>"}')); RAISE NOTICE ''; RAISE NOTICE 'Login muser _output_json = %', _output_json; RAISE NOTICE ''; END$$; SELECT '';
<filename>src/main/resources/archetype-resources/src/main/resources/import.sql --INIT USER INSERT INTO USER(USERNAME, PASSWORD, ACCOUNT_NON_EXPIRED, ACCOUNT_NON_LOCKED, CREDENTIALS_NON_EXPIRED, ENABLED, AUTHORITIES) VALUES('admin','$2a$<PASSWORD>', true, true, true, true, 'USER,ADMIN'); INSERT INTO USER(USERNAME, PASSWORD, ACCOUNT_NON_EXPIRED, ACCOUNT_NON_LOCKED, CREDENTIALS_NON_EXPIRED, ENABLED, AUTHORITIES) VALUES('user','$<PASSWORD>', true, true, true, true, 'USER'); --INIT AUTHOR INSERT INTO AUTHOR(AUTHOR_NAME, CREATE_BY_ID, CREATE_DATE) VALUES('Jackie', 2, '2017-09-16 12:00:00'); --INIT BOOK INSERT INTO BOOK(BOOK_NAME, CREATE_BY_ID, CREATE_DATE) VALUES('Spring Boot Quick Start', 2, '2017-09-16 12:00:00');
CREATE OR REPLACE FUNCTION set_var(name text, val text) RETURNS text AS $$ if ($_SHARED{$_[0]} = $_[1]) { return 'ok'; } else { return "cannot set shared variable $_[0] to $_[1]"; } $$ LANGUAGE plperl; CREATE OR REPLACE FUNCTION get_var(name text) RETURNS text AS $$ return $_SHARED{$_[0]}; $$ LANGUAGE plperl; SELECT set_var('sample', 'Hello, PL/Perl! How''s tricks?'); SELECT get_var('sample');
<filename>sql/_17_sql_extension2/_02_full_test/_03_alter_table/_01_alter_change/cases/alter_change_type_bigint.sql --+ holdcas on; --alter_table_change_type_strict --change the type of a bigint column to other types create class coo( col1 bigint, col2 bigint, col3 bigint, col4 bigint, col5 bigint, col6 bigint, col7 bigint, col8 bigint, col9 bigint, col10 bigint, col11 bigint, col12 bigint, col13 bigint, col14 bigint, col15 bigint, col16 bigint, col17 bigint, col18 bigint, col19 bigint, col20 bigint, col21 bigint, col22 bigint, col23 bigint, col24 bigint, col25 bigint ); insert into coo values(7382729371234567890, 73829283412367890, -2342037561234567890, 8274386542145167890, -660321233123467890, 8372827341345167890, 8273848271234567890, 51826312312367890, -7153342551234567890, 8157832331345167890, -416273312123467890, 8153645341345167890, -934132543889967890, -2212726548067890, 3817947441188912345, -8745, 6271836242346333, -6283548, 512736433749320752, 7382729, -74832903323557, 8271926423625, -728194612899664463, 283456, 72938472899933542); show columns in coo; --bigint -> numeric, precision - scale >= 19 alter table coo change col1 col1 numeric(24, 4); select col1 from coo order by 1; --bigint -> numeric, precision - scale < 19, enough room for conversion alter table coo change col2 col2 numeric(24, 6); select col2 from coo order by 1; --bigint -> numeric, precision - scale < 19, lack of room for conversion set system parameters 'alter_table_change_type_strict=yes'; alter table coo change col3 col3 numeric(24, 7); set system parameters 'alter_table_change_type_strict=no'; alter table coo change col3 col3 numeric(24, 7); select col3 from coo order by 1; --bigint -> char, precision > 19+1 alter table coo change col4 col4 char(24); select col4 from coo order by 1; --bigint -> char, precision <= 19+1, enough room for conversion alter table coo change col5 col5 char(20); select col5 from coo order by 1; --bigint -> char, precision <= 19+1, lack of room for conversion set system parameters 'alter_table_change_type_strict=yes'; alter table coo change col6 col6 char(15); set system parameters 'alter_table_change_type_strict=no'; alter table coo change col6 col6 char(15); select length(col6) from coo order by 1; --bigint -> varchar, precision > 19+1 or new prec=-1 alter table coo change col7 col7 varchar; select col7 from coo order by 1; --bigint -> varchar, precision <= 19+1, enough room for conversion alter table coo change col8 col8 varchar(20); select col8 from coo order by 1; --bigint -> varchar, precision <= 19+1, lack of room for conversion set system parameters 'alter_table_change_type_strict=yes'; alter table coo change col9 col9 varchar(17); set system parameters 'alter_table_change_type_strict=no'; alter table coo change col9 col9 varchar(17); select col9 from coo order by 1; --bigint -> nchar, precision > 19+1 alter table coo change col10 col10 nchar(25); select col10 from coo order by 1; --bigint -> nchar, precision <= 19+1, enough room for conversion alter table coo change col11 col11 nchar(20); select col11 from coo order by 1; --bigint -> nchar, precision <= 19+1, lack of room for conversion set system parameters 'alter_table_change_type_strict=yes'; alter table coo change col12 col12 nchar(15); set system parameters 'alter_table_change_type_strict=no'; alter table coo change col12 col12 nchar(15); select length(col12) from coo order by 1; --bigint -> nchar varying, precision > 19+1, or new prec=-1 alter table coo change col13 col13 nchar varying(24); select col13 from coo order by 1; --bigint -> nchar varying, precision <= 19+1, enough room for conversion alter table coo change col14 col14 nchar varying(20); select col14 from coo order by 1; --bigint -> nchar varying, precision <= 19+1, lack of room for conversion set system parameters 'alter_table_change_type_strict=yes'; alter table coo change col15 col15 nchar varying(16); set system parameters 'alter_table_change_type_strict=no'; alter table coo change col15 col15 nchar varying(16); select length(col15) from coo order by 1; --bigint -> short, enough room for conversion alter table coo change col16 col16 short; select col16 from coo order by 1; --bigint -> short, lack of room for conversion set system parameters 'alter_table_change_type_strict=yes'; alter table coo change col17 col17 short; select col17 from coo order by 1; set system parameters 'alter_table_change_type_strict=no'; alter table coo change col17 col17 short; select col17 from coo order by 1; --bigint -> float, enough room for conversion alter table coo change col18 col18 float; select col18 from coo order by 1; --bigint -> float, lack of room for conversion set system parameters 'alter_table_change_type_strict=yes'; alter table coo change col19 col19 float; select col19 from coo order by 1; set system parameters 'alter_table_change_type_strict=no'; alter table coo change col19 col19 float; select col19 from coo order by 1; --bigint -> int, enough room for conversion alter table coo change col20 col20 int; select col20 from coo order by 1; --bigint -> int, lack of room for conversion set system parameters 'alter_table_change_type_strict=yes'; alter table coo change col21 col21 int; set system parameters 'alter_table_change_type_strict=no'; alter table coo change col21 col21 int; select col21 from coo order by 1; --bigint -> double, enough room for conversion alter table coo change col22 col22 double; select col22 from coo order by 1; --bigint -> double, lack of room for conversion set system parameters 'alter_table_change_type_strict=yes'; alter table coo change col23 col23 double; select col23 from coo order by 1; set system parameters 'alter_table_change_type_strict=no'; alter table coo change col23 col23 double; select col23 from coo order by 1; --bigint -> monetary, enough room for conversion alter table coo change col24 col24 monetary; select col24 from coo order by 1; --bigint -> monetary, lack of room for conversion set system parameters 'alter_table_change_type_strict=yes'; alter table coo change col25 col25 monetary; select col25 from coo order by 1; set system parameters 'alter_table_change_type_strict=no'; alter table coo change col25 col25 monetary; select col25 from coo order by 1; show columns in coo; drop table coo; commit; --+ holdcas off;
<reponame>ghudson46/employee-tracker CREATE DATABASE employee_tracker_db; USE employee_tracker_db; CREATE TABLE employee ( first_name varchar(30), last_name varchar(30), role_id int, manager_id int ); CREATE TABLE role ( id INT AUTO_INCREMENT PRIMARY KEY, title varchar(30), salary decimal, department_id int ); CREATE TABLE department ( id INT AUTO_INCREMENT PRIMARY KEY, name varchar(30) ); CREATE TABLE manager ( id INT AUTO_INCREMENT PRIMARY KEY, name varchar(50) );
UPDATE regions SET name = 'Great Britain' where id = 'GB'; DELETE FROM regions WHERE parent_id = 'GB';
CREATE DATABASE quero_assistir; USE quero_assistir; CREATE TABLE filme( id INT AUTO_INCREMENT, descricao VARCHAR(50) NOT NULL, ano INT NOT NULL, CONSTRAINT pk_quero_assistir PRIMARY KEY(id), CONSTRAINT uq_quero_assistir UNIQUE(descricao) ); INSERT INTO filme (id, descricao, ano) VALUES(1, 'Star Wars - Uma Nova Esperança', 1997); INSERT INTO filme (id, descricao, ano) VALUES(2, 'Star Wars - O Império Contra-Ataca', 1980); INSERT INTO filme (id, descricao, ano) VALUES(3, 'Star Wars - O Retorno de Jedi', 1983); INSERT INTO filme (id, descricao, ano) VALUES(4, 'Star Wars - A Ameaça Fantasma', 1999); INSERT INTO filme (id, descricao, ano) VALUES(5, 'Star Wars - Ataque dos Clones', 2002); INSERT INTO filme (id, descricao, ano) VALUES(6, 'Star Wars - A Vingança dos Sith', 2005); INSERT INTO filme (id, descricao, ano) VALUES(7, 'Star Wars - O Despertar da Força', 2015); INSERT INTO filme (id, descricao, ano) VALUES(8, 'Star Wars - Rogue One', 2016); INSERT INTO filme (id, descricao, ano) VALUES(9, 'Star Wars - Os Últimos Jedi', 2017);
<gh_stars>0 CREATE TABLE tenant_member ( id bigserial NOT NULL PRIMARY KEY, first_name text, last_name text, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL );
 CREATE TABLE [dbo].[BoloesPontosRodadas]( [NomeCampeonato] [varchar](150) NOT NULL, [NomeFase] [varchar](50) NOT NULL, [NomeGrupo] [varchar](20) NOT NULL, [NomeBolao] [varchar](100) NOT NULL, [Posicao] [int] NOT NULL, [Titulo] [varchar](150) NULL, [Pontos] [int] NOT NULL, [DataValidacao] [datetime] NOT NULL, [CreatedBy] [varchar](25) NULL, [CreatedDate] [datetime] NULL, [ModifiedBy] [varchar](25) NULL, [ModifiedDate] [datetime] NULL, [ActiveFlag] [smallint] NULL, CONSTRAINT [PK_dbo.BoloesPontosRodadas] PRIMARY KEY CLUSTERED ( [NomeCampeonato] ASC, [NomeFase] ASC, [NomeGrupo] ASC, [NomeBolao] ASC, [Posicao] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO ----ALTER TABLE [dbo].[BoloesPontosRodadas] ADD FOREIGN KEY([CreatedBy]) ----REFERENCES [dbo].[Users] ([UserName]) ----GO ----ALTER TABLE [dbo].[BoloesPontosRodadas] ADD FOREIGN KEY([ModifiedBy]) ----REFERENCES [dbo].[Users] ([UserName]) ----GO --ALTER TABLE [dbo].[BoloesPontosRodadas] ADD CONSTRAINT FK_BoloesPontosRodadas_Boloes_NomeBolao FOREIGN KEY([NomeBolao]) --REFERENCES [dbo].[Boloes] ([Nome]) --GO --ALTER TABLE [dbo].[BoloesPontosRodadas] ADD CONSTRAINT FK_BoloesPontosRodadas_CampeonatosFases_NomeCampeonato_Nome FOREIGN KEY([NomeCampeonato], [NomeFase]) --REFERENCES [dbo].[CampeonatosFases] ([NomeCampeonato], [Nome]) --GO --ALTER TABLE [dbo].[BoloesPontosRodadas] ADD CONSTRAINT FK_BoloesPontosRodadas_CampeonatosGrupos_Nome_NomeCampeonato FOREIGN KEY([NomeGrupo], [NomeCampeonato]) --REFERENCES [dbo].[CampeonatosGrupos] ([Nome], [NomeCampeonato]) --GO ALTER TABLE [dbo].[BoloesPontosRodadas] ADD CONSTRAINT [FK_dbo.BoloesPontosRodadas_dbo.Boloes_NomeBolao] FOREIGN KEY([NomeBolao]) REFERENCES [dbo].[Boloes] ([Nome]) GO ALTER TABLE [dbo].[BoloesPontosRodadas] CHECK CONSTRAINT [FK_dbo.BoloesPontosRodadas_dbo.Boloes_NomeBolao] GO ALTER TABLE [dbo].[BoloesPontosRodadas] ADD CONSTRAINT [FK_dbo.BoloesPontosRodadas_dbo.CampeonatosFases_NomeCampeonato_NomeFase] FOREIGN KEY([NomeCampeonato], [NomeFase]) REFERENCES [dbo].[CampeonatosFases] ([NomeCampeonato], [Nome]) GO ALTER TABLE [dbo].[BoloesPontosRodadas] CHECK CONSTRAINT [FK_dbo.BoloesPontosRodadas_dbo.CampeonatosFases_NomeCampeonato_NomeFase] GO ALTER TABLE [dbo].[BoloesPontosRodadas] ADD CONSTRAINT [FK_dbo.BoloesPontosRodadas_dbo.CampeonatosGrupos_NomeCampeonato_NomeGrupo] FOREIGN KEY([NomeCampeonato], [NomeGrupo]) REFERENCES [dbo].[CampeonatosGrupos] ([NomeCampeonato], [Nome]) GO ALTER TABLE [dbo].[BoloesPontosRodadas] CHECK CONSTRAINT [FK_dbo.BoloesPontosRodadas_dbo.CampeonatosGrupos_NomeCampeonato_NomeGrupo] GO
<gh_stars>0 WITH einzelobjekt_flaeche AS ( SELECT DISTINCT ON (einzelobjekt.tid) einzelobjekt.tid, einzelobjekt.entstehung, einzelobjekt.art, split_part(einzelobjekt.art_txt,'.',array_upper(string_to_array(einzelobjekt.art_txt,'.'), 1)) AS art_txt, to_date(nachfuehrung.gueltigereintrag, 'YYYYMMDD') AS nachfuehrung FROM av_avdpool_ng.einzelobjekte_flaechenelement AS flaeche LEFT JOIN av_avdpool_ng.einzelobjekte_einzelobjekt AS einzelobjekt ON flaeche.flaechenelement_von = einzelobjekt.tid LEFT JOIN av_avdpool_ng.einzelobjekte_eonachfuehrung AS nachfuehrung ON einzelobjekt.entstehung = nachfuehrung.tid ), einzelobjekt_linie AS ( SELECT DISTINCT ON (einzelobjekt.tid) einzelobjekt.tid, einzelobjekt.entstehung, einzelobjekt.art, split_part(einzelobjekt.art_txt,'.',array_upper(string_to_array(einzelobjekt.art_txt,'.'), 1)) AS art_txt, to_date(nachfuehrung.gueltigereintrag, 'YYYYMMDD') AS nachfuehrung FROM av_avdpool_ng.einzelobjekte_linienelement AS linie LEFT JOIN av_avdpool_ng.einzelobjekte_einzelobjekt AS einzelobjekt ON linie.linienelement_von = einzelobjekt.tid LEFT JOIN av_avdpool_ng.einzelobjekte_eonachfuehrung AS nachfuehrung ON einzelobjekt.entstehung = nachfuehrung.tid ), einzelobjekt_punkt AS ( SELECT DISTINCT ON (einzelobjekt.tid) einzelobjekt.tid, einzelobjekt.entstehung, einzelobjekt.art, split_part(einzelobjekt.art_txt,'.',array_upper(string_to_array(einzelobjekt.art_txt,'.'), 1)) AS art_txt, to_date(nachfuehrung.gueltigereintrag, 'YYYYMMDD') AS nachfuehrung FROM av_avdpool_ng.einzelobjekte_punktelement AS punkt LEFT JOIN av_avdpool_ng.einzelobjekte_einzelobjekt AS einzelobjekt ON punkt.punktelement_von = einzelobjekt.tid LEFT JOIN av_avdpool_ng.einzelobjekte_eonachfuehrung AS nachfuehrung ON einzelobjekt.entstehung = nachfuehrung.tid ), einzelobjekt_position AS ( SELECT objekt.objektname_von, objekt."name" AS objektname, CASE WHEN pos.ori IS NULL THEN 0 ELSE (100 - pos.ori) * 0.9 END AS orientierung, CASE WHEN pos.hali_txt IS NULL THEN 'Center' ELSE pos.hali_txt END AS hali, CASE WHEN pos.vali_txt IS NULL THEN 'Half' ELSE pos.vali_txt END AS vali, pos.pos, pos.gem_bfs AS bfs_nr, pos.lieferdatum AS importdatum FROM av_avdpool_ng.einzelobjekte_objektname AS objekt INNER JOIN av_avdpool_ng.einzelobjekte_objektnamepos AS pos ON pos.objektnamepos_von = objekt.tid WHERE pos.pos IS NOT NULL ) SELECT objekt."name" AS objektname, CASE WHEN pos.ori IS NULL THEN 0 ELSE (100 - pos.ori) * 0.9 END AS orientierung, CASE WHEN pos.hali_txt IS NULL THEN 'Center' ELSE pos.hali_txt END AS hali, CASE WHEN pos.vali_txt IS NULL THEN 'Half' ELSE pos.vali_txt END AS vali, bodenbedeckung.art, CASE WHEN split_part(bodenbedeckung.art_txt,'.', array_upper(string_to_array(bodenbedeckung.art_txt, '.'), 1))='fliessendes' THEN 'fliessendes Gewaesser' WHEN split_part(bodenbedeckung.art_txt,'.', array_upper(string_to_array(bodenbedeckung.art_txt, '.'), 1))='stehendes' THEN 'stehendes Gewaesser' ELSE split_part(bodenbedeckung.art_txt,'.', array_upper(string_to_array(bodenbedeckung.art_txt, '.'), 1)) END AS art_txt, 'BB' AS herkunft, pos.gem_bfs AS bfs_nr, pos.lieferdatum AS importdatum, to_date(nachfuehrung.gueltigereintrag, 'YYYYMMDD') AS nachfuehrung, 'realisiert' AS status, pos.pos FROM av_avdpool_ng.bodenbedeckung_objektnamepos AS pos LEFT JOIN av_avdpool_ng.bodenbedeckung_objektname AS objekt ON pos.objektnamepos_von = objekt.tid LEFT JOIN av_avdpool_ng.bodenbedeckung_boflaeche AS bodenbedeckung ON objekt.objektname_von = bodenbedeckung.tid LEFT JOIN av_avdpool_ng.bodenbedeckung_bbnachfuehrung AS nachfuehrung ON bodenbedeckung.entstehung = nachfuehrung.tid UNION ALL SELECT objekt."name" AS objektname, CASE WHEN pos.ori IS NULL THEN 0 ELSE (100 - pos.ori) * 0.9 END AS orientierung, CASE WHEN pos.hali_txt IS NULL THEN 'Center' ELSE pos.hali_txt END AS hali, CASE WHEN pos.vali_txt IS NULL THEN 'Half' ELSE pos.vali_txt END AS vali, bodenbedeckung.art, CASE WHEN split_part(bodenbedeckung.art_txt,'.', array_upper(string_to_array(bodenbedeckung.art_txt, '.'), 1))='fliessendes' THEN 'fliessendes Gewaesser' WHEN split_part(bodenbedeckung.art_txt,'.', array_upper(string_to_array(bodenbedeckung.art_txt, '.'), 1))='stehendes' THEN 'stehendes Gewaesser' ELSE split_part(bodenbedeckung.art_txt,'.', array_upper(string_to_array(bodenbedeckung.art_txt, '.'), 1)) END AS art_txt, 'BB' AS herkunft, pos.gem_bfs AS bfs_nr, pos.lieferdatum AS importdatum, to_date(nachfuehrung.gueltigereintrag, 'YYYYMMDD') AS nachfuehrung, 'projektiert' AS status, pos.pos FROM av_avdpool_ng.bodenbedeckung_projobjektnamepos AS pos LEFT JOIN av_avdpool_ng.bodenbedeckung_projobjektname AS objekt ON pos.projobjektnamepos_von = objekt.tid LEFT JOIN av_avdpool_ng.bodenbedeckung_projboflaeche AS bodenbedeckung ON objekt.projobjektname_von = bodenbedeckung.tid LEFT JOIN av_avdpool_ng.bodenbedeckung_bbnachfuehrung AS nachfuehrung ON bodenbedeckung.entstehung = nachfuehrung.tid UNION ALL SELECT einzelobjekt_position.objektname, einzelobjekt_position.orientierung, einzelobjekt_position.hali, einzelobjekt_position.vali, einzelobjekt_flaeche.art, einzelobjekt_flaeche.art_txt, 'EO_Flaeche' AS herkunft, einzelobjekt_position.bfs_nr, einzelobjekt_position.importdatum, einzelobjekt_flaeche.nachfuehrung, 'realisiert' AS status, einzelobjekt_position.pos FROM einzelobjekt_flaeche INNER JOIN einzelobjekt_position ON einzelobjekt_flaeche.tid = einzelobjekt_position.objektname_von UNION ALL SELECT einzelobjekt_position.objektname, einzelobjekt_position.orientierung, einzelobjekt_position.hali, einzelobjekt_position.vali, einzelobjekt_linie.art, einzelobjekt_linie.art_txt, 'EO_Linie' AS herkunft, einzelobjekt_position.bfs_nr, einzelobjekt_position.importdatum, einzelobjekt_linie.nachfuehrung, 'realisiert' AS status, einzelobjekt_position.pos FROM einzelobjekt_linie INNER JOIN einzelobjekt_position ON einzelobjekt_linie.tid = einzelobjekt_position.objektname_von UNION ALL SELECT einzelobjekt_position.objektname, einzelobjekt_position.orientierung, einzelobjekt_position.hali, einzelobjekt_position.vali, einzelobjekt_punkt.art, einzelobjekt_punkt.art_txt, 'EO_Punkt' AS herkunft, einzelobjekt_position.bfs_nr, einzelobjekt_position.importdatum, einzelobjekt_punkt.nachfuehrung, 'realisiert' AS status, einzelobjekt_position.pos FROM einzelobjekt_punkt INNER JOIN einzelobjekt_position ON einzelobjekt_punkt.tid = einzelobjekt_position.objektname_von ;
SELECT price * amount AS total FROM items;
<gh_stars>0 CREATE FUNCTION [SqlNet].[DateTimeBeginingOfYear] (@dateTime DATETIME) RETURNS DATETIME AS EXTERNAL NAME [SqlNet].[Sql.Net.Types.DateTimeType].[DateBeginingOfYear]
use vendas; create table usuarios ( id int not null auto_increment primary key, nome varchar(255), matricula varchar(255), senha varchar(255), status tinyint, created datetime )engine=InnoDB charset utf8; create table clientes( id int not null auto_increment primary key, usuario_id int, nome varchar(255), cpf varchar(255), rg varchar(255), endereco varchar(255), numero integer, estado varchar(255), cidade varchar(255), renda float, status tinyint, created datetime, foreign key (usuario_id) references usuarios(id) on delete cascade )engine=innoDB charset utf8; create table produtos( id int not null auto_increment primary key, usuario_id int, descricao varchar(45), detalhamento text, preco_vista float, preco_prazo float, codigo_barras varchar(255), status tinyint, created datetime, foreign key (usuario_id) references usuarios(id) on delete cascade )engine=innoDB charset utf8; create table vendas ( id int not null auto_increment primary key, produto_id int, usuario_id int, cliente_id int, quantidade int, valor_total float, forma_pagamento varchar(255), status tinyint, created datetime, updated datetime, foreign key(produto_id) references produtos(id) on delete cascade, foreign key (cliente_id) references clientes(id) on delete cascade, foreign key (usuario_id) references usuarios(id) on delete cascade )engine=innoDB charset utf8;
INSERT INTO csp.user (id,username,passwordhash,created,updated,deleted) VALUES (default,'test','123',default,default,default); INSERT INTO csp.location(id,lat,lng,name,created,updated,deleted) VALUES (default,'0','0','test location',default,default,default); INSERT INTO csp.trip(id,startdate,enddate,bookinguserid,triplocationid,created,updated,deleted) VALUES (default, '2001-01-01', '2001-01-10', 1, 1,default,default,default); INSERT INTO csp.locationrating(id,locationid,overallrating,facilitiesrating,locationrating,journeyrating,sceneryrating,comment,created,updated,deleted) VALUES (default,1,5,4,3,2,1,'test',default,default,default);
-- Code SQL pour le schéma CREATE TABLE [Chapters] ( [id] [int] PRIMARY KEY AUTOINCREMENT, [name] [VARCHAR](50) NOT NULL, [description] [VARCHAR](200) NULL, [course_id] [int] NULL ) CREATE TABLE [Classes]( [id] [int] PRIMARY KEY, [name] [VARCHAR](15) NOT NULL, [section] [VARCHAR](25) NULL, [professor_id] [int] NULL ) CREATE TABLE [Courses]( [id] [int] NOT NULL PRIMARY KEY, [name] [VARCHAR](50) NULL, [professor_id] [int] NOT NULL ) CREATE TABLE [Professor]( [id] [int] PRIMARY KEY, [name] [VARCHAR](50) NOT NULL, [firstname] [VARCHAR](50) NULL, [password] [VARCHAR](20) NULL, [cours_id] [int] NOT NULL ) CREATE TABLE [professorClass]( [prof_id] [int] NOT NULL, [class_id] [int] NOT NULL, PRIMARY KEY (prof_id, class_id) ) GO /****** Object: Table [professorCourse] Script Date: 19.05.2017 12:41:04 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [professorCourse]( [profId] [int] NOT NULL, [courId] [int] NOT NULL, CONSTRAINT [PK_professorCourse] PRIMARY KEY CLUSTERED ( [profId] ASC, [courId] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO /****** Object: Table [Student] Script Date: 19.05.2017 12:41:04 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [Student]( [studId] [int] NOT NULL, [studName] [VARCHAR](50) NOT NULL, [studFirstname] [VARCHAR](50) NULL, [studPassword] [VARCHAR](20) NULL, [studClassId] [int] NULL, CONSTRAINT [PK_Student] PRIMARY KEY CLUSTERED ( [studId] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO /****** Object: Table [Task] Script Date: 19.05.2017 12:41:04 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [Task]( [taskId] [int] NOT NULL, [taskName] [VARCHAR](50) NOT NULL, [taskValidated] [int] NOT NULL, [taskFilepath] [VARCHAR](50) NULL, [taskChapterId] [int] NULL, [taskStudentId] [int] NULL, CONSTRAINT [PK_Task] PRIMARY KEY CLUSTERED ( [taskId] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO /****** Object: Index [IX_professorCourse] Script Date: 19.05.2017 12:41:04 ******/ CREATE NONCLUSTERED INDEX [IX_professorCourse] ON [professorCourse] ( [profId] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] GO ALTER TABLE [Chapter] WITH CHECK ADD CONSTRAINT [FK_Chapter_Course] FOREIGN KEY([chapCourseId]) REFERENCES [Course] ([courId]) GO ALTER TABLE [Chapter] CHECK CONSTRAINT [FK_Chapter_Course] GO ALTER TABLE [Student] WITH CHECK ADD CONSTRAINT [FK_Student_Class] FOREIGN KEY([studClassId]) REFERENCES [Class] ([clasId]) GO ALTER TABLE [Student] CHECK CONSTRAINT [FK_Student_Class] GO ALTER TABLE [Task] WITH CHECK ADD CONSTRAINT [FK_Task_Chapter] FOREIGN KEY([taskChapterId]) REFERENCES [Chapter] ([chapId]) GO ALTER TABLE [Task] CHECK CONSTRAINT [FK_Task_Chapter] GO ALTER TABLE [Task] WITH CHECK ADD CONSTRAINT [FK_Task_Student] FOREIGN KEY([taskStudentId]) REFERENCES [Student] ([studId]) GO ALTER TABLE [Task] CHECK CONSTRAINT [FK_Task_Student] GO USE [master] GO ALTER DATABASE [Homeworks] SET READ_WRITE GO
<filename>movingcompany (1).sql<gh_stars>1-10 -- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 12, 2019 at 10:34 AM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.3.0 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: `movingcompany` -- -- -------------------------------------------------------- -- -- Table structure for table `employees` -- CREATE TABLE `employees` ( `id` int(10) UNSIGNED NOT NULL, `first_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `last_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `bonus` double NOT NULL DEFAULT '0', `gender` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'male', `pictureID` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `employeement_time` datetime NOT NULL, `promotion_date` date DEFAULT NULL, `state` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'activate', `paid_method` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `employees` -- INSERT INTO `employees` (`id`, `first_name`, `last_name`, `bonus`, `gender`, `pictureID`, `employeement_time`, `promotion_date`, `state`, `paid_method`, `created_at`, `updated_at`) VALUES (2, 'Bai', 'MaoLi', 0, 'male', 'natural-landscape-background_23-2147499882.jpg', '2019-02-07 22:30:06', NULL, 'activate', 'cash', '2019-02-07 13:25:57', '2019-02-07 14:30:06'), (3, 'Oni', 'Angel', 1, 'male', NULL, '2019-02-11 07:51:52', '2019-02-07', 'activate', 'cash', '2019-02-10 23:51:52', '2019-02-10 23:52:00'), (4, 'Zhe', 'Zui', 0, 'male', NULL, '2019-02-11 09:41:46', NULL, 'activate', 'cash', '2019-02-11 01:41:46', '2019-02-11 01:41:46'); -- -------------------------------------------------------- -- -- Table structure for table `employee_events` -- CREATE TABLE `employee_events` ( `id` int(10) UNSIGNED NOT NULL, `event_id` int(11) NOT NULL, `employee_id` int(11) NOT NULL, `job_id` int(11) NOT NULL, `position_id` int(11) NOT NULL, `start_time` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `finish_time` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `travel_time` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `total_hours` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `labor_hours` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `non_profit_percent` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `hourly_pay` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `hourly_percent` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `flat_percent` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `extra_percent` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `packing_percent` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `service_percent` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `tips` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `hourly_rate` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `discount` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `bonus` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `job_total` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `payment_description` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `employee_events` -- INSERT INTO `employee_events` (`id`, `event_id`, `employee_id`, `job_id`, `position_id`, `start_time`, `finish_time`, `travel_time`, `total_hours`, `labor_hours`, `non_profit_percent`, `hourly_pay`, `hourly_percent`, `flat_percent`, `extra_percent`, `packing_percent`, `service_percent`, `tips`, `hourly_rate`, `discount`, `bonus`, `job_total`, `payment_description`, `created_at`, `updated_at`) VALUES (3, 4, 4, 3, 4, NULL, NULL, '0', '0', '0', '5', '22', '1', '1', '1', '1', '1', '0', '0', '0', '0', '5', NULL, '2019-02-11 23:22:09', '2019-02-11 23:22:18'), (4, 2, 4, 3, 4, NULL, NULL, '3', '5', '6', '14', '22', '1', '1', '1', '1', '1', '2', '0', '15', '0', '5', 'Zhe Zui is working hard', '2019-02-12 01:30:07', '2019-02-12 01:30:23'); -- -------------------------------------------------------- -- -- Table structure for table `employee_jobs` -- CREATE TABLE `employee_jobs` ( `id` int(10) UNSIGNED NOT NULL, `employee_id` int(11) NOT NULL, `job_id` int(11) NOT NULL, `position_id` int(11) NOT NULL, `employeement_state` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `hourly_pay` double NOT NULL, `hourly_percent` double NOT NULL DEFAULT '0', `flat_percent` double NOT NULL DEFAULT '0', `extra_percent` double NOT NULL DEFAULT '0', `packing_percent` double NOT NULL DEFAULT '0', `service_percent` double NOT NULL DEFAULT '0', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `employee_jobs` -- INSERT INTO `employee_jobs` (`id`, `employee_id`, `job_id`, `position_id`, `employeement_state`, `hourly_pay`, `hourly_percent`, `flat_percent`, `extra_percent`, `packing_percent`, `service_percent`, `created_at`, `updated_at`) VALUES (4, 2, 4, 4, 'beginner', 25, 2, 2, 2, 1, 1, '2019-02-07 13:25:57', '2019-02-07 13:43:51'), (5, 2, 3, 3, 'promote', 22, 1, 1, 1, 2, 1, '2019-02-07 13:25:57', '2019-02-07 13:44:02'), (8, 2, 1, 4, 'promote', 16, 1, 1, 0, 1, 1, '2019-02-07 13:45:07', '2019-02-07 13:51:22'), (9, 3, 3, 3, 'beginner', 22, 1, 1, 1, 1, 1, '2019-02-10 23:51:52', '2019-02-10 23:51:52'), (10, 3, 3, 3, 'promote', 22, 1, 1, 1, 1, 1, '2019-02-10 23:51:52', '2019-02-10 23:51:52'), (11, 4, 3, 4, 'beginner', 22, 1, 1, 1, 1, 1, '2019-02-11 01:41:46', '2019-02-11 01:41:46'), (12, 4, 3, 4, 'promote', 22, 1, 1, 1, 1, 1, '2019-02-11 01:41:46', '2019-02-11 01:41:46'); -- -------------------------------------------------------- -- -- Table structure for table `employee_pays` -- CREATE TABLE `employee_pays` ( `id` int(10) UNSIGNED NOT NULL, `employee_id` int(11) NOT NULL, `event_id` int(11) NOT NULL, `pay_amount` double NOT NULL, `bonus` double NOT NULL DEFAULT '0', `extra` double NOT NULL DEFAULT '0', `packing` double NOT NULL DEFAULT '0', `service` double NOT NULL DEFAULT '0', `tips` double NOT NULL DEFAULT '0', `non_profit` double NOT NULL DEFAULT '0', `discount` double NOT NULL DEFAULT '0', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `events` -- CREATE TABLE `events` ( `id` int(10) UNSIGNED NOT NULL, `pick_address` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `drop_address` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `stop_address` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `flat` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `extra` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `packing` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `service` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `non_profit` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `truck_license` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `comment` text COLLATE utf8mb4_unicode_ci, `state` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `attach_file` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `events` -- INSERT INTO `events` (`id`, `pick_address`, `drop_address`, `stop_address`, `flat`, `extra`, `packing`, `service`, `non_profit`, `truck_license`, `comment`, `state`, `attach_file`, `created_at`, `updated_at`) VALUES (2, 'ShenYang', 'DanDong', 'AiZhen', '3', '12', '7', '7', '15', '12345', 'Zhe Zui and Oni\'s Task', 'close', NULL, '2019-02-11 23:05:31', '2019-02-12 01:32:16'), (3, NULL, NULL, NULL, '0', '0', '0', '0', '0', NULL, NULL, 'close', NULL, '2019-02-11 23:05:57', '2019-02-11 23:05:57'), (4, NULL, NULL, NULL, '0', '0', '0', '0', '0', NULL, NULL, 'close', NULL, '2019-02-11 23:22:09', '2019-02-11 23:22:09'), (5, 'ShenYang', 'DanDong', 'AiZhen', '3', '4', '4', '6', '10', '12345', 'First Comment Part', 'close', NULL, '2019-02-12 01:18:49', '2019-02-12 01:18:49'); -- -------------------------------------------------------- -- -- Table structure for table `jobs` -- CREATE TABLE `jobs` ( `id` int(10) UNSIGNED NOT NULL, `type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `variation` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `hourly_pay` double NOT NULL DEFAULT '0', `hourly_percent` double NOT NULL DEFAULT '0', `flat_percent` double NOT NULL DEFAULT '0', `extra_percent` double NOT NULL DEFAULT '0', `packing_percent` double NOT NULL DEFAULT '0', `service_percent` double NOT NULL DEFAULT '0', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `jobs` -- INSERT INTO `jobs` (`id`, `type`, `variation`, `hourly_pay`, `hourly_percent`, `flat_percent`, `extra_percent`, `packing_percent`, `service_percent`, `created_at`, `updated_at`) VALUES (1, 'Hourly', NULL, 16, 1, 1, 1, 1, 1, '2019-02-07 11:38:31', '2019-02-07 11:39:07'), (2, 'Hourly', 'Commerical', 20, 2, 1, 1, 1, 1, '2019-02-07 11:38:57', '2019-02-07 11:38:57'), (3, 'Flat', NULL, 22, 1, 1, 1, 1, 1, '2019-02-07 11:42:28', '2019-02-07 11:42:28'), (4, 'Flat', 'Professional', 25, 2, 2, 2, 1, 1, '2019-02-07 11:47:38', '2019-02-07 11:47:55'); -- -------------------------------------------------------- -- -- Table structure for table `migrations` -- CREATE TABLE `migrations` ( `id` int(10) UNSIGNED NOT NULL, `migration` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `batch` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `migrations` -- INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (1, '2014_10_12_000000_create_users_table', 1), (2, '2014_10_12_100000_create_password_resets_table', 1), (6, '2019_01_30_012627_create_postions_table', 2), (13, '2019_02_04_090533_create_employee_pays_table', 7), (14, '2019_01_30_000825_create_employees_table', 8), (15, '2019_01_30_012544_create_jobs_table', 8), (16, '2019_02_01_152149_create_employee_jobs_table', 8), (19, '2019_02_04_002319_create_events_table', 9), (22, '2019_02_04_010203_create_employee_events_table', 10); -- -------------------------------------------------------- -- -- Table structure for table `password_resets` -- CREATE TABLE `password_resets` ( `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `token` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `postions` -- CREATE TABLE `postions` ( `id` int(10) UNSIGNED NOT NULL, `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `postions` -- INSERT INTO `postions` (`id`, `name`, `created_at`, `updated_at`) VALUES (3, 'Forman', '2019-01-30 07:25:06', '2019-02-01 01:04:15'), (4, 'Driver', '2019-01-30 07:25:12', '2019-02-01 01:04:24'), (5, 'Forman / Driver', '2019-02-01 01:04:41', '2019-02-01 01:04:41'), (6, 'Helper', '2019-02-01 01:04:56', '2019-02-01 01:04:56'), (7, 'Sales Person', '2019-02-01 01:05:08', '2019-02-01 01:05:08'); -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE `users` ( `id` int(10) UNSIGNED NOT NULL, `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `email_verified_at` timestamp NULL DEFAULT NULL, `password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `users` -- INSERT INTO `users` (`id`, `name`, `email`, `email_verified_at`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES (1, '<NAME>', '<EMAIL>', NULL, '$2y$10$.LYa6lp1btAmpIEe/fTddOUhh5agDMQDdY9mekKyqkF3TDWfbxeVq', 'C9TaNg3mQS0G96cJFT2un8SwuzmnmcQ38xRYMthLLUyLH00KUOL3kSFpwvYV', '2019-01-28 01:55:10', '2019-01-28 01:55:10'), (2, '<NAME>', '<EMAIL>', NULL, '$2y$10$YgwpSh.NKXfcPAglcuNXFekTCQis57CYfy76RR7WK5mD75lmTTmz2', 'fKgIC8RtwLkeYtgKwnkBN<KEY>eJpgTZUXxvRC5FAqIrsiGO', '2019-01-29 01:19:16', '2019-01-29 01:19:16'); -- -- Indexes for dumped tables -- -- -- Indexes for table `employees` -- ALTER TABLE `employees` ADD PRIMARY KEY (`id`); -- -- Indexes for table `employee_events` -- ALTER TABLE `employee_events` ADD PRIMARY KEY (`id`); -- -- Indexes for table `employee_jobs` -- ALTER TABLE `employee_jobs` ADD PRIMARY KEY (`id`); -- -- Indexes for table `employee_pays` -- ALTER TABLE `employee_pays` ADD PRIMARY KEY (`id`); -- -- Indexes for table `events` -- ALTER TABLE `events` ADD PRIMARY KEY (`id`); -- -- Indexes for table `jobs` -- ALTER TABLE `jobs` ADD PRIMARY KEY (`id`); -- -- Indexes for table `migrations` -- ALTER TABLE `migrations` ADD PRIMARY KEY (`id`); -- -- Indexes for table `password_resets` -- ALTER TABLE `password_resets` ADD KEY `password_resets_email_index` (`email`); -- -- Indexes for table `postions` -- ALTER TABLE `postions` ADD PRIMARY KEY (`id`); -- -- Indexes for table `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `users_email_unique` (`email`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `employees` -- ALTER TABLE `employees` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `employee_events` -- ALTER TABLE `employee_events` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `employee_jobs` -- ALTER TABLE `employee_jobs` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13; -- -- AUTO_INCREMENT for table `employee_pays` -- ALTER TABLE `employee_pays` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `events` -- ALTER TABLE `events` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- AUTO_INCREMENT for table `jobs` -- ALTER TABLE `jobs` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `migrations` -- ALTER TABLE `migrations` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23; -- -- AUTO_INCREMENT for table `postions` -- ALTER TABLE `postions` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; -- -- AUTO_INCREMENT for table `users` -- ALTER TABLE `users` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; 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 */;
<filename>project.sql -- CREATE EXTENSION pgcrypto; -- SET search_path TO rideshare; DROP TABLE IF EXISTS Users CASCADE; DROP TABLE IF EXISTS Cars CASCADE; DROP TABLE IF EXISTS Drivers CASCADE; DROP TABLE IF EXISTS Routes CASCADE; DROP TABLE IF EXISTS Rewards CASCADE; DROP TABLE IF EXISTS Rides CASCADE; DROP TABLE IF EXISTS Advertisements CASCADE; DROP TABLE IF EXISTS Bids CASCADE; DROP TABLE IF EXISTS Bookings CASCADE; CREATE TABLE Users ( username TEXT PRIMARY KEY, password TEXT NOT NULL, email TEXT UNIQUE NOT NULL, fullName TEXT NOT NULL, phone TEXT UNIQUE NOT NULL ); CREATE TABLE Cars ( carplate TEXT PRIMARY KEY, model TEXT, numSeats INT DEFAULT 4, CHECK(numSeats > 0) ); CREATE TABLE Drivers ( username TEXT PRIMARY KEY REFERENCES Users(username) ON DELETE CASCADE, carPlate TEXT REFERENCES Cars(carplate) NOT NULL, UNIQUE(carPlate) ); CREATE TABLE Routes( routeId SERIAL PRIMARY KEY, origin TEXT NOT NULL, destination TEXT NOT NULL, distance INT NOT NULL, UNIQUE(origin, destination), CHECK (origin <> destination) ); CREATE TABLE Rewards ( username TEXT REFERENCES Users(username) ON DELETE CASCADE, rewardName TEXT NOT NULL, discount INT NOT NULL, PRIMARY KEY(username, rewardName), CHECK(discount > 0 AND discount < 100) ); CREATE TABLE Rides ( rideId SERIAL UNIQUE, rideStartTime TIMESTAMP NOT NULL, routeId SERIAL REFERENCES Routes(routeId) NOT NULL, car TEXT REFERENCES Cars(carplate) NOT NULL, driver TEXT REFERENCES Drivers(username) NOT NULL, price NUMERIC(5,2), status INT DEFAULT 1, PRIMARY KEY(rideId, driver), CHECK(status IN (1, 2, 3) AND price > 0) -- 1 Bidding, 2 Completed, 3 Cancelled ); CREATE TABLE Advertisements ( adId SERIAL PRIMARY KEY, startingBid NUMERIC(5,2) NOT NULL, bidEndTime TIMESTAMP NOT NULL, rideId SERIAL REFERENCES Rides(rideId) NOT NULL, advertiser TEXT REFERENCES Drivers(username), UNIQUE(rideId) ); CREATE TABLE Bids ( adId SERIAL REFERENCES Advertisements(adId), bidder TEXT REFERENCES Users(username), currentBid numeric(5, 2) NOT NULL, PRIMARY KEY(adId, bidder) ); CREATE TABLE Bookings ( passenger TEXT REFERENCES Users(username), rideId SERIAL REFERENCES Rides(rideId), initialPrice NUMERIC(5,2) NOT NULL, paymentAmount NUMERIC NOT NULL, paymentStatus INT DEFAULT 1, PRIMARY KEY(passenger, rideId), CHECK(paymentStatus IN (1, 2)) -- 1 Payment incomplete, 2 Payment completed ); CREATE OR REPLACE FUNCTION CheckBid() RETURNS TRIGGER AS $$ BEGIN RAISE NOTICE 'currentBid too low!'; RETURN NULL; END; $$LANGUAGE plpgsql; CREATE TRIGGER trig_CB BEFORE UPDATE ON Bids FOR EACH ROW WHEN (NEW.currentBid <= OLD.currentBid) EXECUTE PROCEDURE CheckBid(); CREATE OR REPLACE FUNCTION DriverToCar() RETURNS TRIGGER AS $$ BEGIN INSERT INTO cars(carPlate) VALUES(new.carPlate); RETURN new; END; $$ LANGUAGE plpgsql; CREATE TRIGGER trig_DC BEFORE INSERT ON Drivers FOR EACH ROW EXECUTE PROCEDURE DriverToCar(); CREATE OR REPLACE FUNCTION ChangeStatus() RETURNS TRIGGER AS $$ BEGIN UPDATE Rides SET status = CASE WHEN ((SELECT COUNT(passenger) FROM Bookings WHERE rideId = NEW.rideId AND paymentStatus = 2)=(SELECT COUNT(passenger) FROM Bookings WHERE rideId = NEW.rideId)) THEN 2 ELSE 1 END WHERE rides.rideId = new.rideId; RETURN NEW; END; $$ LANGUAGE plpgsql; CREATE TRIGGER trig_CS AFTER UPDATE ON Bookings FOR EACH ROW EXECUTE PROCEDURE ChangeStatus();
-- phpMyAdmin SQL Dump -- version 4.7.8 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: 27 фев 2018 в 23:52 -- Версия на сървъра: 10.1.31-MariaDB -- PHP Version: 7.2.2 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: `yourschoolbuddy` -- -- -------------------------------------------------------- -- -- Структура на таблица `exams` -- CREATE TABLE `exams` ( `id` int(11) NOT NULL, `subject_id` int(11) NOT NULL, `student_id` int(11) NOT NULL, `type_id` int(11) NOT NULL, `date` date NOT NULL, `grade` enum('A','B','C','D','E','F') COLLATE utf8_swedish_ci DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_swedish_ci; -- -------------------------------------------------------- -- -- Структура на таблица `exam_types` -- CREATE TABLE `exam_types` ( `id` int(11) NOT NULL, `name` varchar(50) COLLATE utf8_swedish_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_swedish_ci; -- -- Схема на данните от таблица `exam_types` -- INSERT INTO `exam_types` (`id`, `name`) VALUES (1, 'Oral'), (2, 'Multiple choice'), (3, 'Term test'); -- -------------------------------------------------------- -- -- Структура на таблица `students` -- CREATE TABLE `students` ( `id` int(11) NOT NULL, `name` varchar(50) COLLATE utf8_swedish_ci NOT NULL, `password` varchar(255) COLLATE utf8_swedish_ci NOT NULL, `registered_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `last_active_on` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_swedish_ci; -- -- Схема на данните от таблица `students` -- INSERT INTO `students` (`id`, `name`, `password`, `registered_on`, `last_active_on`) VALUES (1, 'user1', '$2y$12$xpKA0bJB5RJNmTNLESBnduTPUIudTH9.WGleY9KPhe0Ax8Pyn4N.K', '2017-07-03 21:53:09', '2018-02-24 19:47:42'), (2, 'user2', '$2y$12$gKakQrurRrDmwv3KyokqtuKEH8FruN./EgKft1vhx1j.2iCwiLRbK', '2018-02-06 10:03:00', '2018-02-25 18:49:12'); -- -------------------------------------------------------- -- -- Структура на таблица `study_sessions` -- CREATE TABLE `study_sessions` ( `id` int(11) NOT NULL, `start_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `end_date` datetime DEFAULT CURRENT_TIMESTAMP, `student_id` int(11) NOT NULL, `subject_id` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_swedish_ci; -- -------------------------------------------------------- -- -- Структура на таблица `subjects` -- CREATE TABLE `subjects` ( `id` int(11) NOT NULL, `name` varchar(50) COLLATE utf8_swedish_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_swedish_ci; -- -- Схема на данните от таблица `subjects` -- INSERT INTO `subjects` (`id`, `name`) VALUES (1, 'Art'), (2, 'Biology'), (3, 'Chemistry'), (4, 'English'), (5, 'Ethics'), (6, 'Geography'), (7, 'History'), (8, 'IT'), (9, 'Literature'), (10, 'Mathematics'), (11, 'Music'), (12, 'Philosophy'), (13, 'Physics'), (14, 'Psychology'); -- -------------------------------------------------------- -- -- Структура на таблица `timers` -- CREATE TABLE `timers` ( `id` int(11) NOT NULL, `student_id` int(11) NOT NULL, `subject_id` int(11) DEFAULT NULL, `time_left` int(11) NOT NULL, `is_running` tinyint(1) NOT NULL, `is_in_working_mode` tinyint(1) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_swedish_ci; -- -- Схема на данните от таблица `timers` -- INSERT INTO `timers` (`id`, `student_id`, `subject_id`, `time_left`, `is_running`, `is_in_working_mode`) VALUES (1, 1, 3, 1404, 0, 1), (2, 2, NULL, 1500, 0, 1); -- -- Indexes for dumped tables -- -- -- Indexes for table `exams` -- ALTER TABLE `exams` ADD PRIMARY KEY (`id`), ADD KEY `student_id` (`student_id`), ADD KEY `subject_id` (`subject_id`), ADD KEY `type_id` (`type_id`); -- -- Indexes for table `exam_types` -- ALTER TABLE `exam_types` ADD PRIMARY KEY (`id`); -- -- Indexes for table `students` -- ALTER TABLE `students` ADD PRIMARY KEY (`id`); -- -- Indexes for table `study_sessions` -- ALTER TABLE `study_sessions` ADD PRIMARY KEY (`id`), ADD KEY `student_id` (`student_id`), ADD KEY `subject_id` (`subject_id`); -- -- Indexes for table `subjects` -- ALTER TABLE `subjects` ADD PRIMARY KEY (`id`); -- -- Indexes for table `timers` -- ALTER TABLE `timers` ADD PRIMARY KEY (`id`), ADD KEY `student_id` (`student_id`), ADD KEY `subject_id` (`subject_id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `exams` -- ALTER TABLE `exams` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- AUTO_INCREMENT for table `exam_types` -- ALTER TABLE `exam_types` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- -- AUTO_INCREMENT for table `students` -- ALTER TABLE `students` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `study_sessions` -- ALTER TABLE `study_sessions` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `subjects` -- ALTER TABLE `subjects` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15; -- -- AUTO_INCREMENT for table `timers` -- ALTER TABLE `timers` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- Ограничения за дъмпнати таблици -- -- -- Ограничения за таблица `exams` -- ALTER TABLE `exams` ADD CONSTRAINT `exams_ibfk_1` FOREIGN KEY (`student_id`) REFERENCES `students` (`id`), ADD CONSTRAINT `exams_ibfk_2` FOREIGN KEY (`subject_id`) REFERENCES `subjects` (`id`), ADD CONSTRAINT `exams_ibfk_3` FOREIGN KEY (`type_id`) REFERENCES `exam_types` (`id`); -- -- Ограничения за таблица `study_sessions` -- ALTER TABLE `study_sessions` ADD CONSTRAINT `study_sessions_ibfk_1` FOREIGN KEY (`student_id`) REFERENCES `students` (`id`), ADD CONSTRAINT `study_sessions_ibfk_2` FOREIGN KEY (`subject_id`) REFERENCES `subjects` (`id`); -- -- Ограничения за таблица `timers` -- ALTER TABLE `timers` ADD CONSTRAINT `timers_ibfk_1` FOREIGN KEY (`student_id`) REFERENCES `students` (`id`), ADD CONSTRAINT `timers_ibfk_2` FOREIGN KEY (`subject_id`) REFERENCES `subjects` (`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 */;
<reponame>CSCfi/antero USE [VipunenTK_lisatiedot] GO IF NOT EXISTS (SELECT * FROM [VipunenTK_lisatiedot].[dbo].[opettajat_aine] where id=57 or aine_koodi='56') BEGIN insert [VipunenTK_lisatiedot].[dbo].[opettajat_aine] (id,luotu,aine_koodi,aine,aine_SV,aine_EN,jarjestys,virhetilanne,poistettu,tietolahde,kommentti) values (57,'2020-07-01','56','pienryhmäinen muun kuin ev.-lut. tai ortodoksisen uskonnon opettaja','religion, annan än evangelisk-luthersk eller ortodox (undervisning i smågrupp)' ,'religion, other than Evangelical-Lutheran or Orthodox (small-group teaching)','1065','E ',' ','Tilastokeskus','CSC Juha') END GO update [VipunenTK_lisatiedot].[dbo].[opettajat_aine] set jarjestys = '9999' where aine_koodi='99' GO USE [ANTERO]
create schema other; CREATE TABLE other.entity ( uuid UUID not null, constraint pk_other_entity PRIMARY KEY (uuid) );
-- file:polymorphism.sql ln:706 expect:true drop function dfunc(varchar, numeric, date)
/* tsqllint-disable */ SET NOCOUNT ON਍ഀ ALTER PROCEDURE Foo਍ഀ
CREATE INDEX ix_category_status ON category(status); UPDATE `site` set `value` = '48' where `setting` = 'sqlpatch';
<filename>sql/create_table_plot_data.sql<gh_stars>0 CREATE TABLE IF NOT EXISTS plot_data ( plot_id integer, map_unit_id integer, transect_id integer, forb_class integer, grass_class integer, brotec_class integer );
<reponame>Ed-Fi-Alliance-OSS/Ed-Fi-MigrationUtility -- SPDX-License-Identifier: Apache-2.0 -- Licensed to the Ed-Fi Alliance under one or more agreements. -- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0. -- See the LICENSE and NOTICES files in the project root for more information. PRINT N'Adding foreign keys to [edfi].[Grade]' GO ALTER TABLE [edfi].[Grade] ADD CONSTRAINT [FK_Grade_GradeTypeDescriptor] FOREIGN KEY ([GradeTypeDescriptorId]) REFERENCES [edfi].[GradeTypeDescriptor] ([GradeTypeDescriptorId]) GO ALTER TABLE [edfi].[Grade] ADD CONSTRAINT [FK_Grade_GradingPeriod] FOREIGN KEY ([GradingPeriodDescriptorId], [GradingPeriodSequence], [SchoolId], [GradingPeriodSchoolYear]) REFERENCES [edfi].[GradingPeriod] ([GradingPeriodDescriptorId], [PeriodSequence], [SchoolId], [SchoolYear]) GO ALTER TABLE [edfi].[Grade] ADD CONSTRAINT [FK_Grade_PerformanceBaseConversionDescriptor] FOREIGN KEY ([PerformanceBaseConversionDescriptorId]) REFERENCES [edfi].[PerformanceBaseConversionDescriptor] ([PerformanceBaseConversionDescriptorId]) GO ALTER TABLE [edfi].[Grade] ADD CONSTRAINT [FK_Grade_StudentSectionAssociation] FOREIGN KEY ([BeginDate], [LocalCourseCode], [SchoolId], [SchoolYear], [SectionIdentifier], [SessionName], [StudentUSI]) REFERENCES [edfi].[StudentSectionAssociation] ([BeginDate], [LocalCourseCode], [SchoolId], [SchoolYear], [SectionIdentifier], [SessionName], [StudentUSI]) ON UPDATE CASCADE GO
<filename>sql/data-design.sql ALTER DATABASE rdominguez45 CHARACTER SET utf8 COLLATE utf8_unicode_ci; DROP TABLE IF EXISTS watches; DROP TABLE IF EXISTS comments; DROP TABLE IF EXISTS `user`; DROP TABLE IF EXISTS stream; CREATE TABLE stream ( streamId BINARY(64) NOT NULL, streamName VARCHAR(32) NOT NULL, streamCategory VARCHAR(32) NOT NULL, streamGame VARCHAR(32) NOT NULL, streamTime DATETIME(6) NOT NULL, streamViewers VARCHAR(32) NOT NULL, PRIMARY KEY(streamId) ); CREATE TABLE `user` ( userId BINARY(64) NOT NULL, userName VARCHAR(32) NOT NULL, userPassword VARCHAR(32) NOT NULL, userHostsStreamId BINARY(64), FOREIGN KEY(userHostsStreamId) REFERENCES stream(streamId), UNIQUE(userName), PRIMARY KEY(userId ) ); CREATE TABLE comments ( commentId BINARY(64) NOT NULL, commentsUserId BINARY(64) NOT NULL, commentsStreamId BINARY(64) NOT NULL, commentsContents VARCHAR(128) NOT NULL, INDEX(commentsUserId), INDEX(commentsStreamId), FOREIGN KEY(commentsUserId) REFERENCES user(userID), FOREIGN KEY(commentsStreamId) REFERENCES stream(streamId), PRIMARY KEY(commentId) ); CREATE TABLE watches ( watchesUserId BINARY(64) NOT NULL, watchesStreamId BINARY(64) NOT NULL, FOREIGN KEY (watchesUserId) REFERENCES user(userId), FOREIGN KEY (watchesStreamId) REFERENCES stream(streamId), PRIMARY KEY (watchesUserId, watchesStreamId) );
-- SPDX-License-Identifier: Apache-2.0 -- Licensed to the Ed-Fi Alliance under one or more agreements. -- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0. -- See the LICENSE and NOTICES files in the project root for more information. PRINT N'Dropping type reference from [edfi].[CourseIdentificationSystemDescriptor]' GO ALTER TABLE [edfi].[CourseIdentificationSystemDescriptor] DROP COLUMN [CourseIdentificationSystemTypeId] GO PRINT N'Importing updated CourseIdentificationSystemDescriptor defaults' GO EXEC [migration_tempdata].[sp_ImportDescriptorsFromXML] 'CourseIdentificationSystemDescriptor' GO
-- -- migration INSERT INTO fieldmapper( field_class, field_name, field_value ) VALUES( "department", "CONSTR-PHD", "School of Architecture" ); -- -- end of file --
CREATE OR REPLACE PACKAGE BODY om.om_recover AS -- $Header: v01_108_001__om_recover_PackageBody 2016/11/17 1.0 <NAME> $ --*************************************************************************************************** --* --* Application: CAS Install Base (Recoveries) --* Program: om_recoveries PL/SQL Package --* --* Title: Install Base recoveries --* --* Purpose: This package contains procedures for IB recoveries. --* --* Release Date Description --* -------------------------------------------------------------------------- --* 1.0 2007-May-10 <NAME> - Package created. --* 1.0 R1 2007-Jun-05 <NAME> - Release 1 - add ONE TIME recoveries. --* 1.0 R1 2007-Jun-12 <NAME> - added pn_dflt_coding_flag. --* - added fn_is_bps_jv. --* - added prc_get_expense_coding. --* 1.0 R1 2007-Jun-14 <NAME> - added fn_get_po_number. --* 1.0 R2 2007-Jun-19 <NAME> - store recovery_id in log table key2_id. --* 2007-Jun-21 <NAME> - set recovery process flag to 'W' for WTS. --* 2.0 R0 2007-Jul-03 <NAME> - don't check for SDA account for non-ministry customers. --* - don't flag failure to find SDA account as an error (warning only). --* 2007-Jul-04 <NAME> - remove parameters from prc_get_expense_coding() calls. --* - change name of function from fn_is_bps_jv to fn_is_bps. --* Modify function to only check for BPS type. --* - round amounts to 2 decimal places. --* 3.0 2007-Jul-30 <NAME> - prc_process_other, prc_process_consumption - test for n_price=0 before writing zero price error message. --* 3.0 2007-Aug-09 <NAME> - prc_process_other, prc_process_consumption - save recovery stob and reset for each instance. --* 3.0 2007-Aug-14 <NAME> - fn_is_bps no longer used. Check for customer_class = 'PUBLIC_SECTOR_INVOICED' to determine whether to change recovery stob. --* 4.0 2007-Aug-14 <NAME> - added prc_process_adjustments --* - comment out fn_is_bps (Not used now. Recovery STOB is only changed for PUBLIC_SECTOR_INVOICED). --* 4.1 2007-Aug-14 <NAME> - prc_process_adjustments - don't update status when error occurs expanding period range. --* 5.0 2007-Oct-03 <NAME> - alert 162278 - modify recovery queries to use BPS instead of WTS to select BPS item instances --* - maintain a count of dup key errors when inserting recoveries --* 5.0 2007-Oct-04 <NAME> - alert 162278 - modify adjustment recoveries to filter on customer type parameter --* 5.1 2008-Jan-03 <NAME> - alert 164938 - modify recovery code to allow prevalidation (pn_validate_flag_in flag). --* - check customer class consistent with requested customer type. --* 6.0 2008-Jan-24 <NAME> - alert 165534 - validate given GL period name. --* 7.0 2008-Feb-24 <NAME> - alert 165950 - flag previous fiscal recoveries with 'F'. --* 8.0 2008-Apr-24 <NAME> - alert 167510 - recoveries missed for instances with back dated end dates --* - alert 161619 - recovery credits. --* 8.1 2008-May-20 <NAME> - alert 169115 - validate recovery start/end dates. --* 8.2 2008-May-22 <NAME> - alert 161619 - fix bug in recovery_credit_status update. --* 9.0 2008-May-23 <NAME> - alert 164938 - validate cost centre party name begins with 'CC-'. --* 2008-Jun-05 <NAME> - alert 170422 - adjustment recoveries - trap errors to avoid abend. --* 10.0 2009-Mar-06 <NAME> - alert 178871 - monthly recoveries for multiple periods - use separate flag to track price errors for each period. --* 10.1 2009-Mar-10 <NAME> - character variable too small for version number. --* 11.0 2010-Feb-16 <NAME> - New funding model changes based on attribute1 on cust name and colour. --* 12.0 2010-Aug-05 <NAME> - Added hint to the Credit program alert#191417 --* 13.0 2010-Aug-26 <NAME> - Modified the procedure prc_process_other, prc_process_consumption,prc_process_adjustments for Alert # 191418 --* 14.0 2011-Sep-06 <NAME> - Alert 202659 - Modified procedure prc_process_other to process BPS recoveries for BC Ambulance Service --* - new function fn_isBPS() - return 1 if given party_id is BPS party --* 14.0 2012-Apr-27 <NAME> - Alert 202659 - implement BPS / BCAS recoveries for other recovery types. BPS party_IDs are now --* stored in CAS generic table CAS_BPS_PARTY_IDS. This table must be configured for recoveries to run. --* 14.1 2012-Aug-21 <NAME> - modify queries --* - use subqueries instead of calls to fn_selected_extended_attribute() --* - remove use_hash hint, and parallel degree parameters --****************************************************************************************************************************************** -- -- Constants -- gc_version_no CONSTANT VARCHAR2(4) := '14.1'; gc_version_dt CONSTANT VARCHAR2(11) := '22-Aug-2012'; /* -- --*************************************************************************************************** --* Function : fn_get_recovery_flag --* Purpose : Determine if we need to recover or not for this customer and colour. --* Parameters: pn_account_id_in, --* pv_account_number_in, --* pv_account_name_in, --* pv_colour_in --* Called By all procedures in this package. --*************************************************************************************************** FUNCTION fn_get_recovery_flag(pn_account_id_in IN hz_cust_accounts.cust_account_id%TYPE, pv_account_number_in IN hz_cust_accounts.account_number%TYPE, pv_account_name_in IN hz_cust_accounts.account_name%TYPE, pv_colour_in IN VARCHAR2) RETURN VARCHAR2 IS -- v_do_not_recover VARCHAR2(1); v_recovery_flag VARCHAR2(1); v_recover_colour VARCHAR2(1); -- BEGIN -- Get attribute1 that tells us whether we need to recover or not. BEGIN SELECT NVL(ca.attribute1, 'Y') INTO v_recovery_flag FROM ar.hz_cust_accounts ca WHERE ca.cust_account_id = pn_account_id_in AND ca.account_number = pv_account_number_in AND ca.account_name = pv_account_name_in; EXCEPTION WHEN OTHERS THEN v_recovery_flag := 'Y'; END; -- IF v_recovery_flag = 'Y' THEN -- PLNET kind of customers will be recoved regardless of colour v_do_not_recover := 'I'; ELSE -- See in cas generic table if this colour is excluded from recovery. BEGIN SELECT data1 INTO v_recover_colour FROM cas_generic_table_details WHERE category = 'WTS_RECOVERY_COLOUR' AND key = pv_colour_in; EXCEPTION WHEN OTHERS THEN v_recover_colour := 'Y'; END; -- IF v_recover_colour = 'N' THEN -- ministry and colour is excluded from recovery -- and configured in cas_generic. v_do_not_recover := 'W'; ELSE v_do_not_recover := 'I'; END IF; END IF; -- -- RETURN v_do_not_recover; -- EXCEPTION WHEN OTHERS THEN RETURN NULL; END fn_get_recovery_flag; */ -- --*************************************************************************************************** --* Function : fn_validate_period_name. --* Purpose : return true if given period name is valid for given period set. --* Called By prc_process_recoveries: --*************************************************************************************************** FUNCTION fn_is_valid_period_name(pv_period_set_name_in IN om_fin_period_sets.period_set_name%TYPE, --changed from gl_sets_of_books pv_period_in IN om_fin_periods.period_name%TYPE) --changed from gl_periods RETURN BOOLEAN IS -- v_pd_name om_fin_periods.period_name%TYPE; -- BEGIN -- /*SELECT period_name INTO v_pd_name FROM gl.gl_periods WHERE period_set_name = pv_period_set_name_in AND period_name = UPPER(pv_period_in) AND (period_name NOT LIKE 'ADJ2%' AND period_name NOT LIKE 'ADJ3%' AND period_name NOT LIKE 'ADJ4%');*/ SELECT fipe.period_name INTO v_pd_name FROM om_fin_period_sets fpse, om_fin_periods fipe WHERE fpse.period_set_name = pv_period_set_name_in AND fipe.period_name = UPPER(pv_period_in) AND fpse.fpse_rk = fipe.fpse_rk AND (fipe.period_name NOT LIKE 'ADJ2%' AND fipe.period_name NOT LIKE 'ADJ3%' AND fipe.period_name NOT LIKE 'ADJ4%'); -- RETURN TRUE; -- EXCEPTION WHEN NO_DATA_FOUND THEN RETURN FALSE; WHEN OTHERS THEN RAISE; -- END fn_is_valid_period_name; -- --*************************************************************************************************** --* Function : fn_get_po_number. --* Purpose : Get PO number for given item instance. --* Parameters: pn_request_number_in - item instance last_oe_order_line_id. --* Called By prc_process_other, prc_process_consumption: --*************************************************************************************************** FUNCTION fn_get_po_number(pv_request_number_in IN NUMBER) RETURN VARCHAR2 IS -- v_po_number om_order_details.cust_po_number%TYPE; --oe_order_headers_all.cust_po_number%TYPE; -- BEGIN -- /*SELECT oh.cust_po_number INTO v_po_number FROM oe_order_lines_all ol, oe_order_headers_all oh WHERE ol.line_id = pn_line_id_in AND oh.header_id = ol.header_id;*/ SELECT orde.cust_po_number INTO v_po_number FROM om_order_details orde WHERE orde.request_number = pv_request_number_in; -- RETURN v_po_number; -- EXCEPTION WHEN OTHERS THEN RETURN NULL; END fn_get_po_number; -- /* --*************************************************************************************************** --* Function : fn_isBPS() - Alert 202659 --* Purpose : Determine if the given party ID is a BPS party. --* Parameters: pn_party_id_in - party ID --* Called By prc_process_other, prc_process_consumption: --*************************************************************************************************** FUNCTION fn_isbps --(pn_party_id_in IN ar.hz_parties.party_id%TYPE) RETURN NUMBER IS -- result NUMBER := 0; -- BEGIN -- query BPS party ID generic table for specified party_ID. BEGIN SELECT 1 INTO result FROM casint.cas_generic_table_details WHERE category = 'CAS_BPS_PARTY_IDS' AND key = TO_CHAR(pn_party_id_in); EXCEPTION WHEN OTHERS THEN result := 0; END; RETURN result; END; --fn_isBPS() */ -- --*************************************************************************************************** --* Function : fn_get_default_recovery_stob. --* Purpose : Get the default recovery stob for the given customer class. --* Parameters: pv_customer_type_in - customer class code (e.g. PUBLIC_SECTOR_RECOVERIES). --* Called By prc_process_other, prc_process_consumption: --*************************************************************************************************** FUNCTION fn_get_default_recovery_stob --(pv_customer_type_in IN hz_cust_accounts.customer_class_code%TYPE) RETURN VARCHAR2 IS -- v_default_stob VARCHAR2(4); -- BEGIN -- SELECT data4 default_stob INTO v_default_stob FROM om_generic_table_details WHERE category = 'WTS_CUST_CLASS_RECOVERY_TYPE'; -- AND key = pv_customer_type_in; -- RETURN v_default_stob; -- EXCEPTION WHEN OTHERS THEN RETURN NULL; END fn_get_default_recovery_stob; /* -- --*************************************************************************************************** --* Procedure : prc_expand_adjustment_periods. --* Purpose : Get From/To period names from given cas_ib_adjustments record and expand the --* period range into 1 record per period in cas_ib_adj_recoveries. --* Parameters: pn_adjustment_id_in - key of adjustment record to expand. --* pn_set_of_books_id - used to determine period set name --* Called By : prc_process_adjustments: --*************************************************************************************************** PROCEDURE prc_expand_adjustment_periods(pn_adjustment_id_in IN cas_ib_adjustments.adjustment_id%TYPE, pn_set_of_books_id_in IN gl_sets_of_books.set_of_books_id%TYPE, pv_return_code_out OUT NOCOPY VARCHAR2, pv_message_out OUT NOCOPY VARCHAR2) IS -- v_start_period gl_periods.period_name%TYPE; v_end_period gl_periods.period_name%TYPE; n_instance_id csi.csi_item_instances.instance_id%TYPE; c_procedure_name CONSTANT VARCHAR2(30) := 'prc_expand_adjustment_periods'; -- CURSOR cr_periods IS SELECT period_name FROM gl.gl_sets_of_books sob, gl.gl_periods pd WHERE sob.set_of_books_id = pn_set_of_books_id_in AND pd.period_set_name = sob.period_set_name AND pd.period_name NOT LIKE 'ADJ%' AND pd.start_date BETWEEN (SELECT start_date FROM gl.gl_periods pd2 WHERE pd2.period_set_name = pd.period_set_name AND pd2.period_name = v_start_period) AND (SELECT start_date FROM gl.gl_periods pd2 WHERE pd2.period_set_name = pd.period_set_name AND pd2.period_name = v_end_period) ORDER BY start_date; -- BEGIN -- pv_return_code_out := '0'; -- SELECT recovery_period_name_from, recovery_period_name_to, instance_id INTO v_start_period, v_end_period, n_instance_id FROM cas_ib_adjustments WHERE adjustment_id = pn_adjustment_id_in; -- FOR r_period IN cr_periods LOOP BEGIN INSERT INTO cascsi.cas_ib_adj_recoveries(adj_recovery_id, adjustment_id, recovery_period_name, created_by, creation_date, last_updated_by, last_update_date) VALUES (cascsi_ib_adj_recoveries_s.NEXTVAL, pn_adjustment_id_in, r_period.period_name, cas_common_utl.fn_get_user_id('BATCH'), SYSDATE, cas_common_utl.fn_get_user_id('BATCH'), SYSDATE); EXCEPTION WHEN DUP_VAL_ON_INDEX THEN -- ignore dup key (adjustment_id, period_name). -- This would only occur when restarting after an aborted run. -- V 9.0. cas_interface_log.prc_log_info( c_procedure_name, 'dup key error ignored', 'instance_id=' || TO_CHAR(n_instance_id) || ' adjustment_id=' || TO_CHAR(pn_adjustment_id_in) || ' period=' || r_period.period_name ); END; END LOOP; -- EXCEPTION WHEN OTHERS THEN pv_return_code_out := '2'; pv_message_out := 'prc_expand_adjustment_periods(' || TO_CHAR(pn_adjustment_id_in) || ', ' || TO_CHAR(pn_set_of_books_id_in) || '): ' || SQLERRM; -- END prc_expand_adjustment_periods; */ -- --*************************************************************************************************** --* Procedure : prc_get_expense_coding --* Purpose : Get expense GL coding. If required, look up default coding. --* Parameters: pv_istore_org_in - iStore Org (attribute12 - e.g. TH). --* pn_dflt_coding_flag_in - use default GL coding if given coding is invalid. --* pv_client_in_out --* pv_resp_in_out --* pv_service_in_out --* pv_stob_in_out --* pv_project_in_out --* pv_ccid_in_out --* pv_return_code_out - procedure return code ('0'=ok, '1'=warning, '2'=error). --* pv_message_out - optional output message. --* Called By prc_process_other, prc_process_consumption: --*************************************************************************************************** PROCEDURE prc_get_expense_coding ( --pv_istore_org_in IN csi_item_instances.attribute12%TYPE, pn_dflt_coding_flag_in IN NUMBER, --pn_account_id_in IN NUMBER, pv_client_in_out IN OUT om_assets.expense_client%TYPE, --csi_item_instances.attribute1%TYPE, pv_resp_in_out IN OUT om_assets.expense_responsibility%TYPE, --csi_item_instances.attribute2%TYPE, pv_service_in_out IN OUT om_assets.expense_service_line%TYPE, --csi_item_instances.attribute3%TYPE, pv_stob_in_out IN OUT om_assets.expense_stob%TYPE, --csi_item_instances.attribute4%TYPE, pv_project_in_out IN OUT om_assets.expense_project%TYPE, --csi_item_instances.attribute5%TYPE, pv_ccid_in_out IN OUT om_assets.expense_ccid%TYPE, --csi_item_instances.attribute6%TYPE, pv_default_expense_flag OUT NOCOPY VARCHAR2, pv_return_code_out OUT NOCOPY VARCHAR2, pv_message_out OUT NOCOPY VARCHAR2) IS v_message VARCHAR2(4000); -- BEGIN -- pv_return_code_out := '0'; pv_default_expense_flag := 'N'; -- -- -- If ccid is null and default coding flag is set, check for default coding. -- Otherwise, just return input code values. -- IF (pv_ccid_in_out IS NULL AND pn_dflt_coding_flag_in = 1) THEN -- /*IF (pn_account_id_in IS NULL) THEN -- can't find default coding without TCA account ID. pv_return_code_out := '1'; pv_message_out := 'Cannot look up default GL coding because TCA account ID is null.';*/ /* ELSIF (pv_istore_org_in IS NULL) THEN -- can't validate default coding without iStore org. pv_return_code_out := '1'; pv_message_out := 'Cannot validate default GL coding because iStore org is null.';*/ --ELSE om_utl.prc_get_default_gl_coding(--pn_account_id_in, pv_client_in_out, pv_resp_in_out, pv_service_in_out, pv_project_in_out, pv_return_code_out, v_message); -- IF (pv_return_code_out > '0') THEN pv_message_out := 'Failed to find default GL coding: ' || v_message; ELSE -- validate default coding. pv_default_expense_flag := 'Y'; /*pv_ccid_in_out := cas_om_utl.fn_get_ccid(pv_client_in_out, pv_resp_in_out, pv_service_in_out, pv_stob_in_out, pv_project_in_out, pv_istore_org_in);*/ --Temporary workaround pv_ccid_in_out := '12345'; IF (pv_ccid_in_out IS NULL) THEN pv_return_code_out := '1'; pv_message_out := 'Default GL coding is invalid.'; END IF; -- END IF; --END IF; END IF; -- ccid is null. -- -- EXCEPTION WHEN OTHERS THEN pv_return_code_out := '2'; pv_message_out := 'prc_get_expense_coding(): ' || SQLERRM; END prc_get_expense_coding; -- --*************************************************************************************************** --* Procedure : prc_process_other --* Purpose : Process recoveries for shared corporate functions in given recovery fiscal period. --* If the item instance has RECOVERY_STARTED=NO then recovery transactions will be --* generated for all outstanding periods. (i.e. from item_instance.recovery_start_date --* until end of given recovery period. --* Parameters: pv_recovery_type_in - type of recovery (i.e. COMMON). --* pv_recovery_period_in - period for which recoveries are generated (e.g. APR-08). --* pv_gl_period_in - GL period to which recoveries are posted (e.g. MAY-08). --* pn_set_of_books_id_in - set of books id (e.g. 16=BCGOV). --* pn_run_id_out - run id - generated by cas_interface_log package. --* pv_return_code_out - procedure return code ('0'=ok, '1'=warning, '2'=error). --* pv_message_out - optional output message. --* pn_dflt_coding_flag_in - optional input flag to use default coding if given coding is invalid. --* pn_trace_flag_in - optional input flag to enable tracing to cas_interface_logs. --* pn_validate_flag_in - optional flag to run validation checks only. --* pv_customer_type_in - optional customer type (M=Ministry, B=BPS, null=both). --* pn_owner_party_id_in - optional owner_party_id to limit rows for testing. --* pn_seof_rk_in - optional pn_seof_rk_in to limit rows for testing. --* Called By : --*************************************************************************************************** PROCEDURE prc_process_other( pv_recovery_type_in IN om_generic_table_details.key%TYPE, pv_recovery_period_in IN om_fin_periods.period_name%TYPE, pv_gl_period_in IN om_fin_periods.period_name%TYPE, pn_set_of_books_id_in IN om_fin_sets_of_books.set_of_books_id%TYPE, pn_run_id_out OUT NOCOPY om_interface_logs.run_id%TYPE, pv_return_code_out OUT NOCOPY VARCHAR2, pv_message_out OUT NOCOPY VARCHAR2, pn_dflt_coding_flag_in IN NUMBER DEFAULT 1, -- use default coding? pn_trace_flag_in IN NUMBER DEFAULT 0, pn_validate_flag_in IN NUMBER DEFAULT 0, pv_customer_type_in IN VARCHAR2 DEFAULT NULL, pn_owner_party_id_in IN om_assets.owner_party_id%TYPE DEFAULT NULL, pn_seof_rk_in IN om_assets.seof_rk%TYPE DEFAULT NULL ) IS -- -- define constant for procedure name; used in calls to CAS_INTERFACE_LOG package. c_procedure_name CONSTANT VARCHAR2(30) := 'prc_process_other'; -- -- cursor to select item instances to generate recovery transactions. -- -- Alert # 191418 n_om_recovery_start_flag_id NUMBER; n_om_bps_cost_centre_id NUMBER; n_om_recovery_start_date NUMBER; n_om_recovery_end_date NUMBER; n_om_system_recovery_method NUMBER; -- Alert 202659 - BCAS recoveries - wts party id parameter no longer required CURSOR cr_ib_recoveries(cv_period_start_date IN VARCHAR2, cv_period_end_date IN VARCHAR2, cv_recovery_frequency IN VARCHAR2, cv_recovery_method IN VARCHAR2) IS SELECT inst.* FROM (SELECT /*+ parallel (item_instance) parallel (sr) */ item_instance.aset_rk, item_instance.asset_reference, --item_instance.object_version_number, item_instance.seof_rk, --item_instance.inv_master_organization_id, --item_instance.last_vld_organization_id, item_instance.asset_tag, item_instance.orde_rk, seof.display_name, -- NVL(cas_ib_utl.fn_select_extended_attribute( item_instance.instance_id, n_cas_recovery_start_flag_id), 'NO') recovery_started, -- Alert # 191418 -- cas_ib_utl.fn_select_extended_attribute( item_instance.instance_id, n_cas_bps_cost_centre_id) bps_cost_centre, -- cas_ib_utl.fn_select_extended_attribute( item_instance.instance_id, n_cas_recovery_start_date) recovery_start_date, -- cas_ib_utl.fn_select_extended_attribute( item_instance.instance_id, n_cas_recovery_end_date) recovery_end_date, -- cas_ib_utl.fn_select_extended_attribute( item_instance.instance_id, n_cas_system_recovery_method) system_recovery_method, (SELECT NVL(MAX(asset_param_value), 'NO') FROM om.om_arp_values WHERE aset_rk = item_instance.aset_rk AND arpa_rk = n_om_recovery_start_flag_id) recovery_started, (SELECT MAX(asset_param_value) FROM om.om_arp_values WHERE aset_rk = item_instance.aset_rk AND arpa_rk = n_om_bps_cost_centre_id) bps_cost_centre, (SELECT MAX(asset_param_value) FROM om.om_arp_values WHERE aset_rk = item_instance.aset_rk AND arpa_rk = n_om_recovery_start_date) recovery_start_date, (SELECT MAX(asset_param_value) FROM om.om_arp_values WHERE aset_rk = item_instance.aset_rk AND arpa_rk = n_om_recovery_end_date) recovery_end_date, (SELECT MAX(asset_param_value) FROM om.om_arp_values WHERE aset_rk = item_instance.aset_rk AND arpa_rk = n_om_system_recovery_method) system_recovery_method, item_instance.quantity, item_instance.unit_of_measure, item_instance.expense_client, item_instance.expense_responsibility, item_instance.expense_service_line, item_instance.expense_stob, item_instance.expense_project, item_instance.expense_ccid, --item_instance.owner_party_id, --item_instance.owner_party_account_id, item_instance.description, --item_instance.attribute10 istore_org, item_instance.recovery_frequency, NVL(item_instance.order_price, '0') order_price, sr.service_receipt_status FROM om_assets item_instance, om_service_reciept sr, om_service_offerings seof WHERE item_instance.recovery_frequency = cv_recovery_frequency AND ((pv_customer_type_in = 'B' AND item_instance.owner_party_id IN (SELECT key FROM om.om_generic_table_details WHERE category = 'CAS_BPS_PARTY_IDS')) OR (pv_customer_type_in = 'M' AND item_instance.owner_party_id NOT IN (SELECT key FROM om.om_generic_table_details WHERE category = 'CAS_BPS_PARTY_IDS')) OR pv_customer_type_in IS NULL) AND (item_instance.owner_party_id = pn_owner_party_id_in OR pn_owner_party_id_in IS NULL) AND (item_instance.seof_rk = pn_seof_rk_in OR pn_seof_rk_in IS NULL) AND sr.aset_rk = item_instance.aset_rk AND sr.service_receipt_status IN ('RECEIVED', 'NOT REQUIRED', 'DEEMED RECEIVED') and item_instance.seof_rk = seof.seof_rk ) inst WHERE inst.system_recovery_method = cv_recovery_method AND inst.recovery_start_date < cv_period_end_date AND (inst.recovery_end_date >= cv_period_start_date OR inst.recovery_end_date IS NULL OR inst.recovery_started = 'NO' -- V 8.0. -- don't skip instances with non-null end date that precedes current recovery period. ) AND (pv_recovery_type_in = 'ONE TIME' AND inst.recovery_started = 'NO' OR pv_recovery_type_in != 'ONE TIME') ORDER BY seof_rk; -- -- Cursor to select periods for recovery transactions. -- -- NOTE: For ONE TIME recoveries (cv_recovery_frequency='ONE'), -- only one period will be processed (the period specified -- by the instance recovery dates). -- For other types (COMMON, MONTHLY) multiple periods -- are selected if recovery_started=NO. -- CURSOR cr_recovery_periods( cv_period_set_name IN VARCHAR2, cv_recovery_frequency IN VARCHAR2, cv_recovery_started IN VARCHAR2, cd_recovery_period_start_date IN DATE, cd_instance_period_start_date IN DATE, cd_instance_end_date IN DATE -- V 8.0. -- new parameter to support CASE statement below. ) IS SELECT period_name, period_year FROM om_fin_periods fipe, om_fin_period_sets fpse WHERE fpse.period_set_name = cv_period_set_name and fpse.fpse_rk = fipe.fpse_rk AND fipe.start_date >= TO_DATE( '01-APR-2007', 'dd-mon-yyyy') AND fipe.start_date <= CASE -- V 8.0. - avoid recovering beyond instance end date. WHEN (cv_recovery_frequency = 'ONE') THEN cd_instance_period_start_date ELSE CASE WHEN (cv_recovery_started = 'YES') THEN cd_recovery_period_start_date ELSE -- don't recover beyond instance end date. NVL(LEAST( cd_instance_end_date, cd_recovery_period_start_date), cd_recovery_period_start_date) END END AND fipe.start_date >= CASE WHEN (cv_recovery_started = 'NO') THEN cd_instance_period_start_date ELSE cd_recovery_period_start_date END AND fipe.period_name NOT LIKE 'ADJ%'; -- v_period_set_name om_fin_period_sets.period_set_name%TYPE; d_recovery_period_start_date om_fin_periods.start_date%TYPE; d_recovery_period_end_date om_fin_periods.end_date%TYPE; n_recovery_period_year om_fin_periods.period_year%TYPE; d_instance_period_start_date om_fin_periods.start_date%TYPE; d_instance_period_end_date om_fin_periods.end_date%TYPE; n_instance_period_year om_fin_periods.period_year%TYPE; n_prev_seof_rk om_service_offerings.seof_rk%TYPE := 0; v_item_name om_service_offerings.display_name%TYPE; v_unit_of_measure om_service_offerings.unit_of_measure%TYPE; n_order_price NUMBER; n_run_id om_interface_logs.run_id%TYPE; n_reco_rk om_recoveries.reco_rk%TYPE := 0; v_recovery_method om_generic_table_details.data1%TYPE; v_recovery_frequency om_generic_table_details.data2%TYPE; v_cust_class_cust_type om_generic_table_details.data1%TYPE; v_cust_class_recovery_method om_generic_table_details.data2%TYPE; v_recovery_price_source om_service_parameters.parameter_value%TYPE; v_colour om_service_parameters.parameter_value%TYPE; v_recovery_client om_assets.expense_client%TYPE; v_recovery_resp om_assets.expense_responsibility%TYPE; v_recovery_service om_assets.expense_service_line%TYPE; v_recovery_stob om_assets.expense_stob%TYPE; v_save_stob om_assets.expense_stob%TYPE; v_recovery_project om_assets.expense_project%TYPE; -- v_expense_client om_assets.expense_client%TYPE; v_expense_resp om_assets.expense_responsibility%TYPE; v_expense_service om_assets.expense_service_line%TYPE; v_expense_stob om_assets.expense_stob%TYPE; v_expense_project om_assets.expense_project%TYPE; v_expense_ccid om_assets.expense_ccid%TYPE; v_po_number om_order_details.cust_po_number%TYPE; v_default_expense_flag VARCHAR2(1); v_return_code VARCHAR2(1); v_message VARCHAR2(4000); --v_cost_centre_party_name hz_parties.party_name%TYPE; --v_customer_class_code hz_cust_accounts.customer_class_code%TYPE; --n_account_id hz_cust_accounts.cust_account_id%TYPE; --n_sda_account_id hz_cust_accounts.cust_account_id%TYPE; --v_account_number hz_cust_accounts.account_number%TYPE; --v_account_name hz_cust_accounts.account_name%TYPE; --v_ministry_code hz_cust_accounts.account_name%TYPE; -- WENDM - Feb 15 new fundiing model.START v_recovery_flag VARCHAR2(1); -- Recover Y or N -- WENDM - Feb 15 new fundiing model.END --n_party_id hz_cust_accounts.party_id%TYPE; --n_sda_party_id hz_cust_accounts.party_id%TYPE; --n_bill_to_address csi_ip_accounts.bill_to_address%TYPE; -- Alert 202659 - n_wts_party_id no longer required -- n_wts_party_id hz_parties.party_id%TYPE; -- -- numeric return code required for CAS_OM_UTL. n_return_code NUMBER; --t_attributes_tbl om_utl.tt_ib_update_tbl; -- -- The flags below indicate error conditions with item or item_instance that -- would prevent the recovery transaction from being processed successfully. -- Used when setting the transaction process_flag column. -- v_error_flag VARCHAR2(1); -- error (Y/N). v_price_error_flag VARCHAR2(1); -- price error (Y/N). V 10.0 - BL - Mar 6/09. v_recovery_insert_error VARCHAR2(1); v_recovery_date_error VARCHAR2(1); -- problem inserting recovery record (Y/N). n_error_count NUMBER := 0; -- number of records with a problem n_total_count NUMBER := 0; -- total number of consumption records processed n_existing_recovery_count NUMBER := 0; -- total number of recovery records skipped because a recovery record already exists v_process_flag om.om_recoveries.process_flag%TYPE; v_period_found VARCHAR2(1); -- (Y/N) at least one period found for the current instance. -- --- BEGIN -- -- Alert # 191418 n_om_recovery_start_flag_id := OM_utl.fn_get_arpa_rk('CAS_RECOVERY_START_FLAG'); n_om_bps_cost_centre_id := OM_utl.fn_get_arpa_rk('CAS_BPS_COST_CENTRE'); n_om_recovery_start_date := OM_utl.fn_get_arpa_rk('CAS_RECOVERY_START_DATE'); n_om_recovery_end_date := OM_utl.fn_get_arpa_rk('CAS_RECOVERY_END_DATE'); n_om_system_recovery_method := OM_utl.fn_get_arpa_rk('CAS_SYSTEM_RECOVERY_METHOD'); -- log start of recovery run -- om_log_batch_utl.prc_start_package( 'OM Recoveries', 'OM_RECOVER', gc_version_no, gc_version_dt, c_procedure_name, ' recovery type=' || pv_recovery_type_in || ' recovery_period=' || pv_recovery_period_in || ' gl_period=' || pv_gl_period_in || ' set_of_books_id=' || pn_set_of_books_id_in || ' trace=' || pn_trace_flag_in || ' validate=' || pn_validate_flag_in || ' customer_type=' || pv_customer_type_in || ' owner_party_id=' || pn_owner_party_id_in || ' seof_rk=' || pn_seof_rk_in ); -- -- get current run_id (entered on each IB_recovery row). -- n_run_id := om_interface_log.fn_run_id; pn_run_id_out := n_run_id; -- Alert 202659 - BCAS recoveries - move check for BPS party table to main procedure -- -- get recovery type info (i.e. recovery method and frequency). -- OM_utl.prc_select_recovery_type(pv_recovery_type_in, v_recovery_method, v_recovery_frequency, v_return_code, v_message); -- IF (v_return_code > 0) THEN raise_application_error( -20000, 'Error retrieving recovery method and frequency for recovery type ' || pv_recovery_type_in || ': ' || v_message); END IF; -- -- get info re: set of books -- OM_utl.prc_select_set_of_books(pn_set_of_books_id_in, v_period_set_name, v_return_code, v_message); -- IF (v_return_code > 0) THEN raise_application_error( -20000, 'Error retrieving set of books info for id=' || pn_set_of_books_id_in || ': ' || v_message); END IF; -- -- validate GL period name. -- IF (NOT fn_is_valid_period_name( v_period_set_name, pv_gl_period_in)) THEN raise_application_error( -20000, 'Invalid GL period name: ' || pv_gl_period_in); END IF; -- -- get recovery period start/end dates -- OM_utl.prc_get_gl_period_dates(v_period_set_name, UPPER(pv_recovery_period_in), d_recovery_period_start_date, d_recovery_period_end_date, n_recovery_period_year, v_return_code, v_message); -- IF (v_return_code > 0) THEN raise_application_error( -20000, 'Error retrieving period start/end dates for recovery period ' || pv_recovery_period_in || ': ' || v_message); END IF; -- IF (pn_trace_flag_in = 1) THEN om_interface_log.prc_log_trace( c_procedure_name, 'TRACE: executing cursor cr_ib_recoveries', 'Period=' || pv_recovery_period_in || ' period_start_date=' || TO_CHAR( d_recovery_period_start_date, 'YYYY/MM/DD') || ' period_end_date=' || TO_CHAR( d_recovery_period_end_date, 'YYYY/MM/DD') || ' method=' || v_recovery_method || ' frequency=' || v_recovery_frequency ); END IF; -- -- Loop through item instances to process recoveries. -- <<instance_loop>> FOR r_recovery IN cr_ib_recoveries(TO_CHAR( d_recovery_period_start_date, 'YYYY/MM/DD'), TO_CHAR( d_recovery_period_end_date, 'YYYY/MM/DD'), v_recovery_frequency, v_recovery_method -- cas_ib_utl.fn_get_party_id ('BPS') ) LOOP -- n_total_count := n_total_count + 1; -- v_error_flag := 'N'; -- initialize error flag. v_recovery_insert_error := 'N'; -- init insert error flag. v_recovery_date_error := 'N'; -- init date error flag. V 8.1. -- BEGIN -- V 8.1. -- log invalid recovery start date -- -- check for start date prior to beginning of fiscal 2008. -- IF (TO_DATE( r_recovery.recovery_start_date, 'yyyy/mm/dd hh24:mi:ss') < TO_DATE( '01-APR-2007', 'dd-mon-yyyy')) THEN om_log_batch_utl.prc_set_warning_on; om_interface_log.prc_log_warning( c_procedure_name, 'Recovery start date before beginning of fiscal 2008: ' || r_recovery.recovery_start_date, 'aset_rk=' || r_recovery.aset_rk, r_recovery.aset_rk ); v_error_flag := 'Y'; v_recovery_date_error := 'Y'; n_error_count := n_error_count + 1; END IF; -- -- check for start date not equal to first day of month. -- IF (SUBSTR(r_recovery.recovery_start_date, 9, 2) <> '01') THEN om_log_batch_utl.prc_set_warning_on; om_interface_log.prc_log_warning( c_procedure_name, 'Recovery start date not first day of month: ' || r_recovery.recovery_start_date, 'aset_rk=' || r_recovery.aset_rk, r_recovery.aset_rk ); v_error_flag := 'Y'; v_recovery_date_error := 'Y'; n_error_count := n_error_count + 1; END IF; -- EXCEPTION WHEN OTHERS THEN om_log_batch_utl.prc_set_warning_on; om_interface_log.prc_log_warning( c_procedure_name, 'Error when validating recovery start date ' || r_recovery.recovery_start_date || ': ' || SQLERRM, 'aset_rk=' || r_recovery.aset_rk, r_recovery.aset_rk ); v_error_flag := 'Y'; v_recovery_date_error := 'Y'; n_error_count := n_error_count + 1; END; -- BEGIN -- log invalid recovery end date -- -- check for end date not equal to last day of month. (Non-fatal error). -- IF (TO_DATE( r_recovery.recovery_end_date, 'yyyy/mm/dd hh24:mi:ss') <> LAST_DAY(TO_DATE( r_recovery.recovery_end_date, 'yyyy/mm/dd hh24:mi:ss'))) THEN om_log_batch_utl.prc_set_warning_on; om_interface_log.prc_log_warning( c_procedure_name, 'Recovery end date not last day of month: ' || r_recovery.recovery_end_date, 'aset_rk=' || r_recovery.aset_rk, r_recovery.aset_rk ); -- v_error_flag := 'Y'; -- v_recovery_date_error := 'Y'; -- n_error_count := n_error_count + 1; END IF; -- EXCEPTION WHEN OTHERS THEN om_log_batch_utl.prc_set_warning_on; om_interface_log.prc_log_warning( c_procedure_name, 'Error when validating recovery end date ' || r_recovery.recovery_end_date || ': ' || SQLERRM, 'aset_rk=' || r_recovery.aset_rk, r_recovery.aset_rk ); v_error_flag := 'Y'; v_recovery_date_error := 'Y'; n_error_count := n_error_count + 1; END; -- V 9.0. -- validate BPS Cost Centre party name begins with 'CC-'. -- /* IF (r_recovery.bps_cost_centre IS NOT NULL) THEN -- BEGIN SELECT party_name INTO v_cost_centre_party_name FROM ar.hz_parties WHERE party_id = r_recovery.bps_cost_centre; -- IF (SUBSTR(v_cost_centre_party_name, 1, 3) <> 'CC-') THEN om_log_batch_utl.prc_set_warning_on; om_interface_log.prc_log_warning( c_procedure_name, 'BPS cost centre party name does not begin with CC-: ' || v_cost_centre_party_name, 'aset_rk=' || r_recovery.aset_rk || ' bps_cost_centre=' || r_recovery.bps_cost_centre, r_recovery.aset_rk ); v_error_flag := 'Y'; n_error_count := n_error_count + 1; END IF; EXCEPTION WHEN OTHERS THEN om_log_batch_utl.prc_set_warning_on; om_interface_log.prc_log_warning( c_procedure_name, 'Error when validating BPS cost centre: ' || r_recovery.bps_cost_centre || ': ' || SQLERRM, 'aset_rk=' || r_recovery.aset_rk, r_recovery.aset_rk ); v_error_flag := 'Y'; n_error_count := n_error_count + 1; END; END IF; -- bps_cost_centre is not null. */ -- -- When seof_rk changes, get item name, recovery source and recovery coding. -- IF (r_recovery.seof_rk != n_prev_seof_rk) THEN -- -- get name of current item -- SELECT display_name item_name, unit_of_measure INTO v_item_name, v_unit_of_measure FROM om_service_offerings WHERE seof_rk = r_recovery.seof_rk; -- AND organization_id = r_recovery.inv_master_organization_id; -- -- get recovery price source for current item (i.e. ITEM or ORDER). -- v_recovery_price_source := OM_utl.fn_select_catalog_element( r_recovery.seof_rk, 'Recovery Price Source'); -- IF (v_recovery_price_source IS NULL) THEN -- log missing recovery price source om_log_batch_utl.prc_set_warning_on; om_interface_log.prc_log_warning(c_procedure_name, 'Item recovery price source is missing or blank; defaulted to ITEM ', 'seof_rk=' || r_recovery.seof_rk, r_recovery.aset_rk); -- END IF; -- v_colour := OM_utl.fn_select_catalog_element( r_recovery.seof_rk, 'Colour'); -- IF (v_colour IS NULL) THEN -- log missing colour om_log_batch_utl.prc_set_warning_on; om_interface_log.prc_log_warning(c_procedure_name, 'Item colour is missing or blank.', 'seof_rk=' || r_recovery.seof_rk, r_recovery.aset_rk); -- END IF; -- IF (pn_trace_flag_in = 1) THEN om_interface_log.prc_log_trace( c_procedure_name, 'TRACE: Processing seof_rk=' || r_recovery.seof_rk || ' (' || v_item_name || ') Recovery Price Source=' || v_recovery_price_source || ' Colour=' || v_colour); END IF; -- -- get recovery GL coding for current item -- OM_utl.prc_select_recovery_coding(r_recovery.seof_rk, v_recovery_client, v_recovery_resp, v_recovery_service, v_recovery_stob, v_recovery_project, v_return_code, v_message); -- -- save stob - may need to reset v_recovery_stob if it's changed for a BPS invoice recovery. v_save_stob := v_recovery_stob; -- IF (v_return_code > 0 OR v_recovery_client IS NULL OR v_recovery_resp IS NULL OR v_recovery_service IS NULL OR v_recovery_stob IS NULL OR v_recovery_project IS NULL) THEN -- log recovery coding error. om_interface_log.prc_log_warning(c_procedure_name, 'Recovery coding error: ' || v_message, 'seof_rk=' || r_recovery.seof_rk, r_recovery.aset_rk); om_log_batch_utl.prc_set_warning_on; v_error_flag := 'Y'; n_error_count := n_error_count + 1; -- END IF; -- IF (pn_trace_flag_in = 1) THEN om_interface_log.prc_log_trace( c_procedure_name, 'TRACE: recovery coding=' || v_recovery_client || '.' || v_recovery_resp || '.' || v_recovery_service || '.' || v_recovery_stob || '.' || v_recovery_project, r_recovery.seof_rk ); -- END IF; -- n_prev_seof_rk := r_recovery.seof_rk; -- ELSE -- reset recovery stob in case it's been changed for a BPS invoice recovery. v_recovery_stob := v_save_stob; -- END IF; -- new seof_rk. -- -- get customer info (TCA account and party). -- /* OM_utl.prc_select_customer_info(r_recovery.aset_rk, v_customer_class_code, n_account_id, v_account_number, v_account_name, n_party_id, n_bill_to_address, v_return_code, v_message); -- */ IF (v_return_code > 0) THEN -- log failure to retrieve customer info. om_log_batch_utl.prc_set_warning_on; om_interface_log.prc_log_warning( c_procedure_name, 'Failed to retrieve customer class and/or TCA account/party info: ' || v_message, 'aset_rk= ' || r_recovery.aset_rk || /*' TCA Account ID=' || TO_CHAR(n_account_id) || ' customer class=' || v_customer_class_code,*/ r_recovery.aset_rk ); -- v_error_flag := 'Y'; n_error_count := n_error_count + 1; -- --v_ministry_code := ''; -- /* ELSE -- check customer class consistent with customer type input parameter. -- Alert 202659 - BCAS recoveries IF (fn_isbps(r_recovery.owner_party_id) = 1 AND v_customer_class_code NOT LIKE 'PUBLIC_SECTOR%' OR fn_isbps(r_recovery.owner_party_id) = 0 AND v_customer_class_code NOT LIKE 'MINISTRY%') THEN -- log inconsistency between owner_party and cust_class. om_log_batch_utl.prc_set_warning_on; om_interface_log.prc_log_warning( c_procedure_name, 'Owner party_id ' || r_recovery.owner_party_id || ' is inconsistent with customer class ' || v_customer_class_code, 'aset_rk= ' || r_recovery.aset_rk || ' TCA Account ID=' || TO_CHAR(n_account_id), r_recovery.aset_rk ); -- v_error_flag := 'Y'; n_error_count := n_error_count + 1; -- END IF;*/ -- parse ministry code from TCA name. Get the string between the two dashes. -- This is used to check for 'WTS' when setting the recovery process flag. /* v_ministry_code := SUBSTR(v_account_name, 5, INSTR(v_account_name, '-', 5) - 5); --------------------------------------------------------------------------------------------- -- WENDM get recovery flag using cust_account_id, cust_account_number and cust_account name -- returned from the above lookup. Return upper case Y or N. -- Colour BLUE is hardcoded for now but can be putin cas_generci tables. -- All records with PROCESS_FLAG of W in om_recoveries will be ignored by recovery JV process. IF v_ministry_code = 'WTS' THEN v_recovery_flag := 'W'; ELSIF (SUBSTR(v_customer_class_code, 1, 8) = 'MINISTRY') THEN v_recovery_flag := fn_get_recovery_flag(n_account_id, v_account_number, v_account_name, v_colour); ELSE v_recovery_flag := 'I'; END IF; -- -- IF (SUBSTR(v_customer_class_code, 1, 8) != 'MINISTRY') THEN -- default SDA account ID to owner_party account ID for non-ministry customers. n_sda_account_id := r_recovery.owner_party_account_id; n_sda_party_id := r_recovery.owner_party_id; -- -- check for BPS customer type and replace recovery stob if necessary. -- IF (fn_is_bps (v_customer_class_code) ) THEN IF (v_customer_class_code = 'PUBLIC_SECTOR_INVOICED') THEN OM_utl.prc_get_bps_recoveries_stob(r_recovery.aset_rk, v_recovery_stob, v_return_code, v_message); -- IF (v_return_code > '0') THEN om_log_batch_utl.prc_set_warning_on; om_interface_log.prc_log_warning( c_procedure_name, 'Failed to find BPS recovery STOB for BPS customer: ' || v_message, 'aset_rk= ' || r_recovery.aset_rk || ' customer class=' || v_customer_class_code, r_recovery.aset_rk ); -- -- default recovery stob if not found. v_recovery_stob := fn_get_default_recovery_stob; --(v_customer_class_code); --temporary work around END IF; END IF; -- ELSE -- -- get SDA party and account for TCA account. -- OM_utl.prc_get_sda_ministry(n_account_id, n_sda_party_id, n_sda_account_id, v_return_code, v_message); -- IF (v_return_code > 0) THEN -- log failure to retrieve SDA account. om_log_batch_utl.prc_set_warning_on; om_interface_log.prc_log_warning( c_procedure_name, 'Failed to retrieve SDA account: ' || v_message, 'aset_rk= ' || r_recovery.aset_rk || ' TCA account ID=' || n_account_id || ' cust class=' || v_customer_class_code, r_recovery.aset_rk ); END IF; END IF;*/ -- END IF; -- TCA account found. -- -- Extrace GL coding from item instance. -- It may change if it's invalid. v_expense_client := r_recovery.expense_client; v_expense_resp := r_recovery.expense_responsibility; v_expense_service := r_recovery.expense_service_line; v_expense_stob := r_recovery.expense_stob; v_expense_project := r_recovery.expense_project; v_expense_ccid := r_recovery.expense_ccid; -- /*om_recover.prc_get_expense_coding(--r_recovery.istore_org, pn_dflt_coding_flag_in, --n_account_id, v_expense_client, v_expense_resp, v_expense_service, v_expense_stob, v_expense_project, v_expense_ccid, v_default_expense_flag, v_return_code, v_message); */ -- IF (v_expense_ccid IS NULL) THEN -- reset client, resp, svc, proj, which could now be null. v_expense_client := r_recovery.expense_client; v_expense_resp := r_recovery.expense_responsibility; v_expense_service := r_recovery.expense_service_line; v_expense_project := r_recovery.expense_project; -- -- log invalid code combination for non-invoiced records (V6). -- /* IF (v_customer_class_code != 'PUBLIC_SECTOR_INVOICED') THEN om_log_batch_utl.prc_set_warning_on; om_interface_log.prc_log_warning( c_procedure_name, 'Invalid expense GL code combination: ' || v_message, 'GL coding: ' || v_expense_client || '.' || v_expense_resp || '.' || v_expense_service || '.' || v_expense_stob || '.' || v_expense_project || ' default coding=' || v_default_expense_flag || ' class=' || v_customer_class_code, r_recovery.aset_rk ); v_error_flag := 'Y'; n_error_count := n_error_count + 1; END IF;*/ -- END IF; -- v_po_number := fn_get_po_number(r_recovery.orde_rk); -- -- write trace record to log if trace flag is on. -- IF (pn_trace_flag_in = 1) THEN om_interface_log.prc_log_trace( c_procedure_name, 'TRACE: aset_rk=' || r_recovery.aset_rk || ' recovery_started=' || r_recovery.recovery_started || ' service_receipt_status=' || r_recovery.service_receipt_status || ' recovery start=' || TO_CHAR(d_recovery_period_start_date) || ' expense coding=' || v_expense_client || '.' || v_expense_resp || '.' || v_expense_service || '.' || v_expense_stob || '.' || v_expense_project || ':' || v_expense_ccid || ' default coding=' || v_default_expense_flag, NULL, r_recovery.aset_rk ); END IF; -- -- Create om_recoveries. If RECOVERY_STARTED=NO, then generate recoveries for -- all outstanding periods (exception for ONE TIME recoveries). IF (pn_trace_flag_in = 1) THEN om_interface_log.prc_log_trace( c_procedure_name, 'TRACE: period cursor params', 'frequency=' || v_recovery_frequency || ' r_recovery.recovery_started=' || r_recovery.recovery_started || ' d_recovery_period_start_date=' || d_recovery_period_start_date || ' r_recovery.recovery_start_date=' || r_recovery.recovery_start_date ); END IF; -- v_period_found := 'N'; -- -- execute period loop only if no errors in recovery_start_date. IF (v_recovery_date_error = 'N') THEN -- V 8.1. -- <<period_loop>> FOR r_period IN cr_recovery_periods(v_period_set_name, v_recovery_frequency, r_recovery.recovery_started, d_recovery_period_start_date, TO_DATE( r_recovery.recovery_start_date, 'YYYY/MM/DD hh24:mi:ss'), TO_DATE( r_recovery.recovery_end_date, 'YYYY/MM/DD hh24:mi:ss') -- V 8.0. -- new parameter to support modified CASE statement in query. ) LOOP -- v_period_found := 'Y'; -- period loop executed at least once. Used below before updated extended attributes. -- v_price_error_flag := 'N'; -- initialize price error flag. -- IF (pn_trace_flag_in = 1) THEN om_interface_log.prc_log_trace( c_procedure_name, 'TRACE: aset_rk=' || r_recovery.aset_rk || ' period=' || r_period.period_name); END IF; -- -- get next reco_rk, if necessary. -- IF (pn_validate_flag_in = 0) THEN -- V5. -- --SELECT cas_ib_recovery_id_seq.NEXTVAL INTO n_recovery_id FROM DUAL; SELECT RECO_RK_SEQ.NEXTVAL INTO n_reco_rk FROM DUAL; -- END IF; -- -- get item price if necessary - may be different for each recovery period. -- IF (v_recovery_price_source = 'ORDER') THEN n_order_price := TO_NUMBER(NVL(r_recovery.order_price, '0')); -- log warning if order price is 0. IF (n_order_price = 0) THEN om_interface_log.prc_log_warning(c_procedure_name, 'Order price is zero.', 'aset_rk=' || r_recovery.aset_rk, r_recovery.aset_rk, n_reco_rk); END IF; /*ELSE -- recovery price source defaults to ITEM if not found. -- OM_utl.prc_get_item_price(r_recovery.seof_rk, v_customer_class_code, r_period.period_name, v_period_set_name, n_price, v_return_code, v_message); -- IF (v_return_code > 0 AND v_customer_class_code IS NOT NULL) THEN om_interface_log.prc_log_warning( c_procedure_name, 'Item price error: ' || v_message, 'seof_rk=' || r_recovery.seof_rk || ' customer_class_code=' || v_customer_class_code || ' period=' || r_period.period_name, r_recovery.aset_rk, n_reco_rk ); om_log_batch_utl.prc_set_warning_on; v_price_error_flag := 'Y'; -- V 10 - BL - Mar 6/09. n_error_count := n_error_count + 1; n_price := 0; ELSIF (n_price = 0) THEN om_interface_log.prc_log_warning(c_procedure_name, 'Item price is zero. (' || v_item_name || ')', 'aset_rk=' || r_recovery.aset_rk, r_recovery.aset_rk, n_reco_rk); END IF; -- -- check for potentially incorrect price source. -- IF (NVL(r_recovery.order_price, 0) > 0 AND n_price = 0) THEN om_interface_log.prc_log_warning( c_procedure_name, 'Price source is ITEM but order price is non-null: ' || r_recovery.order_price || ' (' || v_item_name || ')', 'aset_rk=' || r_recovery.aset_rk, r_recovery.aset_rk, n_reco_rk ); END IF;*/ -- END IF; -- -- log zero amount -- -- IF (ROUND (r_recovery.quantity * n_price, 2) = 0) THEN -- cas_interface_log.prc_log_warning (c_procedure_name, 'Amount is zero.', 'instance_id=' || r_recovery.instance_id, -- r_recovery.instance_id, n_reco_rk); -- END IF; -- IF (r_period.period_year != n_recovery_period_year) THEN -- V7. -- log previous fiscal recovery record. -- SELECT DECODE( v_price_error_flag, -- V 10.0 - BL - Mar 6/09. 'Y', 'E', DECODE( v_error_flag, 'Y', 'E', /*DECODE( v_ministry_code, 'WTS', 'W',*/ DECODE(v_recovery_flag, 'W', 'W', DECODE(SIGN(n_recovery_period_year - r_period.period_year), 0, 'I', 'F')) ) ) -- ) INTO v_process_flag FROM DUAL; -- om_interface_log.prc_log_info( c_procedure_name, 'Previous fiscal period ' || r_period.period_name || ', flag=' || v_process_flag, 'aset_rk=' || r_recovery.aset_rk, r_recovery.aset_rk, n_reco_rk ); END IF; -- IF (pn_validate_flag_in = 0) THEN -- V5. -- -- Insert recovery record. -- BEGIN INSERT INTO OM_recoveries(reco_rk, --org_id, run_id, set_of_books_id, gl_period_name, recovery_period_name, seof_rk, --inv_master_organization_id, --aset_rk, asset_reference, consumption_id, adjustment_id, quantity, order_price, unit_of_measure, amount, recovery_type, expense_client, expense_responsibility, expense_service_line, expense_stob, expense_project, expense_ccid, default_expense_flag, recovery_client, recovery_responsibility, recovery_service_line, recovery_stob, recovery_project, /*owner_party_id, owner_party_account_id, tca_party_id, tca_account_id, tca_account_name, bill_to_site, bps_cost_centre, sda_party_id, sda_account_id,*/ display_name, --customer_type, --customer_type, colour, asset_tag, order_po_number, --orde_rk, process_flag, --created_by, cre_user, cre_tmstmp, --creation_date, upd_user, --last_updated_by, upd_tmstmp) --last_updated_date) VALUES (n_reco_rk, /*NVL(r_recovery.last_vld_organization_id, r_recovery.inv_master_organization_id),*/ n_run_id, pn_set_of_books_id_in, UPPER(pv_gl_period_in), r_period.period_name, r_recovery.seof_rk, /*r_recovery.inv_master_organization_id, r_recovery.aset_rk,*/ r_recovery.asset_reference, NULL, NULL, r_recovery.quantity, n_order_price, v_unit_of_measure, ROUND( r_recovery.quantity * n_order_price, 2), pv_recovery_type_in, v_expense_client, v_expense_resp, v_expense_service, v_expense_stob, v_expense_project, v_expense_ccid, v_default_expense_flag, v_recovery_client, v_recovery_resp, v_recovery_service, v_recovery_stob, v_recovery_project, /*r_recovery.owner_party_id, r_recovery.owner_party_account_id, n_party_id, n_account_id, v_account_name, n_bill_to_address, r_recovery.bps_cost_centre, NVL(n_sda_party_id, r_recovery.owner_party_id), NVL(n_sda_account_id, r_recovery.owner_party_account_id),*/ r_recovery.display_name, /*v_customer_class_code,*/ v_colour, r_recovery.asset_tag, v_po_number, --r_recovery.orde_rk, -- DECODE (v_error_flag, 'Y', 'E', DECODE (v_ministry_code, 'WTS', 'W', 'I') ), DECODE(v_price_error_flag, -- V 10.0 - BL - Mar 6/09. 'Y', 'E', DECODE(v_error_flag, 'Y', 'E', /*DECODE(v_ministry_code, 'WTS', 'W',*/ DECODE(v_recovery_flag, 'W', 'W', DECODE(SIGN(n_recovery_period_year - r_period.period_year), 0, 'I', 'F')))), --), /*om_common_utl.fn_get_user_id('BATCH')*/'BATCH', SYSDATE, 'BATCH'/*om_common_utl.fn_get_user_id('BATCH')*/, SYSDATE); -- EXCEPTION WHEN DUP_VAL_ON_INDEX THEN n_existing_recovery_count := n_existing_recovery_count + 1; IF (pn_trace_flag_in = 1) THEN om_interface_log.prc_log_trace( c_procedure_name, 'Duplicate recovery record: ' || SQLERRM, 'aset_rk=' || r_recovery.aset_rk || ' recovery_type=' || pv_recovery_type_in || ' recovery_period=' || r_period.period_name, r_recovery.aset_rk, n_reco_rk ); END IF; WHEN OTHERS THEN om_interface_log.prc_log_warning( c_procedure_name, 'Recovery record insert error: ' || SQLERRM, 'aset_rk=' || r_recovery.aset_rk || ' recovery_type=' || pv_recovery_type_in || ' recovery_period=' || r_period.period_name, r_recovery.aset_rk, n_reco_rk ); om_log_batch_utl.prc_set_warning_on; v_recovery_insert_error := 'Y'; n_error_count := n_error_count + 1; END; -- END IF; -- validate=0. -- END LOOP period_loop; END IF; -- no errors in recovery start/end dates. -- -- Update the recovery_started attribute only if there was no error when inserting a -- recovery record for the current item instance. -- IF (v_recovery_insert_error = 'N' AND v_period_found = 'Y' -- V 8.0. AND r_recovery.recovery_started = 'NO' AND pn_validate_flag_in = 0) THEN -- V5. -- -- initialize extended attribute update table (passed to CAS_OM_UTL.cas_update_ib_attributes). /* t_attributes_tbl(1).column_name := 'recovery_started_flag'; t_attributes_tbl(1).update_value := 'YES'; -- IF (pv_recovery_type_in = 'ONE TIME') THEN -- create extended attribute for recovery ID. t_attributes_tbl(2).column_name := 'reco_rk'; t_attributes_tbl(2).update_value := TO_CHAR(n_reco_rk); -- END IF;*/ -- BEGIN -- update recovery_started flag for this item instance. /* cas_om_utl.cas_update_ib_attributes(r_recovery.aset_rk, --r_recovery.object_version_number, NULL, -- context not required when only updating extended attribute. t_attributes_tbl, n_return_code, v_message); -- */ IF (n_return_code > 0) THEN om_interface_log.prc_log_warning( c_procedure_name, 'Error encountered when updating item instance Recovery Started flag: ' || v_message, r_recovery.aset_rk ); om_log_batch_utl.prc_set_warning_on; END IF; -- EXCEPTION WHEN OTHERS THEN om_interface_log.prc_log_warning(c_procedure_name, 'IB update unexpected error: ' || SQLERRM, NULL, r_recovery.aset_rk); om_log_batch_utl.prc_set_warning_on; END; END IF; -- recovery_started = NO and not pre-validation run, at least one period processed. -- END LOOP instance_loop; -- om_interface_log.prc_log_info( c_procedure_name, 'Rows processed: ' || TO_CHAR(n_total_count)); om_interface_log.prc_log_info( c_procedure_name, 'Errors: ' || TO_CHAR(n_error_count)); om_interface_log.prc_log_info( c_procedure_name, 'Existing recoveries: ' || TO_CHAR(n_existing_recovery_count)); -- om_log_batch_utl.prc_set_normal_end_of_package(c_procedure_name, pv_return_code_out, pv_message_out); -- EXCEPTION WHEN OTHERS THEN om_interface_log.prc_log_info( c_procedure_name, 'Rows processed: ' || TO_CHAR(n_total_count)); om_interface_log.prc_log_info( c_procedure_name, 'Errors: ' || TO_CHAR(n_error_count)); om_interface_log.prc_log_info( c_procedure_name, 'Existing recoveries: ' || TO_CHAR(n_existing_recovery_count)); om_interface_log.prc_log_error( c_procedure_name, 'prc_process_other(): unexpected error: ' || SQLERRM); om_log_batch_utl.prc_set_error_on; om_log_batch_utl.prc_set_error_end_of_package(c_procedure_name, pv_return_code_out, pv_message_out); END prc_process_other; /* -- --*************************************************************************************************** --* Procedure : prc_process_consumption --* Purpose : Process consumption recoveries for given recovery fiscal period. --* If the item instance has RECOVERY_STARTED=NO then recovery transactions will be --* generated for all outstanding periods. (i.e. from item_instance.recovery_start_date --* until end of given recovery period. --* Parameters: pv_recovery_period_in - period for which recoveries are generated (e.g. APR-08). --* pv_gl_period_in - GL period to which recoveries are posted (e.g. MAY-08). --* pn_set_of_books_id_in - set of books id (e.g. 16=BCGOV). --* pn_run_id_out - run id - generated by cas_interface_log package. --* pv_return_code_out - procedure return code ('0'=ok, '1'=warning, '2'=error). --* pv_message_out - optional output message. --* pn_dflt_coding_flag_in - optional input flag to use default coding if given coding is invalid. --* pn_trace_flag_in - optional input flag to enable tracing to cas_interface_logs. --* pn_validate_flag_in - optional flag to run validation checks only. --* pv_customer_type_in - optional customer type (M=Ministry, B=BPS, null=both). --* pn_owner_party_id_in - optional owner_party_id to limit rows for testing. --* pn_seof_rk_in - optional pn_inventory_item_id_in to limit rows for testing. --* Called By : --*************************************************************************************************** PROCEDURE prc_process_consumption(pv_recovery_period_in IN gl_periods.period_name%TYPE, pv_gl_period_in IN gl_periods.period_name%TYPE, pn_set_of_books_id_in IN gl_sets_of_books.set_of_books_id%TYPE, pn_run_id_out OUT NOCOPY cas_interface_logs.run_id%TYPE, pv_return_code_out OUT NOCOPY VARCHAR2, pv_message_out OUT NOCOPY VARCHAR2, pn_dflt_coding_flag_in IN NUMBER, pn_trace_flag_in IN NUMBER, pn_validate_flag_in IN NUMBER, pv_customer_type_in IN VARCHAR2, pn_owner_party_id_in IN csi_item_instances.owner_party_id%TYPE -- pn_inventory_item_id_in IN csi_item_instances.inventory_item_id%TYPE ) IS -- -- Alert # 191418 n_cas_bps_cost_centre NUMBER; -- define constant for procedure name; used in calls to CAS_INTERFACE_LOG package. c_procedure_name CONSTANT VARCHAR2(30) := 'prc_process_consumption'; -- -- cursor to select item instances to generate recovery transactions. -- -- Alert 202659 - party_id parameter no longer required CURSOR cr_ib_recoveries( --cn_wts_party_id IN hz_parties.party_id%TYPE, cd_period_end_date IN DATE) IS SELECT cons.consumption_id, cons.consumption_period_name, item_instance.instance_id, item_instance.instance_number, item_instance.object_version_number, item_instance.inventory_item_id, cons.inventory_item_id cons_item_id, item_instance.inv_master_organization_id, item_instance.last_vld_organization_id, item_instance.external_reference, item_instance.last_oe_order_line_id, -- cas_ib_utl.fn_select_extended_attribute( item_instance.instance_id, n_cas_bps_cost_centre) -- bps_cost_centre, -- Alert # 191418 (SELECT MAX(attribute_value) FROM om.om_arp_values WHERE instance_id = item_instance.instance_id AND attribute_id = n_cas_bps_cost_centre) bps_cost_centre, cons.quantity, item_instance.unit_of_measure, item_instance.attribute1 expense_client, item_instance.attribute2 expense_responsibility, item_instance.attribute3 expense_service_line, item_instance.attribute4 expense_stob, item_instance.attribute5 expense_project, item_instance.attribute6 expense_ccid, item_instance.owner_party_id, item_instance.owner_party_account_id, item_instance.attribute7 description, item_instance.attribute10 istore_org, item_instance.attribute12 recovery_frequency, item_instance.attribute13 order_price FROM cas_ib_consumption cons, csi_item_instances item_instance, cas_ib_service_receipt sr WHERE cons.recovery_status = 'PENDING' AND cons.consumption_period <= cd_period_end_date AND item_instance.instance_id = cons.instance_id AND ((pv_customer_type_in = 'B' AND item_instance.owner_party_id IN (SELECT key FROM casint.cas_generic_table_details WHERE category = 'CAS_BPS_PARTY_IDS')) OR (pv_customer_type_in = 'M' AND item_instance.owner_party_id NOT IN (SELECT key FROM casint.cas_generic_table_details WHERE category = 'CAS_BPS_PARTY_IDS')) OR pv_customer_type_in IS NULL) AND sr.instance_id = item_instance.instance_id AND sr.service_receipt_status IN ('RECEIVED', 'NOT REQUIRED', 'DEEMED RECEIVED') ORDER BY cons.inventory_item_id; -- d_recovery_period_start_date gl_periods.start_date%TYPE; d_recovery_period_end_date gl_periods.end_date%TYPE; n_recovery_period_year gl_periods.period_year%TYPE; n_cons_period_year gl_periods.period_year%TYPE; v_period_set_name gl_periods.period_set_name%TYPE; n_recovery_id cas_ib_recoveries.recovery_id%TYPE; -- v_service mtl_descr_element_values.element_value%TYPE; -- v_service_family mtl_descr_element_values.element_value%TYPE; -- v_service_group mtl_descr_element_values.element_value%TYPE; -- v_service_category mtl_descr_element_values.element_value%TYPE; -- v_ccid csi_item_instances.attribute6%TYPE; v_default_expense_flag VARCHAR2(1) := 'N'; -- v_customer_info_rc VARCHAR2 (1); -- v_customer_info_msg VARCHAR2 (4000); -- v_sda_account_rc VARCHAR2 (1); -- v_sda_account_msg VARCHAR2 (4000); -- v_recovery_price_rc VARCHAR2 (1); -- v_recovery_price_msg VARCHAR2 (4000); v_process_flag cascsi.cas_ib_recoveries.process_flag%TYPE; v_return_code VARCHAR2(1); v_message VARCHAR2(4000); v_customer_class_code hz_cust_accounts.customer_class_code%TYPE; n_account_id hz_cust_accounts.cust_account_id%TYPE; n_sda_account_id hz_cust_accounts.cust_account_id%TYPE; v_account_number hz_cust_accounts.account_number%TYPE; v_account_name hz_cust_accounts.account_name%TYPE; v_ministry_code hz_cust_accounts.account_name%TYPE; -- WENDM - Feb 15 new fundiing model.START v_recovery_flag VARCHAR2(1); -- Recover Y or N -- WENDM - Feb 15 new fundiing model.END n_party_id hz_cust_accounts.party_id%TYPE; n_sda_party_id hz_cust_accounts.party_id%TYPE; n_bill_to_address csi_ip_accounts.bill_to_address%TYPE; -- -- v_recovery_coding_rc VARCHAR2 (1); -- v_recovery_coding_msg VARCHAR2 (4000); v_recovery_client csi_item_instances.attribute1%TYPE; v_recovery_resp csi_item_instances.attribute2%TYPE; v_recovery_service csi_item_instances.attribute3%TYPE; v_recovery_stob csi_item_instances.attribute4%TYPE; v_save_stob csi_item_instances.attribute4%TYPE; v_recovery_project csi_item_instances.attribute5%TYPE; -- v_expense_client csi_item_instances.attribute1%TYPE; v_expense_resp csi_item_instances.attribute2%TYPE; v_expense_service csi_item_instances.attribute3%TYPE; v_expense_stob csi_item_instances.attribute4%TYPE; v_expense_project csi_item_instances.attribute5%TYPE; v_expense_ccid csi_item_instances.attribute6%TYPE; v_po_number oe_order_headers_all.cust_po_number%TYPE; -- v_recovery_price_source mtl_descr_element_values.element_value%TYPE; v_colour mtl_descr_element_values.element_value%TYPE; v_reporting_uom mtl_descr_element_values.element_value%TYPE; v_item_name mtl_system_items_b.segment1%TYPE; v_item_uom mtl_system_items_b.primary_uom_code%TYPE; n_prev_inventory_item_id mtl_system_items_b.inventory_item_id%TYPE := 0; n_price NUMBER; n_run_id cas_interface_logs.run_id%TYPE; -- Alert 202659 - n_wts_party_id no longer required -- n_wts_party_id hz_parties.party_id%TYPE; -- -- The flags below indicate error conditions with item or item_instance that -- would prevent the recovery transaction from being processed successfully. -- Used when setting the transaction process_flag column. -- v_error_flag VARCHAR2(1); -- problem with item (Y/N). n_error_count NUMBER := 0; -- number of records with a problem n_total_count NUMBER := 0; -- total number of consumption records processed -- BEGIN -- -- Alert # 191418 n_cas_bps_cost_centre := cas_ib_utl.fn_get_attribute_id('CAS_BPS_COST_CENTRE'); -- log start of recovery run -- cas_log_batch_utl.prc_start_package( 'CAS IB Recoveries', 'CAS_IB_RECOVER', gc_version_no, gc_version_dt, c_procedure_name, ' recovery type=Consumption recovery_period=' || pv_recovery_period_in || ' gl_period=' || pv_gl_period_in || ' set_of_books_id=' || pn_set_of_books_id_in || ' trace=' || pn_trace_flag_in || ' validate=' || pn_validate_flag_in || ' customer_type=' || pv_customer_type_in || ' owner_party_id=' || pn_owner_party_id_in -- || ' inventory_item_id=' -- || pn_inventory_item_id_in ); -- -- get current run_id (entered on each IB_recovery row). -- n_run_id := cas_interface_log.fn_run_id; pn_run_id_out := n_run_id; -- Alert 202659 - BCAS recoveries - move check for BPS party table to main procedure -- -- get info re: set of books -- cas_ib_utl.prc_select_set_of_books(pn_set_of_books_id_in, v_period_set_name, v_return_code, v_message); -- IF (v_return_code > 0) THEN raise_application_error( -20000, 'Error retrieving set of books info for id=' || pn_set_of_books_id_in || ': ' || v_message); END IF; -- -- validate GL period name. -- IF (NOT fn_is_valid_period_name( v_period_set_name, pv_gl_period_in)) THEN raise_application_error( -20000, 'Invalid GL period name: ' || pv_gl_period_in); END IF; -- -- get recovery period start/end dates -- cas_ib_utl.prc_get_gl_period_dates(v_period_set_name, UPPER(pv_recovery_period_in), d_recovery_period_start_date, d_recovery_period_end_date, n_recovery_period_year, v_return_code, v_message); -- IF (v_return_code > 0) THEN raise_application_error( -20000, 'Error retrieving period start/end dates for recovery period ' || pv_recovery_period_in || ': ' || v_message); END IF; -- -- Loop through consumption records to process recoveries. -- <<instance_loop>> -- Alert 202659 - n_wts_party_id parameter no longer required FOR r_recovery IN cr_ib_recoveries(d_recovery_period_end_date) LOOP -- n_total_count := n_total_count + 1; -- v_error_flag := 'N'; -- initialize item instance error flag. n_price := 0; -- initialize price -- -- When inventory_item_id changes, get item name, recovery source and recovery coding. -- IF (r_recovery.cons_item_id != n_prev_inventory_item_id) THEN -- v_error_flag := 'N'; -- reset item error flag. -- -- get name of current item -- SELECT segment1 item_name, primary_uom_code INTO v_item_name, v_item_uom FROM mtl_system_items_b WHERE inventory_item_id = r_recovery.cons_item_id AND organization_id = r_recovery.inv_master_organization_id; -- -- get recovery price source for current item (i.e. ITEM or ORDER). -- v_recovery_price_source := cas_ib_utl.fn_select_catalog_element( r_recovery.cons_item_id, 'Recovery Price Source'); -- IF (v_recovery_price_source IS NULL) THEN -- log missing recovery price source cas_log_batch_utl.prc_set_warning_on; cas_interface_log.prc_log_warning( c_procedure_name, 'Item recovery price source is missing or blank; defaulted to ITEM ', 'instance_id=' || r_recovery.instance_id || ' inventory_item_id=' || r_recovery.cons_item_id, r_recovery.consumption_id ); END IF; -- v_colour := cas_ib_utl.fn_select_catalog_element( r_recovery.cons_item_id, 'Colour'); -- IF (v_colour IS NULL) THEN -- log missing colour cas_log_batch_utl.prc_set_warning_on; cas_interface_log.prc_log_warning(c_procedure_name, 'Item colour is missing or blank.', 'inventory_item_id=' || r_recovery.inventory_item_id, r_recovery.consumption_id); -- END IF; -- IF (pn_trace_flag_in = 1) THEN cas_interface_log.prc_log_trace( c_procedure_name, 'TRACE: Processing inventory_item_id=' || r_recovery.cons_item_id || ' (' || v_item_name || ') Recovery Price Source=' || v_recovery_price_source || ' Reporting UOM=' || v_reporting_uom || ' Colour=' || v_colour, 'instance_id=' || r_recovery.instance_id || ' inventory_item_id=' || r_recovery.cons_item_id ); END IF; -- -- get recovery GL coding for current item -- cas_ib_utl.prc_select_recovery_coding(r_recovery.cons_item_id, v_recovery_client, v_recovery_resp, v_recovery_service, v_recovery_stob, v_recovery_project, v_return_code, v_message); -- -- save stob - may need to reset v_recovery_stob if it's changed for a BPS invoice recovery. v_save_stob := v_recovery_stob; -- IF (v_return_code > 0 OR v_recovery_client IS NULL OR v_recovery_resp IS NULL OR v_recovery_service IS NULL OR v_recovery_stob IS NULL OR v_recovery_project IS NULL) THEN -- log recovery coding error. cas_interface_log.prc_log_warning( c_procedure_name, 'Recovery coding error: ' || v_message, 'instance_id=' || r_recovery.instance_id || ' inventory_item_id=' || r_recovery.cons_item_id, r_recovery.consumption_id ); cas_log_batch_utl.prc_set_warning_on; v_error_flag := 'Y'; n_error_count := n_error_count + 1; END IF; -- IF (pn_trace_flag_in = 1) THEN cas_interface_log.prc_log_trace( c_procedure_name, 'TRACE: recovery coding=' || v_recovery_client || '.' || v_recovery_resp || '.' || v_recovery_service || '.' || v_recovery_stob || '.' || v_recovery_project); -- END IF; -- n_prev_inventory_item_id := r_recovery.cons_item_id; -- ELSE -- reset recovery stob in case it's been changed for a BPS invoice recovery. v_recovery_stob := v_save_stob; -- END IF; -- new inventory_item_id. -- -- get customer info -- cas_ib_utl.prc_select_customer_info(r_recovery.instance_id, v_customer_class_code, n_account_id, v_account_number, v_account_name, n_party_id, n_bill_to_address, v_return_code, v_message); -- IF (v_return_code > 0) THEN -- log failure to retrieve customer info. cas_log_batch_utl.prc_set_warning_on; cas_interface_log.prc_log_warning( c_procedure_name, 'Failed to retrieve customer class and/or TCA account/party info: ' || v_message, 'instance_id= ' || r_recovery.instance_id || ' TCA Account ID=' || TO_CHAR(n_account_id) || ' customer class=' || v_customer_class_code, r_recovery.consumption_id ); v_error_flag := 'Y'; n_error_count := n_error_count + 1; -- v_ministry_code := ''; -- ELSE -- check customer class consistent with customer type input parameter. -- Alert 202659 - new function fn_isbps() used to determine if party is BPS IF (fn_isbps(r_recovery.owner_party_id) = 1 AND v_customer_class_code NOT LIKE 'PUBLIC_SECTOR%' OR fn_isbps(r_recovery.owner_party_id) = 0 AND v_customer_class_code NOT LIKE 'MINISTRY%') THEN -- log inconsistency between owner_party and cust_class. cas_log_batch_utl.prc_set_warning_on; cas_interface_log.prc_log_warning( c_procedure_name, 'Owner party_id ' || r_recovery.owner_party_id || ' is inconsistent with customer class ' || v_customer_class_code, 'instance_id= ' || r_recovery.instance_id || ' TCA Account ID=' || TO_CHAR(n_account_id), r_recovery.consumption_id ); -- v_error_flag := 'Y'; n_error_count := n_error_count + 1; -- END IF; -- parse ministry code from TCA name. Get the string between the two dashes. -- This is used to check for 'WTS' when setting the recovery process flag. v_ministry_code := SUBSTR(v_account_name, 5, INSTR(v_account_name, '-', 5) - 5); --------------------------------------------------------------------------------------------- -- WENDM get recovery flag using cust_account_id, cust_account_number and cust_account name -- returned from the above lookup. Return upper case Y or N. -- Colour BLUE is hardcoded for now but can be putin cas_generci tables. -- All records with PROCESS_FLAG of W in cas_ib_recoveries will be ignored by recovery JV process. IF v_ministry_code = 'WTS' THEN v_recovery_flag := 'W'; ELSIF (SUBSTR(v_customer_class_code, 1, 8) = 'MINISTRY') THEN v_recovery_flag := fn_get_recovery_flag(n_account_id, v_account_number, v_account_name, v_colour); ELSE v_recovery_flag := 'I'; END IF; -- -- IF (SUBSTR(v_customer_class_code, 1, 8) != 'MINISTRY') THEN -- default SDA account ID to owner_party account ID for non-ministry customers. n_sda_account_id := r_recovery.owner_party_account_id; n_sda_party_id := r_recovery.owner_party_id; -- -- check for BPS customer type and replace recovery stob if necessary. -- IF (fn_is_bps (v_customer_class_code) ) THEN IF (v_customer_class_code = 'PUBLIC_SECTOR_INVOICED') THEN cas_ib_utl.prc_get_bps_recoveries_stob(r_recovery.instance_id, v_recovery_stob, v_return_code, v_message); -- IF (v_return_code > '0') THEN cas_log_batch_utl.prc_set_warning_on; cas_interface_log.prc_log_warning( c_procedure_name, 'Failed to find BPS recovery STOB for BPS customer: ' || v_message, 'instance_id= ' || r_recovery.instance_id || ' customer class=' || v_customer_class_code, r_recovery.consumption_id ); -- -- default recovery stob if not found. v_recovery_stob := fn_get_default_recovery_stob(v_customer_class_code); END IF; END IF; ELSE -- -- get SDA party and account for TCA account. -- cas_ib_utl.prc_get_sda_ministry(n_account_id, n_sda_party_id, n_sda_account_id, v_return_code, v_message); -- IF (v_return_code > 0) THEN -- log failure to retrieve SDA account. -- v_error_flag := 'Y'; cas_log_batch_utl.prc_set_warning_on; cas_interface_log.prc_log_warning( c_procedure_name, 'Failed to retrieve SDA account: ' || v_message, 'instance_id= ' || r_recovery.instance_id || ' TCA account ID=' || n_account_id, r_recovery.consumption_id ); -- n_error_count := n_error_count + 1; END IF; END IF; -- END IF; -- -- Extrace GL coding from item instance. -- It may change if it's invalid. v_expense_client := r_recovery.expense_client; v_expense_resp := r_recovery.expense_responsibility; v_expense_service := r_recovery.expense_service_line; v_expense_stob := r_recovery.expense_stob; v_expense_project := r_recovery.expense_project; v_expense_ccid := r_recovery.expense_ccid; -- prc_get_expense_coding(r_recovery.istore_org, pn_dflt_coding_flag_in, n_account_id, v_expense_client, v_expense_resp, v_expense_service, v_expense_stob, v_expense_project, v_expense_ccid, v_default_expense_flag, v_return_code, v_message); -- IF (v_expense_ccid IS NULL) THEN -- reset client, resp, svc, proj, which could now be null. v_expense_client := r_recovery.expense_client; v_expense_resp := r_recovery.expense_responsibility; v_expense_service := r_recovery.expense_service_line; v_expense_project := r_recovery.expense_project; -- IF (v_customer_class_code != 'PUBLIC_SECTOR_INVOICED') THEN -- log invalid code combination for non-invoiced records. cas_log_batch_utl.prc_set_warning_on; cas_interface_log.prc_log_warning( c_procedure_name, 'Invalid expense GL code combination: ' || v_message || ' ' || v_expense_client || '.' || v_expense_resp || '.' || v_expense_service || '.' || v_expense_stob || '.' || v_expense_project || ' default coding=' || v_default_expense_flag, r_recovery.consumption_id ); v_error_flag := 'Y'; n_error_count := n_error_count + 1; END IF; -- END IF; -- v_po_number := fn_get_po_number(r_recovery.last_oe_order_line_id); -- -- write trace record to log if trace flag is on. -- IF (pn_trace_flag_in = 1) THEN cas_interface_log.prc_log_trace( c_procedure_name, 'TRACE: instance_id=' || r_recovery.instance_id || ' expense coding=' || r_recovery.expense_client || '.' || r_recovery.expense_responsibility || '.' || r_recovery.expense_service_line || '.' || r_recovery.expense_stob || '.' || r_recovery.expense_project || ':' || r_recovery.expense_ccid); END IF; -- -- get item price -- IF (v_recovery_price_source = 'ORDER') THEN n_price := TO_NUMBER(NVL(r_recovery.order_price, '0')); -- log warning if order price is 0. IF (n_price = 0) THEN cas_interface_log.prc_log_warning(c_procedure_name, 'Order price is zero.', 'instance_id=' || r_recovery.instance_id, r_recovery.consumption_id, n_recovery_id); END IF; ELSE -- v_recovery_price_source = 'ITEM'. cas_ib_utl.prc_get_item_price(r_recovery.cons_item_id, v_customer_class_code, r_recovery.consumption_period_name, v_period_set_name, n_price, v_return_code, v_message); -- IF (v_return_code > 0 AND v_customer_class_code IS NOT NULL) THEN cas_interface_log.prc_log_warning( c_procedure_name, 'Item price error: ' || v_message, 'instance_id=' || r_recovery.instance_id || 'inventory_item_id=' || r_recovery.cons_item_id || ' customer_class_code=' || v_customer_class_code || ' period=' || r_recovery.consumption_period_name, r_recovery.consumption_id, n_recovery_id ); cas_log_batch_utl.prc_set_warning_on; v_error_flag := 'Y'; n_error_count := n_error_count + 1; n_price := 0; ELSIF (n_price = 0) THEN cas_interface_log.prc_log_warning(c_procedure_name, 'Item price is zero. (' || v_item_name || ')', 'instance_id=' || r_recovery.instance_id, r_recovery.consumption_id, n_recovery_id); END IF; -- -- check for potentially incorrect price source. -- IF (NVL(r_recovery.order_price, 0) > 0 AND n_price = 0) THEN cas_interface_log.prc_log_warning( c_procedure_name, 'Price source is ITEM but order price is non-null: ' || r_recovery.order_price || ' (' || v_item_name || ')', 'instance_id=' || r_recovery.instance_id, r_recovery.consumption_id, n_recovery_id ); END IF; END IF; -- -- log zero amount -- -- IF (ROUND (r_recovery.quantity * n_price, 2) = 0) THEN -- cas_interface_log.prc_log_warning (c_procedure_name, 'Amount is zero.', 'instance_id=' || r_recovery.instance_id, -- r_recovery.instance_id, n_recovery_id); -- END IF; -- -- -- get consumption period year - compare with recovery period year - flag previous fiscal items. -- SELECT period_year INTO n_cons_period_year FROM gl.gl_periods glp WHERE glp.period_set_name = v_period_set_name AND glp.period_name = r_recovery.consumption_period_name; -- IF (n_cons_period_year != n_recovery_period_year) THEN -- V7. -- -- log previous fiscal recovery record. -- SELECT DECODE( v_error_flag, 'Y', 'E', DECODE( v_ministry_code, 'WTS', 'W', DECODE(v_recovery_flag, 'W', 'W', DECODE(SIGN(n_recovery_period_year - n_cons_period_year), 0, 'I', 'F')) ) ) INTO v_process_flag FROM DUAL; -- cas_interface_log.prc_log_info( c_procedure_name, 'Previous fiscal period ' || r_recovery.consumption_period_name || ', flag=' || v_process_flag, 'instance_id=' || r_recovery.instance_id || ' inventory_item_id=' || r_recovery.cons_item_id, r_recovery.consumption_id, n_recovery_id ); END IF; -- IF (pn_validate_flag_in = 0) THEN -- V5. -- -- get next recovery_id. -- SELECT cas_ib_recovery_id_seq.NEXTVAL INTO n_recovery_id FROM DUAL; -- -- insert recovery record. -- BEGIN INSERT INTO cas_ib_recoveries(recovery_id, org_id, run_id, set_of_books_id, gl_period_name, recovery_period_name, inventory_item_id, inv_master_organization_id, instance_id, instance_number, consumption_id, adjustment_id, quantity, price, item_uom, amount, recovery_type, expense_client, expense_responsibility, expense_service_line, expense_stob, expense_project, expense_ccid, default_expense_flag, recovery_client, recovery_responsibility, recovery_service_line, recovery_stob, recovery_project, owner_party_id, owner_party_account_id, tca_party_id, tca_account_id, tca_account_name, bill_to_site, bps_cost_centre, sda_party_id, sda_account_id, display_name, customer_class, colour, external_reference, order_po_number, last_oe_order_line_id, process_flag, created_by, creation_date, last_updated_by, last_updated_date) VALUES ( n_recovery_id, NVL(r_recovery.last_vld_organization_id, r_recovery.inv_master_organization_id), n_run_id, pn_set_of_books_id_in, UPPER(pv_gl_period_in), r_recovery.consumption_period_name, r_recovery.cons_item_id, r_recovery.inv_master_organization_id, r_recovery.instance_id, r_recovery.instance_number, r_recovery.consumption_id, NULL, r_recovery.quantity, n_price, v_item_uom, ROUND( r_recovery.quantity * n_price, 2), 'CGI', v_expense_client, v_expense_resp, v_expense_service, v_expense_stob, v_expense_project, v_expense_ccid, v_default_expense_flag, v_recovery_client, v_recovery_resp, v_recovery_service, v_recovery_stob, v_recovery_project, r_recovery.owner_party_id, r_recovery.owner_party_account_id, n_party_id, n_account_id, v_account_name, n_bill_to_address, r_recovery.bps_cost_centre, NVL(n_sda_party_id, r_recovery.owner_party_id), NVL(n_sda_account_id, r_recovery.owner_party_account_id), r_recovery.display_name, v_customer_class_code, v_colour, r_recovery.external_reference, v_po_number, r_recovery.last_oe_order_line_id, -- DECODE (v_error_flag, 'Y', 'E', DECODE (v_ministry_code, 'WTS', 'W', 'I') ), DECODE(v_error_flag, 'Y', 'E', DECODE(v_ministry_code, 'WTS', 'W', DECODE(v_recovery_flag, 'W', 'W', DECODE(SIGN(n_recovery_period_year - n_cons_period_year), 0, 'I', 'F')))), cas_common_utl.fn_get_user_id('BATCH'), SYSDATE, cas_common_utl.fn_get_user_id('BATCH'), SYSDATE ); -- -- update consumption record status -- UPDATE cas_ib_consumption SET recovery_status = 'RECOVERED', recovery_id = n_recovery_id, last_updated_by = cas_common_utl.fn_get_user_id('BATCH'), last_update_date = SYSDATE WHERE consumption_id = r_recovery.consumption_id; -- EXCEPTION WHEN OTHERS THEN cas_interface_log.prc_log_warning( c_procedure_name, SQLERRM, 'instance_id=' || r_recovery.instance_id || ' recovery_period=' || r_recovery.consumption_period_name, r_recovery.consumption_id ); cas_log_batch_utl.prc_set_warning_on; v_error_flag := 'Y'; n_error_count := n_error_count + 1; END; END IF; -- not validate -- END LOOP instance_loop; -- cas_interface_log.prc_log_info( c_procedure_name, 'Rows processed: ' || TO_CHAR(n_total_count) || ' Errors: ' || TO_CHAR(n_error_count)); -- cas_log_batch_utl.prc_set_normal_end_of_package(c_procedure_name, pv_return_code_out, pv_message_out); -- EXCEPTION WHEN OTHERS THEN cas_interface_log.prc_log_error( c_procedure_name, 'Consumption recoveries unexpected error: ' || SQLERRM); cas_log_batch_utl.prc_set_error_on; cas_log_batch_utl.prc_set_error_end_of_package(c_procedure_name, pv_return_code_out, pv_message_out); END prc_process_consumption; */ /* -- --*************************************************************************************************** --* Procedure : prc_process_credits --* Purpose : Process credits for cancelled monthly instances in the given recovery period. --* Parameters: pv_recovery_period_in - period for which recoveries are generated (e.g. APR-08). --* pv_gl_period_in - GL period to which recoveries are posted (e.g. MAY-08). --* pn_set_of_books_id_in - set of books id (e.g. 16=BCGOV). --* pn_run_id_out - run id - generated by cas_interface_log package. --* pv_return_code_out - procedure return code ('0'=ok, '1'=warning, '2'=error). --* pv_message_out - optional output message. --* pn_trace_flag_in - optional input flag to enable tracing to cas_interface_logs. --* pn_validate_flag_in - optional flag to run validation checks only. --* pv_customer_type_in - optional customer type (M=Ministry, B=BPS, null=both). --*************************************************************************************************** PROCEDURE prc_process_credits(pv_recovery_period_in IN gl_periods.period_name%TYPE, pv_gl_period_in IN gl_periods.period_name%TYPE, pn_set_of_books_id_in IN gl_sets_of_books.set_of_books_id%TYPE, pn_run_id_out OUT NOCOPY cas_interface_logs.run_id%TYPE, pv_return_code_out OUT NOCOPY VARCHAR2, pv_message_out OUT NOCOPY VARCHAR2, pn_trace_flag_in IN NUMBER, pn_validate_flag_in IN NUMBER, pv_customer_type_in IN VARCHAR2) IS -- -- define constant for procedure name; used in calls to CAS_INTERFACE_LOG package. c_procedure_name CONSTANT VARCHAR2(30) := 'prc_process_credits'; -- -- cursor to select item instances to generate recovery transactions. -- -- Alert 202659 - wts_party_id parameter no longer required CURSOR cr_credit_recoveries(cv_period_set_name IN VARCHAR2) IS SELECT --/*+ parallel (eav_cancel 4) parallel (ii 4) parallel (eav_enddt 4) parallel (pd 4) *\ -- changed back slash to forward slash pd.period_year, ii.object_version_number, r.* FROM csi.csi_i_extended_attribs ea_cancel, om.om_arp_values eav_cancel, csi.csi_item_instances ii, (SELECT eav.instance_id, eav.attribute_value enddt FROM csi.csi_i_extended_attribs ea_enddt, om.om_arp_values eav WHERE ea_enddt.attribute_code = 'CAS_RECOVERY_END_DATE' AND eav.attribute_id = ea_enddt.attribute_id AND eav.attribute_value LIKE '2%') eav_enddt, cascsi.cas_ib_recoveries r, gl.gl_periods pd WHERE ea_cancel.attribute_code = 'CAS_CANCEL_IB_INSTANCE' AND eav_cancel.attribute_id = ea_cancel.attribute_id AND ii.instance_id = eav_cancel.instance_id AND ((pv_customer_type_in = 'B' AND ii.owner_party_id IN (SELECT key FROM casint.cas_generic_table_details WHERE category = 'CAS_BPS_PARTY_IDS')) OR (pv_customer_type_in = 'M' AND ii.owner_party_id NOT IN (SELECT key FROM casint.cas_generic_table_details WHERE category = 'CAS_BPS_PARTY_IDS')) OR pv_customer_type_in IS NULL) AND eav_enddt.instance_id = ii.instance_id AND r.instance_id = ii.instance_id AND r.process_flag IN ('I', 'P') AND r.recovery_type = 'MONTHLY' AND pd.period_name = r.recovery_period_name AND pd.period_set_name = cv_period_set_name AND pd.end_date > TO_DATE( eav_enddt.enddt, 'YYYY/MM/DD hh24:mi:ss') AND NOT EXISTS (SELECT 'x' FROM cascsi.cas_ib_recoveries r2 WHERE r2.original_recovery_id = r.recovery_id AND r2.recovery_type IN ('REVERSAL', 'CREDIT')) AND NOT EXISTS (SELECT 'x' FROM csi.csi_i_extended_attribs ea_cr, om.om_arp_values eav WHERE ea_cr.attribute_code = 'CAS_RECOVERY_CREDIT_STATUS' AND eav.attribute_id = ea_cr.attribute_id AND eav.instance_id = r.instance_id AND eav.attribute_value = 'YES') ORDER BY r.instance_id, pd.end_date; -- d_recovery_period_start_date gl_periods.start_date%TYPE; d_recovery_period_end_date gl_periods.end_date%TYPE; n_recovery_period_year gl_periods.period_year%TYPE; v_process_flag cascsi.cas_ib_recoveries.process_flag%TYPE; -- -- numeric return code required for CAS_OM_UTL. n_return_code NUMBER; t_attributes_tbl cas_om_utl.tt_ib_update_tbl; -- v_message VARCHAR2(4000); v_return_code VARCHAR2(1); v_period_set_name gl_periods.period_set_name%TYPE; n_recovery_id cas_ib_recoveries.recovery_id%TYPE; n_run_id cas_interface_logs.run_id%TYPE; -- Alert 202659 - n_wts_party_id no longer required -- n_wts_party_id hz_parties.party_id%TYPE; -- track previous instance ID and update CAS_RECOVERY_CREDIT_STATUS attribute when ID changes. n_prev_instance_id csi_item_instances.instance_id%TYPE := 0; -- n_error_count NUMBER := 0; -- number of records with a problem. n_total_count NUMBER := 0; -- total number of consumption records processed. -- BEGIN -- -- log start of recovery run -- cas_log_batch_utl.prc_start_package( 'CAS IB Recoveries', 'CAS_IB_RECOVER', gc_version_no, gc_version_dt, c_procedure_name, ' recovery type=CREDIT recovery_period=' || pv_recovery_period_in || ' gl_period=' || pv_gl_period_in || ' set_of_books_id=' || pn_set_of_books_id_in || ' trace=' || pn_trace_flag_in || ' validate=' || pn_validate_flag_in || ' customer_type=' || pv_customer_type_in ); -- -- get current run_id (entered on each IB_recovery row). -- n_run_id := cas_interface_log.fn_run_id; pn_run_id_out := n_run_id; -- -- Alert 202659 - BCAS recoveries - move check for BPS party table to main procedure -- -- get info re: set of books -- cas_ib_utl.prc_select_set_of_books(pn_set_of_books_id_in, v_period_set_name, v_return_code, v_message); -- IF (v_return_code > 0) THEN raise_application_error( -20000, 'Error retrieving set of books info for id=' || pn_set_of_books_id_in || ': ' || v_message); END IF; -- -- validate GL period name. -- IF (NOT fn_is_valid_period_name( v_period_set_name, pv_gl_period_in)) THEN raise_application_error( -20000, 'Invalid GL period name: ' || pv_gl_period_in); END IF; -- -- get recovery period start/end dates -- cas_ib_utl.prc_get_gl_period_dates(v_period_set_name, UPPER(pv_recovery_period_in), d_recovery_period_start_date, d_recovery_period_end_date, n_recovery_period_year, v_return_code, v_message); -- IF (v_return_code > 0) THEN raise_application_error( -20000, 'Error retrieving period start/end dates for recovery period ' || pv_recovery_period_in || ': ' || v_message); END IF; -- -- Loop through credit records to process credit recoveries. -- <<instance_loop>> -- Alert 202659 - wts_party_id parameter no longer required FOR r_recovery IN cr_credit_recoveries(v_period_set_name) LOOP -- n_total_count := n_total_count + 1; IF (pn_trace_flag_in = 1) THEN cas_interface_log.prc_log_trace( c_procedure_name, 'TRACE: Processing recovery_id=' || r_recovery.recovery_id || ' instance_id=' || r_recovery.instance_id || ' amount=' || r_recovery.amount); END IF; -- -- get credit period year - compare with input recovery period year - flag previous fiscal items. -- IF (r_recovery.period_year != n_recovery_period_year) THEN -- -- log previous fiscal recovery record. -- v_process_flag := 'F'; -- cas_interface_log.prc_log_info( c_procedure_name, 'Previous fiscal period ' || r_recovery.recovery_period_name || ', flag=' || v_process_flag, 'instance_id=' || r_recovery.instance_id || ' original recovery_id=' || r_recovery.recovery_id, r_recovery.instance_id, n_recovery_id ); ELSE v_process_flag := 'I'; END IF; -- IF (pn_validate_flag_in = 0) THEN -- -- get next recovery_id. -- SELECT cas_ib_recovery_id_seq.NEXTVAL INTO n_recovery_id FROM DUAL; -- -- insert recovery record. -- BEGIN INSERT INTO cas_ib_recoveries(recovery_id, org_id, run_id, set_of_books_id, gl_period_name, recovery_period_name, inventory_item_id, inv_master_organization_id, instance_id, instance_number, consumption_id, adjustment_id, quantity, price, item_uom, amount, recovery_type, expense_client, expense_responsibility, expense_service_line, expense_stob, expense_project, expense_ccid, default_expense_flag, recovery_client, recovery_responsibility, recovery_service_line, recovery_stob, recovery_project, owner_party_id, owner_party_account_id, tca_party_id, tca_account_id, tca_account_name, bill_to_site, bps_cost_centre, sda_party_id, sda_account_id, display_name, customer_class, colour, external_reference, order_po_number, last_oe_order_line_id, process_flag, created_by, creation_date, last_updated_by, last_updated_date, original_recovery_id) VALUES (n_recovery_id, r_recovery.org_id, n_run_id, r_recovery.set_of_books_id, UPPER(pv_gl_period_in), r_recovery.recovery_period_name, r_recovery.inventory_item_id, r_recovery.inv_master_organization_id, r_recovery.instance_id, r_recovery.instance_number, r_recovery.consumption_id, r_recovery.adjustment_id, -r_recovery.quantity, r_recovery.price, r_recovery.item_uom, -r_recovery.amount, 'CREDIT', r_recovery.expense_client, r_recovery.expense_responsibility, r_recovery.expense_service_line, r_recovery.expense_stob, r_recovery.expense_project, r_recovery.expense_ccid, r_recovery.default_expense_flag, r_recovery.recovery_client, r_recovery.recovery_responsibility, r_recovery.recovery_service_line, r_recovery.recovery_stob, r_recovery.recovery_project, r_recovery.owner_party_id, r_recovery.owner_party_account_id, r_recovery.tca_party_id, r_recovery.tca_account_id, r_recovery.tca_account_name, r_recovery.bill_to_site, r_recovery.bps_cost_centre, r_recovery.sda_party_id, r_recovery.sda_account_id, r_recovery.display_name, r_recovery.customer_class, r_recovery.colour, r_recovery.external_reference, r_recovery.order_po_number, r_recovery.last_oe_order_line_id, v_process_flag, cas_common_utl.fn_get_user_id('BATCH'), SYSDATE, cas_common_utl.fn_get_user_id('BATCH'), SYSDATE, r_recovery.recovery_id); -- -- EXCEPTION WHEN OTHERS THEN cas_interface_log.prc_log_warning( c_procedure_name, SQLERRM, 'instance_id=' || r_recovery.instance_id || ' recovery_period=' || r_recovery.recovery_period_name || ' original recovery_id=' || r_recovery.recovery_id, r_recovery.instance_id, n_recovery_id ); cas_log_batch_utl.prc_set_warning_on; n_error_count := n_error_count + 1; END; -- IF (pn_trace_flag_in = 1) THEN cas_interface_log.prc_log_trace( c_procedure_name, 'Credit issued', 'instance_id=' || r_recovery.instance_id || ' original recovery_id=' || r_recovery.recovery_id, r_recovery.instance_id, n_recovery_id ); END IF; -- IF (r_recovery.instance_id <> n_prev_instance_id) THEN -- -- initialize extended attribute update table (passed to CAS_OM_UTL.cas_update_ib_attributes). t_attributes_tbl(1).column_name := 'cas_recovery_credit_status'; -- V 8.2. t_attributes_tbl(1).update_value := 'YES'; -- BEGIN -- update recovery_credits flag for this item instance. cas_om_utl.cas_update_ib_attributes(r_recovery.instance_id, r_recovery.object_version_number, NULL, -- context not required when only updating extended attribute. t_attributes_tbl, n_return_code, v_message); -- IF (n_return_code > 0) THEN cas_interface_log.prc_log_warning( c_procedure_name, 'Error encountered when updating item instance Recovery Credit status attribute: ' || v_message, NULL, r_recovery.instance_id ); cas_log_batch_utl.prc_set_warning_on; ELSE cas_interface_log.prc_log_info(c_procedure_name, 'Status updated', NULL, r_recovery.instance_id); END IF; -- EXCEPTION WHEN OTHERS THEN cas_interface_log.prc_log_warning(c_procedure_name, 'IB update unexpected error: ' || SQLERRM, NULL, r_recovery.instance_id, n_recovery_id); cas_log_batch_utl.prc_set_warning_on; END; -- n_prev_instance_id := r_recovery.instance_id; -- END IF; -- next instance_id. END IF; -- not validate. -- END LOOP instance_loop; -- cas_interface_log.prc_log_info( c_procedure_name, 'Rows processed: ' || TO_CHAR(n_total_count) || ' Errors: ' || TO_CHAR(n_error_count)); -- cas_log_batch_utl.prc_set_normal_end_of_package(c_procedure_name, pv_return_code_out, pv_message_out); -- EXCEPTION WHEN OTHERS THEN cas_interface_log.prc_log_error( c_procedure_name, 'Credit recoveries unexpected error: ' || SQLERRM); cas_log_batch_utl.prc_set_error_on; cas_log_batch_utl.prc_set_error_end_of_package(c_procedure_name, pv_return_code_out, pv_message_out); END prc_process_credits; */ /* -- --*************************************************************************************************** --* Procedure : prc_process_adjustments --* Purpose : Process adjustment recoveries. --* Parameters: pv_gl_period_in - GL period to which recoveries are posted (e.g. MAY-08). --* pn_set_of_books_id_in - set of books id (e.g. 16=BCGOV). --* pn_run_id_out - run id - generated by cas_interface_log package. --* pv_return_code_out - procedure return code ('0'=ok, '1'=warning, '2'=error). --* pv_message_out - optional output message. --* pn_dflt_coding_flag_in - optional input flag to use default coding if given coding is invalid. --* pn_trace_flag_in - optional input flag to enable tracing to cas_interface_logs. --* Called By : --*************************************************************************************************** PROCEDURE prc_process_adjustments(pv_recovery_period_in IN gl_periods.period_name%TYPE, pv_gl_period_in IN gl_periods.period_name%TYPE, pn_set_of_books_id_in IN gl_sets_of_books.set_of_books_id%TYPE, pn_run_id_out OUT NOCOPY cas_interface_logs.run_id%TYPE, pv_return_code_out OUT NOCOPY VARCHAR2, pv_message_out OUT NOCOPY VARCHAR2, pn_dflt_coding_flag_in IN NUMBER, pn_trace_flag_in IN NUMBER, pv_customer_type_in IN VARCHAR2) IS -- -- define constant for procedure name; used in calls to CAS_INTERFACE_LOG package. c_procedure_name CONSTANT VARCHAR2(30) := 'prc_process_adjustments'; -- -- Alert # 191418 n_cas_bps_cost_centre NUMBER; -- cursor to loop through pending adjustments. -- Each pending adjustment record is first expanded into one record for each period in the period range. -- Alert 202659 - wts_party_id parameter no longer required CURSOR cr_adjustments IS SELECT adj.adjustment_id, adj.instance_id FROM cas_ib_adjustments adj, csi.csi_item_instances item_instance WHERE adj.recovery_status = 'PENDING' AND item_instance.instance_id = adj.instance_id AND ((pv_customer_type_in = 'B' AND item_instance.owner_party_id IN (SELECT key FROM casint.cas_generic_table_details WHERE category = 'CAS_BPS_PARTY_IDS')) OR (pv_customer_type_in = 'M' AND item_instance.owner_party_id NOT IN (SELECT key FROM casint.cas_generic_table_details WHERE category = 'CAS_BPS_PARTY_IDS')) OR pv_customer_type_in IS NULL); -- -- cursor to loop through adjustment recovery records to generate recovery transactions. -- CURSOR cr_adj_recoveries(cn_adjustment_id IN cas_ib_adjustments.adjustment_id%TYPE) IS SELECT adj.override_price, adjr.adj_recovery_id, adjr.recovery_period_name, item_instance.instance_id, item_instance.instance_number, item_instance.object_version_number, item_instance.inventory_item_id, item_instance.inv_master_organization_id, item_instance.last_vld_organization_id, item_instance.external_reference, item_instance.last_oe_order_line_id, -- cas_ib_utl.fn_select_extended_attribute( item_instance.instance_id, n_cas_bps_cost_centre) bps_cost_centre, -- Alert # 191418 (SELECT MAX(attribute_value) FROM om.om_arp_values WHERE instance_id = item_instance.instance_id AND attribute_id = n_cas_bps_cost_centre) bps_cost_centre, adj.adjustment_quantity, item_instance.unit_of_measure, item_instance.attribute1 expense_client, item_instance.attribute2 expense_responsibility, item_instance.attribute3 expense_service_line, item_instance.attribute4 expense_stob, item_instance.attribute5 expense_project, item_instance.attribute6 expense_ccid, item_instance.owner_party_id, item_instance.owner_party_account_id, item_instance.attribute7 description, item_instance.attribute10 istore_org, item_instance.attribute12 recovery_frequency, item_instance.attribute13 order_price FROM cas_ib_adjustments adj, cas_ib_adj_recoveries adjr, csi_item_instances item_instance WHERE adj.adjustment_id = cn_adjustment_id AND adjr.adjustment_id = adj.adjustment_id AND item_instance.instance_id = adj.instance_id AND adjr.recovery_id IS NULL -- ignore if already processed. This would only occur when restarting after aborted run. -- V 9.0. ORDER BY adjr.adj_recovery_id; -- v_period_set_name gl_periods.period_set_name%TYPE; n_recovery_period_year gl_periods.period_year%TYPE; n_adj_period_year gl_periods.period_year%TYPE; v_process_flag cascsi.cas_ib_recoveries.process_flag%TYPE; n_recovery_id cas_ib_recoveries.recovery_id%TYPE; v_default_expense_flag VARCHAR2(1) := 'N'; v_return_code VARCHAR2(1); v_message VARCHAR2(4000); v_customer_class_code hz_cust_accounts.customer_class_code%TYPE; n_account_id hz_cust_accounts.cust_account_id%TYPE; n_sda_account_id hz_cust_accounts.cust_account_id%TYPE; v_account_number hz_cust_accounts.account_number%TYPE; v_account_name hz_cust_accounts.account_name%TYPE; v_ministry_code hz_cust_accounts.account_name%TYPE; -- WENDM - Feb 15 new fundiing model.START v_recovery_flag VARCHAR2(1); -- Recover Y or N -- WENDM - Feb 15 new fundiing model.END n_party_id hz_cust_accounts.party_id%TYPE; n_sda_party_id hz_cust_accounts.party_id%TYPE; n_bill_to_address csi_ip_accounts.bill_to_address%TYPE; -- v_recovery_client csi_item_instances.attribute1%TYPE; v_recovery_resp csi_item_instances.attribute2%TYPE; v_recovery_service csi_item_instances.attribute3%TYPE; v_recovery_stob csi_item_instances.attribute4%TYPE; v_save_stob csi_item_instances.attribute4%TYPE; v_recovery_project csi_item_instances.attribute5%TYPE; -- v_expense_client csi_item_instances.attribute1%TYPE; v_expense_resp csi_item_instances.attribute2%TYPE; v_expense_service csi_item_instances.attribute3%TYPE; v_expense_stob csi_item_instances.attribute4%TYPE; v_expense_project csi_item_instances.attribute5%TYPE; v_expense_ccid csi_item_instances.attribute6%TYPE; v_po_number oe_order_headers_all.cust_po_number%TYPE; -- v_recovery_price_source mtl_descr_element_values.element_value%TYPE; v_colour mtl_descr_element_values.element_value%TYPE; v_reporting_uom mtl_descr_element_values.element_value%TYPE; v_item_name mtl_system_items_b.segment1%TYPE; v_item_uom mtl_system_items_b.primary_uom_code%TYPE; n_prev_inventory_item_id mtl_system_items_b.inventory_item_id%TYPE := 0; n_price NUMBER; n_run_id cas_interface_logs.run_id%TYPE; -- Alert 202659 - n_wts_party_id no longer required -- n_wts_party_id hz_parties.party_id%TYPE; -- -- The flags below indicate error conditions with item or item_instance that -- would prevent the recovery transaction from being processed successfully. -- Used when setting the transaction process_flag column. -- v_error_flag VARCHAR2(1); -- problem with item (Y/N). n_error_count NUMBER := 0; -- number of records with a problem. n_adj_error_count NUMBER := 0; -- count of errors for adjustment being processed. n_adj_count NUMBER := 0; -- number of adjustment records processed. n_adjr_count NUMBER := 0; -- number of adjustment recovery records processed. -- BEGIN -- n_cas_bps_cost_centre := cas_ib_utl.fn_get_attribute_id('CAS_BPS_COST_CENTRE'); -- log start of recovery run -- cas_log_batch_utl.prc_start_package( 'CAS IB Recoveries', 'CAS_IB_RECOVER', gc_version_no, gc_version_dt, c_procedure_name, 'type=ADJ ' || ' recovery_period=' || pv_recovery_period_in || ' gl_pd=' || pv_gl_period_in || ' sob_id=' || pn_set_of_books_id_in || ' trace=' || pn_trace_flag_in || ' cust_type=' || pv_customer_type_in -- || CASE -- WHEN (pn_owner_party_id_in IS NOT NULL) THEN ' owner_party_id=' || pn_owner_party_id_in -- END -- || CASE -- WHEN (pn_inventory_item_id_in IS NOT NULL) THEN ' inventory_item_id=' || pn_inventory_item_id_in -- END ); -- -- get current run_id (entered on each IB_recovery row). -- n_run_id := cas_interface_log.fn_run_id; pn_run_id_out := n_run_id; -- -- Alert 202659 - BCAS recoveries - move check for BPS party table to main procedure -- -- get period set name from set of books. -- cas_ib_utl.prc_select_set_of_books(pn_set_of_books_id_in, v_period_set_name, v_return_code, v_message); -- IF (v_return_code > 0) THEN raise_application_error( -20000, 'Error retrieving set of books info for id=' || pn_set_of_books_id_in || ': ' || v_message); END IF; -- -- validate GL period name. -- IF (NOT fn_is_valid_period_name( v_period_set_name, pv_gl_period_in)) THEN raise_application_error( -20000, 'Invalid GL period name: ' || pv_gl_period_in); END IF; -- -- get recovery period year. -- SELECT period_year INTO n_recovery_period_year FROM gl.gl_periods glp WHERE glp.period_set_name = v_period_set_name AND glp.period_name = pv_recovery_period_in; -- -- log period year -- cas_interface_log.prc_log_info(c_procedure_name, 'Recovery period year: ' || TO_CHAR(n_recovery_period_year), 'Recovery period name=' || pv_recovery_period_in, NULL, NULL); -- -- Loop through adjustment records to process recoveries. -- <<adjustment_loop>> -- Alert 202659 - wts_party_id parameter no longer required in call to cr_adjustments cursor FOR r_adj IN cr_adjustments LOOP -- BEGIN -- n_adj_error_count := 0; -- initialize error counter for current adjustment. n_adj_count := n_adj_count + 1; -- -- expand adjustment period range. This will insert one row per adjustment period into cascsi.cas_ib_adj_recoveries. prc_expand_adjustment_periods(r_adj.adjustment_id, pn_set_of_books_id_in, v_return_code, v_message); -- IF (v_return_code > 0) THEN -- log failure to expand periods. cas_log_batch_utl.prc_set_warning_on; cas_interface_log.prc_log_warning(c_procedure_name, 'Failed to expand period range: ' || v_message, 'adjustment_id= ' || r_adj.adjustment_id, r_adj.adjustment_id); v_error_flag := 'Y'; n_error_count := n_error_count + 1; n_adj_error_count := n_adj_error_count + 1; ELSE -- -- now loop through expanded periods for current adjustment. -- FOR r_recovery IN cr_adj_recoveries(r_adj.adjustment_id) LOOP n_adjr_count := n_adjr_count + 1; -- v_error_flag := 'N'; -- initialize item instance error flag. n_price := 0; -- initialize price -- -- get name of current item -- SELECT segment1 item_name, primary_uom_code INTO v_item_name, v_item_uom FROM mtl_system_items_b WHERE inventory_item_id = r_recovery.inventory_item_id AND organization_id = r_recovery.inv_master_organization_id; -- -- get recovery price source for current item (i.e. ITEM or ORDER). -- v_recovery_price_source := cas_ib_utl.fn_select_catalog_element( r_recovery.inventory_item_id, 'Recovery Price Source'); -- IF (v_recovery_price_source IS NULL) THEN -- log missing recovery price source cas_log_batch_utl.prc_set_warning_on; cas_interface_log.prc_log_warning( c_procedure_name, 'Item recovery price source is missing or blank; defaulted to ITEM ', 'instance_id=' || r_recovery.instance_id || ' inventory_item_id=' || r_recovery.inventory_item_id, r_recovery.adj_recovery_id ); END IF; -- v_colour := cas_ib_utl.fn_select_catalog_element( r_recovery.inventory_item_id, 'Colour'); -- IF (v_colour IS NULL) THEN -- log missing colour cas_log_batch_utl.prc_set_warning_on; cas_interface_log.prc_log_warning( c_procedure_name, 'Item colour is missing or blank.', 'instance_id=' || r_recovery.instance_id || 'inventory_item_id=' || r_recovery.inventory_item_id, r_recovery.adj_recovery_id ); -- END IF; -- IF (pn_trace_flag_in = 1) THEN cas_interface_log.prc_log_trace( c_procedure_name, v_item_name || ' Price Source=' || v_recovery_price_source || ' UOM=' || v_reporting_uom || ' Colour=' || v_colour, 'instance_id=' || r_recovery.instance_id || ' inventory_item_id=' || r_recovery.inventory_item_id, r_recovery.adj_recovery_id ); END IF; -- -- get recovery GL coding for current item -- cas_ib_utl.prc_select_recovery_coding(r_recovery.inventory_item_id, v_recovery_client, v_recovery_resp, v_recovery_service, v_recovery_stob, v_recovery_project, v_return_code, v_message); -- IF (v_return_code > 0 OR v_recovery_client IS NULL OR v_recovery_resp IS NULL OR v_recovery_service IS NULL OR v_recovery_stob IS NULL OR v_recovery_project IS NULL) THEN -- log recovery coding error. cas_interface_log.prc_log_warning( c_procedure_name, 'Recovery coding error: ' || v_message, 'instance_id=' || r_recovery.instance_id || ' inventory_item_id=' || r_recovery.inventory_item_id, r_recovery.adj_recovery_id ); cas_log_batch_utl.prc_set_warning_on; v_error_flag := 'Y'; n_error_count := n_error_count + 1; n_adj_error_count := n_adj_error_count + 1; END IF; -- -- get customer info -- cas_ib_utl.prc_select_customer_info(r_recovery.instance_id, v_customer_class_code, n_account_id, v_account_number, v_account_name, n_party_id, n_bill_to_address, v_return_code, v_message); -- -- IF (v_return_code > 0) THEN -- log failure to retrieve customer info. cas_log_batch_utl.prc_set_warning_on; cas_interface_log.prc_log_warning( c_procedure_name, 'Failed to retrieve customer class and/or TCA account/party info: ' || v_message, 'instance_id= ' || r_recovery.instance_id || ' TCA Account ID=' || TO_CHAR(n_account_id) || ' customer class=' || v_customer_class_code, r_recovery.adj_recovery_id ); v_error_flag := 'Y'; n_error_count := n_error_count + 1; n_adj_error_count := n_adj_error_count + 1; -- v_ministry_code := ''; -- ELSE -- check customer class consistent with customer type input parameter. -- Alert 202659 - use new function fn_isbps() to determine if party is BPS IF (fn_isbps(r_recovery.owner_party_id) = 1 AND v_customer_class_code NOT LIKE 'PUBLIC_SECTOR%' OR fn_isbps(r_recovery.owner_party_id) = 0 AND v_customer_class_code NOT LIKE 'MINISTRY%') THEN -- log inconsistency between owner_party and cust_class. cas_log_batch_utl.prc_set_warning_on; cas_interface_log.prc_log_warning( c_procedure_name, 'Requested customer type is ' || pv_customer_type_in || ' but customer class is: ' || v_customer_class_code, 'instance_id= ' || r_recovery.instance_id || ' TCA Account ID=' || TO_CHAR(n_account_id), r_recovery.adj_recovery_id ); -- v_error_flag := 'Y'; n_error_count := n_error_count + 1; n_adj_error_count := n_adj_error_count + 1; -- END IF; -- parse ministry code from TCA name. Get the string between the two dashes. -- This is used to check for 'WTS' when setting the recovery process flag. v_ministry_code := SUBSTR(v_account_name, 5, INSTR(v_account_name, '-', 5) - 5); --------------------------------------------------------------------------------------------- -- WENDM get recovery flag using cust_account_id, cust_account_number and cust_account name -- returned from the above lookup. Return upper case Y or N. -- Colour BLUE is hardcoded for now but can be putin cas_generci tables. -- All records with PROCESS_FLAG of W in cas_ib_recoveries will be ignored by recovery JV process. IF v_ministry_code = 'WTS' THEN v_recovery_flag := 'W'; ELSIF (SUBSTR(v_customer_class_code, 1, 8) = 'MINISTRY') THEN v_recovery_flag := fn_get_recovery_flag(n_account_id, v_account_number, v_account_name, v_colour); ELSE v_recovery_flag := 'I'; END IF; -- IF (SUBSTR(v_customer_class_code, 1, 8) != 'MINISTRY') THEN -- default SDA account ID to owner_party account ID for non-ministry customers. n_sda_account_id := r_recovery.owner_party_account_id; n_sda_party_id := r_recovery.owner_party_id; -- -- check for PUBLIC_SECTOR_INVOICED customer type and replace recovery stob if necessary. IF (v_customer_class_code = 'PUBLIC_SECTOR_INVOICED') THEN cas_ib_utl.prc_get_bps_recoveries_stob(r_recovery.instance_id, v_recovery_stob, v_return_code, v_message); -- IF (v_return_code > '0') THEN cas_log_batch_utl.prc_set_warning_on; cas_interface_log.prc_log_warning( c_procedure_name, 'Failed to find BPS recovery STOB for BPS customer: ' || v_message, 'instance_id= ' || r_recovery.instance_id || ' customer class=' || v_customer_class_code, r_recovery.adj_recovery_id ); -- -- default recovery stob if not found. v_recovery_stob := fn_get_default_recovery_stob(v_customer_class_code); END IF; END IF; ELSE -- -- get SDA party and account for TCA account. -- cas_ib_utl.prc_get_sda_ministry(n_account_id, n_sda_party_id, n_sda_account_id, v_return_code, v_message); -- IF (v_return_code > 0) THEN -- log failure to retrieve SDA account. -- v_error_flag := 'Y'; cas_log_batch_utl.prc_set_warning_on; cas_interface_log.prc_log_warning( c_procedure_name, 'Failed to retrieve SDA account: ' || v_message, 'instance_id= ' || r_recovery.instance_id || ' TCA account ID=' || n_account_id, r_recovery.adj_recovery_id ); -- n_error_count := n_error_count + 1; END IF; END IF; -- END IF; -- -- Extrace GL coding from item instance. -- It may change if it's invalid. v_expense_client := r_recovery.expense_client; v_expense_resp := r_recovery.expense_responsibility; v_expense_service := r_recovery.expense_service_line; v_expense_stob := r_recovery.expense_stob; v_expense_project := r_recovery.expense_project; v_expense_ccid := r_recovery.expense_ccid; -- prc_get_expense_coding(r_recovery.istore_org, pn_dflt_coding_flag_in, n_account_id, v_expense_client, v_expense_resp, v_expense_service, v_expense_stob, v_expense_project, v_expense_ccid, v_default_expense_flag, v_return_code, v_message); -- IF (v_expense_ccid IS NULL) THEN -- reset client, resp, svc, proj, which could now be null. v_expense_client := r_recovery.expense_client; v_expense_resp := r_recovery.expense_responsibility; v_expense_service := r_recovery.expense_service_line; v_expense_project := r_recovery.expense_project; -- IF (v_customer_class_code != 'PUBLIC_SECTOR_INVOICED') THEN -- log invalid code combination for non-invoiced records. cas_log_batch_utl.prc_set_warning_on; cas_interface_log.prc_log_warning( c_procedure_name, 'Invalid expense GL code combination: ' || v_message || ' ' || v_expense_client || '.' || v_expense_resp || '.' || v_expense_service || '.' || v_expense_stob || '.' || v_expense_project || ' default coding=' || v_default_expense_flag, 'instance_id= ' || r_recovery.instance_id, r_recovery.adj_recovery_id ); v_error_flag := 'Y'; n_error_count := n_error_count + 1; n_adj_error_count := n_adj_error_count + 1; END IF; -- END IF; -- v_po_number := fn_get_po_number(r_recovery.last_oe_order_line_id); -- -- write trace record to log if trace flag is on. -- IF (pn_trace_flag_in = 1) THEN cas_interface_log.prc_log_trace( c_procedure_name, 'expense coding=' || r_recovery.expense_client || '.' || r_recovery.expense_responsibility || '.' || r_recovery.expense_service_line || '.' || r_recovery.expense_stob || '.' || r_recovery.expense_project || ':' || r_recovery.expense_ccid, 'instance_id= ' || r_recovery.instance_id, r_recovery.adj_recovery_id ); END IF; -- IF (pn_trace_flag_in = 1) THEN cas_interface_log.prc_log_trace( c_procedure_name, 'recovery coding=' || v_recovery_client || '.' || v_recovery_resp || '.' || v_recovery_service || '.' || v_recovery_stob || '.' || v_recovery_project || ' cust class=' || v_customer_class_code, 'instance_id= ' || r_recovery.instance_id, r_recovery.adj_recovery_id ); -- END IF; -- -- -- get item price -- IF (r_recovery.override_price IS NOT NULL) THEN n_price := r_recovery.override_price; cas_interface_log.prc_log_info(c_procedure_name, 'Price override: ' || TO_CHAR(n_price), 'instance_id=' || r_recovery.instance_id, r_recovery.adj_recovery_id); -- ELSIF (v_recovery_price_source = 'ORDER') THEN n_price := TO_NUMBER(NVL(r_recovery.order_price, '0')); -- log warning if order price is 0. IF (n_price = 0) THEN cas_interface_log.prc_log_warning(c_procedure_name, 'Order price is zero.', 'instance_id=' || r_recovery.instance_id, r_recovery.adj_recovery_id); END IF; ELSE -- v_recovery_price_source = 'ITEM'. -- cas_ib_utl.prc_get_item_price(r_recovery.inventory_item_id, v_customer_class_code, r_recovery.recovery_period_name, v_period_set_name, n_price, v_return_code, v_message); -- IF (v_return_code > 0 AND v_customer_class_code IS NOT NULL) THEN cas_interface_log.prc_log_warning( c_procedure_name, 'Item price error: ' || v_message, 'instance_id=' || r_recovery.instance_id || ' inventory_item_id=' || r_recovery.inventory_item_id || ' customer_class_code=' || v_customer_class_code || ' period=' || r_recovery.recovery_period_name, r_recovery.adj_recovery_id ); cas_log_batch_utl.prc_set_warning_on; v_error_flag := 'Y'; n_error_count := n_error_count + 1; n_adj_error_count := n_adj_error_count + 1; n_price := 0; END IF; END IF; -- -- get next recovery_id. -- SELECT cas_ib_recovery_id_seq.NEXTVAL INTO n_recovery_id FROM DUAL; -- -- get adjustment period year. -- SELECT period_year INTO n_adj_period_year FROM gl.gl_periods glp WHERE glp.period_set_name = v_period_set_name AND glp.period_name = r_recovery.recovery_period_name; -- IF (n_adj_period_year != n_recovery_period_year) THEN -- V7. -- -- log previous fiscal recovery record. -- --------------------------------------------------------------------------------------------- -- WENDM modified decode and added recovery flag SELECT DECODE( v_error_flag, 'Y', 'E', DECODE( v_ministry_code, 'WTS', 'W', DECODE(v_recovery_flag, 'W', 'W', DECODE(SIGN(n_recovery_period_year - n_adj_period_year), 0, 'I', 'F')) ) ) INTO v_process_flag FROM DUAL; -- cas_interface_log.prc_log_info( c_procedure_name, 'Previous fiscal period ' || r_recovery.recovery_period_name || ', flag=' || v_process_flag, 'instance_id=' || r_recovery.instance_id || ' inventory_item_id=' || r_recovery.inventory_item_id, r_recovery.adj_recovery_id, n_recovery_id ); END IF; -- -- insert recovery record. -- BEGIN INSERT INTO cas_ib_recoveries(recovery_id, org_id, run_id, set_of_books_id, gl_period_name, recovery_period_name, inventory_item_id, inv_master_organization_id, instance_id, instance_number, adjustment_id, quantity, price, item_uom, amount, recovery_type, expense_client, expense_responsibility, expense_service_line, expense_stob, expense_project, expense_ccid, default_expense_flag, recovery_client, recovery_responsibility, recovery_service_line, recovery_stob, recovery_project, owner_party_id, owner_party_account_id, tca_party_id, tca_account_id, tca_account_name, bill_to_site, bps_cost_centre, sda_party_id, sda_account_id, description, customer_class, colour, external_reference, order_po_number, last_oe_order_line_id, process_flag, created_by, creation_date, last_updated_by, last_updated_date) VALUES (n_recovery_id, NVL(r_recovery.last_vld_organization_id, r_recovery.inv_master_organization_id), n_run_id, pn_set_of_books_id_in, UPPER(pv_gl_period_in), r_recovery.recovery_period_name, r_recovery.inventory_item_id, r_recovery.inv_master_organization_id, r_recovery.instance_id, r_recovery.instance_number, r_recovery.adj_recovery_id, r_recovery.adjustment_quantity, n_price, v_item_uom, ROUND( r_recovery.adjustment_quantity * n_price, 2), 'ADJUSTMENT', v_expense_client, v_expense_resp, v_expense_service, v_expense_stob, v_expense_project, v_expense_ccid, v_default_expense_flag, v_recovery_client, v_recovery_resp, v_recovery_service, v_recovery_stob, v_recovery_project, r_recovery.owner_party_id, r_recovery.owner_party_account_id, n_party_id, n_account_id, v_account_name, n_bill_to_address, r_recovery.bps_cost_centre, NVL(n_sda_party_id, r_recovery.owner_party_id), NVL(n_sda_account_id, r_recovery.owner_party_account_id), r_recovery.description, v_customer_class_code, v_colour, r_recovery.external_reference, v_po_number, r_recovery.last_oe_order_line_id, -- DECODE (v_error_flag, 'Y', 'E', DECODE (v_ministry_code, 'WTS', 'W', 'I') ), -- WENDM added decode recovery flag on FEB 16, 2010. DECODE(v_error_flag, 'Y', 'E', DECODE(v_ministry_code, 'WTS', 'W', DECODE(v_recovery_flag, 'W', 'W', DECODE(SIGN(n_recovery_period_year - n_adj_period_year), 0, 'I', 'F')))), cas_common_utl.fn_get_user_id('BATCH'), SYSDATE, cas_common_utl.fn_get_user_id('BATCH'), SYSDATE); -- -- update adjustment record with recovery_id. -- UPDATE cas_ib_adj_recoveries SET recovery_id = n_recovery_id, last_updated_by = cas_common_utl.fn_get_user_id('BATCH'), last_update_date = SYSDATE WHERE adj_recovery_id = r_recovery.adj_recovery_id; -- EXCEPTION WHEN OTHERS THEN cas_interface_log.prc_log_warning( c_procedure_name, SQLERRM, 'instance_id=' || r_recovery.instance_id || ' recovery_period=' || r_recovery.recovery_period_name, r_recovery.adj_recovery_id ); cas_log_batch_utl.prc_set_warning_on; v_error_flag := 'Y'; n_error_count := n_error_count + 1; n_adj_error_count := n_adj_error_count + 1; END; -- END LOOP; -- -- update adjustment record status if no errors occurred while processing current adjustment. -- V 9.0. IF (n_adj_error_count = 0) THEN -- UPDATE cas_ib_adjustments SET recovery_status = 'PROCESSED', last_updated_by = cas_common_utl.fn_get_user_id('BATCH'), last_update_date = SYSDATE WHERE adjustment_id = r_adj.adjustment_id; -- END IF; -- no error for current adjustment. -- END IF; -- periods expanded ok. -- EXCEPTION WHEN OTHERS THEN -- log error and continue to next adjustment. cas_interface_log.prc_log_warning( c_procedure_name, SQLERRM, 'instance_id=' || r_adj.instance_id || ' adjustment_id=' || r_adj.adjustment_id, r_adj.adjustment_id ); cas_log_batch_utl.prc_set_warning_on; v_error_flag := 'Y'; n_error_count := n_error_count + 1; END; -- END LOOP adjustment_loop; -- cas_interface_log.prc_log_info( c_procedure_name, 'Adjustment headers processed: ' || TO_CHAR(n_adj_count)); cas_interface_log.prc_log_info( c_procedure_name, 'Adjustment details processed: ' || TO_CHAR(n_adjr_count)); cas_interface_log.prc_log_info( c_procedure_name, 'Errors: ' || TO_CHAR(n_error_count)); -- cas_log_batch_utl.prc_set_normal_end_of_package(c_procedure_name, pv_return_code_out, pv_message_out); -- EXCEPTION WHEN OTHERS THEN cas_interface_log.prc_log_error( c_procedure_name, 'Adjustment recoveries unexpected error: ' || SQLERRM); cas_log_batch_utl.prc_set_error_on; cas_log_batch_utl.prc_set_error_end_of_package(c_procedure_name, pv_return_code_out, pv_message_out); END prc_process_adjustments; */ -- --*************************************************************************************************** --* Procedure : prc_process_recoveries --* Purpose : Process recoveries for given recovery type and recovery fiscal period. --* Parameters: pv_recovery_type_in - type of recovery (e.g. COMMON, ONE TIME, MONTHLY). --* pv_recovery_period_in - period for which recoveries are generated (e.g. APR-08). --* pv_gl_period_in - GL period to which recoveries are posted (e.g. MAY-08). --* pn_set_of_books_id_in - set of books id (e.g. 16=BCGOV). --* pn_run_id_out - run id - generated by cas_interface_log package. --* pv_return_code_out - procedure return code ('0'=ok, '1'=warning, '2'=error). --* pv_message_out - optional output message. --* pn_dflt_coding_flag_in - optional input flag to use default coding if given coding is invalid. --* pn_trace_flag_in - optional input flag to enable tracing to cas_interface_logs. --* pn_validate_flag_in - optional flag to run validation checks only. --* pv_customer_type_in - optional customer type (M=Ministry, B=BPS, null=both). --* pn_owner_party_id_in - optional owner_party_id to limit rows for testing. --* pn_seof_rk_in - optional pn_seof_rk_in to limit rows for testing. --* Called By : --*************************************************************************************************** PROCEDURE prc_process_recoveries( pv_recovery_type_in IN om_generic_table_details.key%TYPE, pv_recovery_period_in IN om_fin_periods.period_name%TYPE, pv_gl_period_in IN om_fin_periods.period_name%TYPE, pn_set_of_books_id_in IN om_fin_sets_of_books.set_of_books_id%TYPE, pn_run_id_out OUT NOCOPY om_interface_logs.run_id%TYPE, pv_return_code_out OUT NOCOPY VARCHAR2, pv_message_out OUT NOCOPY VARCHAR2, pn_dflt_coding_flag_in IN NUMBER DEFAULT 1, -- use default coding? pn_trace_flag_in IN NUMBER DEFAULT 0, pn_validate_flag_in IN NUMBER DEFAULT 0, pv_customer_type_in IN VARCHAR2 DEFAULT NULL, pn_owner_party_id_in IN om_assets.owner_party_id%TYPE DEFAULT NULL, pn_seof_rk_in IN om_assets.seof_rk%TYPE DEFAULT NULL ) IS -- -- define constant for procedure name; used in calls to CAS_INTERFACE_LOG package. c_procedure_name CONSTANT VARCHAR2(30) := 'prc_process_recoveries'; n_bps_count NUMBER; n_run_id om_interface_logs.run_id%TYPE; -- BEGIN -- Alert 202659 -- Determine if the given party_id is a BPS party. -- Raise error if the CAS_BPS_PARTY_IDS generic table has not been configured. -- SELECT COUNT(*) INTO n_bps_count FROM om.om_generic_table_details WHERE category = 'CAS_BPS_PARTY_IDS'; IF (n_bps_count = 0) THEN -- call prc_start_package() to get a run_id for the log message om_log_batch_utl.prc_start_package( 'OM Recoveries', 'OM_RECOVER', gc_version_no, gc_version_dt, c_procedure_name, ' recovery type=' || pv_recovery_type_in || ' recovery_period=' || pv_recovery_period_in || ' gl_period=' || pv_gl_period_in || ' set_of_books_id=' || pn_set_of_books_id_in || ' trace=' || pn_trace_flag_in || ' validate=' || pn_validate_flag_in || ' customer_type=' || pv_customer_type_in || ' owner_party_id=' || pn_owner_party_id_in || ' seof_rk=' || pn_seof_rk_in ); -- n_run_id := om_interface_log.fn_run_id; pn_run_id_out := n_run_id; -- raise_application_error( -20000, 'om generic table CAS_BPS_PARTY_IDS is not configured.'); END IF; -- /* CASE pv_recovery_type_in WHEN 'CGI CONS' THEN prc_process_consumption(pv_recovery_period_in, pv_gl_period_in, pn_set_of_books_id_in, pn_run_id_out, pv_return_code_out, pv_message_out, pn_dflt_coding_flag_in, pn_trace_flag_in, pn_validate_flag_in, pv_customer_type_in, pn_owner_party_id_in -- pn_inventory_item_id_in ); WHEN 'ADJ' THEN prc_process_adjustments(pv_recovery_period_in, pv_gl_period_in, pn_set_of_books_id_in, pn_run_id_out, pv_return_code_out, pv_message_out, pn_dflt_coding_flag_in, pn_trace_flag_in, pv_customer_type_in -- pn_owner_party_id_in, pn_inventory_item_id_in ); WHEN 'CREDIT' THEN prc_process_credits(pv_recovery_period_in, pv_gl_period_in, pn_set_of_books_id_in, pn_run_id_out, pv_return_code_out, pv_message_out, pn_trace_flag_in, pn_validate_flag_in, pv_customer_type_in); ELSE*/ prc_process_other(pv_recovery_type_in, pv_recovery_period_in, pv_gl_period_in, pn_set_of_books_id_in, pn_run_id_out, pv_return_code_out, pv_message_out, pn_dflt_coding_flag_in, pn_trace_flag_in, pn_validate_flag_in, pv_customer_type_in, pn_owner_party_id_in, pn_seof_rk_in); --END CASE; -- EXCEPTION WHEN OTHERS THEN om_interface_log.prc_log_error( c_procedure_name, 'Error: ' || SQLERRM); om_log_batch_utl.prc_set_error_on; om_log_batch_utl.prc_set_error_end_of_package(c_procedure_name, pv_return_code_out, pv_message_out); END prc_process_recoveries; -- END OM_recover; /
<reponame>joellabes/dbt {{ config( materialized='table', persist_docs={ 'columns': true } ) }} select 1 field
alter table category drop constraint category_parent_id_fkey; alter table category add constraint category_parent_id_fkey foreign key (parent_id) references category(id) on delete cascade; alter table image_category drop constraint image_category_category_id_fkey; alter table image_category add constraint image_category_category_id_fkey foreign key (category_id) references category(id) on delete cascade;
<reponame>Karan-zenocraft/parliament -- phpMyAdmin SQL Dump -- version 4.6.6deb5 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Oct 14, 2019 at 07:50 PM -- Server version: 5.7.27-0ubuntu0.18.04.1 -- PHP Version: 7.2.19-1+ubuntu18.04.1+deb.sury.org+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: `parliament` -- -- -------------------------------------------------------- -- -- Table structure for table `answers` -- CREATE TABLE `answers` ( `id` bigint(20) NOT NULL, `question_id` bigint(20) NOT NULL, `answer_text` varchar(255) NOT NULL, `mp_id` bigint(20) NOT NULL, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `answers` -- INSERT INTO `answers` (`id`, `question_id`, `answer_text`, `mp_id`, `created_at`, `updated_at`) VALUES (24, 51, 'weqwewqewqeqwe', 2, '2019-10-14 09:33:03', '2019-10-14 09:33:03'), (25, 51, 'sdfwsfsdfsdfdsfsd nnnnnnnnnnnnnnnnn', 2, '2019-10-14 09:34:03', '2019-10-14 09:34:03'), (26, 51, 'gdfgdfgdfgdsfg nnnnnnn gggggg', 2, '2019-10-14 09:42:44', '2019-10-14 09:42:44'), (27, 51, 'safsdfsdfsdf lllllllll', 2, '2019-10-14 09:43:24', '2019-10-14 09:43:24'), (28, 51, 'sadasd', 2, '2019-10-14 09:44:58', '2019-10-14 09:44:58'), (29, 51, 's<PASSWORD>d', 2, '2019-10-14 09:48:13', '2019-10-14 09:48:13'), (30, 51, 'zxczxcZXC', 2, '2019-10-14 09:49:26', '2019-10-14 09:49:26'); -- -------------------------------------------------------- -- -- Table structure for table `comments` -- CREATE TABLE `comments` ( `id` bigint(20) NOT NULL, `question_id` bigint(20) NOT NULL, `comment_text` varchar(255) NOT NULL, `user_agent_id` bigint(20) NOT NULL, `status` smallint(6) NOT NULL DEFAULT '1', `is_delete` smallint(6) NOT NULL DEFAULT '0', `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `comments` -- INSERT INTO `comments` (`id`, `question_id`, `comment_text`, `user_agent_id`, `status`, `is_delete`, `created_at`, `updated_at`) VALUES (1, 52, 'Hi this is my first comment', 2, 1, 0, '2019-10-14 10:52:55', '2019-10-14 10:52:55'), (2, 52, 'sadasdasd', 2, 1, 0, '2019-10-14 10:54:32', '2019-10-14 10:54:32'), (3, 52, 'sadasdasd', 2, 1, 0, '2019-10-14 10:54:38', '2019-10-14 10:54:38'), (4, 53, 'sadasdasd', 2, 1, 0, '2019-10-14 10:55:10', '2019-10-14 10:55:10'), (5, 53, 'sadasdasd', 2, 1, 0, '2019-10-14 10:55:20', '2019-10-14 10:55:20'); -- -------------------------------------------------------- -- -- Table structure for table `email_format` -- CREATE TABLE `email_format` ( `id` int(11) NOT NULL, `title` varchar(255) NOT NULL, `subject` varchar(255) NOT NULL, `body` text NOT NULL, `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1=Active, 0=In-Active', `created_at` datetime NOT NULL, `updated_at` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `email_format` -- INSERT INTO `email_format` (`id`, `title`, `subject`, `body`, `status`, `created_at`, `updated_at`) VALUES (1, 'forgot_password', 'Forgot Password', '<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n <tbody>\n <tr>\n <td style=\"padding:20px 0 20px 0\" align=\"center\" valign=\"top\"><!-- [ header starts here] -->\n <table style=\"border:1px solid #E0E0E0;\" cellpadding=\"10\" cellspacing=\"0\" bgcolor=\"FFFFFF\" border=\"0\" width=\"650\">\n <tbody>\n <tr>\n <td style=\"background: #444444; \" bgcolor=\"#EAEAEA\" valign=\"top\"><p><a href=\"{logo_front_url}\"><img style=\"\" src=\"{logo_img_url}\" alt=\"Parliament\" title=\"Parliament\"></a></p><p></p><p></p></td>\n </tr>\n <!-- [ middle starts here] -->\n <tr>\n <td valign=\"top\">\n <p>Dear {username},</p> \n <p>Your New Password is :<br></p><p><strong>E-mail:</strong> {email}<br> \n </p><p><strong>Password:</strong> {password}<br> \n \n </p><p>&nbsp;</p>\n </td>\n </tr>\n <tr>\n <td style=\"background: #444444; text-align:center;color: white;\" align=\"center\" bgcolor=\"#EAEAEA\"><center>\n <p style=\"font-size:12px; margin:0;\">Parliament Team</p>\n </center></td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n</table>', 1, '2013-09-08 00:00:00', NULL), (2, 'user_registration', 'Parliament -New Account', '<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" border=\"0\">\n <tbody>\n <tr>\n <td style=\"padding:20px 0 20px 0\" valign=\"top\" align=\"center\"><!-- [ header starts here] -->\n <table style=\"border:1px solid #E0E0E0;\" cellpadding=\"10\" cellspacing=\"0\" width=\"650\" bgcolor=\"FFFFFF\" border=\"0\">\n <tbody>\n <tr>\n <td style=\"background:#444444; \" valign=\"top\" bgcolor=\"#EAEAEA\"><p><a href=\"{logo_front_url}\"><img style=\"\" src=\"{logo_img_url}\" alt=\"parliament\" title=\"Parliament\"></a></p><p></p><p></p></td>\n </tr>\n <!-- [ middle starts here] -->\n <tr>\n <td valign=\"top\">\n <p>Dear {username},</p> \n <p>Your account has been created.<br></p>\n <p>{loginurl}<br></p>\n <p><strong>E-mail:</strong> {email} <br></p>\n<p><strong>Password:</strong> {password} <br></p>\n <p></p><p>&nbsp;</p>\n </td>\n </tr>\n <tr>\n <td style=\"background: #444444; text-align:center;color: white;\" align=\"center\" bgcolor=\"#EAEAEA\"><center>\n <p style=\"font-size:12px; margin:0;\">Parliament Team</p>\n </center></td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n</table>', 1, '2013-09-08 00:00:00', NULL), (3, 'reset_password', 'Reset Password', '<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n <tbody>\n <tr>\n <td style=\"padding:20px 0 20px 0\" align=\"center\" valign=\"top\"><!-- [ header starts here] -->\n <table style=\"border:1px solid #E0E0E0;\" cellpadding=\"10\" cellspacing=\"0\" bgcolor=\"FFFFFF\" border=\"0\" width=\"650\">\n <tbody>\n <tr>\n <td style=\"background: #444444; \" bgcolor=\"#EAEAEA\" valign=\"top\"><p><a href=\"{logo_front_url}\"><img style=\"\" src=\"{logo_img_url}\" alt=\"parliament\" title=\"parliament\"></a></p><p></p><p></p></td>\n </tr>\n <!-- [ middle starts here] -->\n <tr>\n <td valign=\"top\">\n <p>Dear {username},</p> \n <p>Follow the link below to reset your password:</p>\n <p>{resetLink}</p>\n \n </p><p>&nbsp;</p>\n </td>\n </tr>\n <tr>\n <td style=\"background: #444444; text-align:center;color: white;\" align=\"center\" bgcolor=\"#EAEAEA\"><center>\n <p style=\"font-size:12px; margin:0;\">Parliament Team</p>\n </center></td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n</table>', 1, '2013-09-08 00:00:00', NULL), (4, 'contact_us', 'Parliament Contact', '<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" border=\"0\">\r\n <tbody>\r\n <tr>\r\n <td style=\"padding:20px 0 20px 0\" valign=\"top\" align=\"center\"><!-- [ header starts here] -->\r\n <table style=\"border:1px solid #E0E0E0;\" cellpadding=\"10\" cellspacing=\"0\" width=\"650\" bgcolor=\"FFFFFF\" border=\"0\">\r\n <tbody>\r\n <tr>\r\n <td style=\"background:#444444; \" valign=\"top\" bgcolor=\"#EAEAEA\"><p><a href=\"{logo_front_url}\"><img style=\"\" src=\"{logo_img_url}\" alt=\"Parliament\" title=\"Parliament\"></a></p><p></p><p></p></td>\r\n </tr>\r\n <!-- [ middle starts here] -->\r\n <tr>\r\n <td valign=\"top\">\r\n <p>Hello Parliament Admin,\r\n <p>{message}<br></p>\r\n <p></p><p>&nbsp;</p>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td style=\"background: #444444; text-align:center;color: white;\" align=\"center\" bgcolor=\"#EAEAEA\"><center>\r\n <p style=\"font-size:12px; margin:0;\">{name}</p>\r\n </center></td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </td>\r\n </tr>\r\n </tbody>\r\n</table>', 1, '2013-09-08 00:00:00', NULL); -- -------------------------------------------------------- -- -- Table structure for table `migration` -- CREATE TABLE `migration` ( `version` varchar(180) NOT NULL, `apply_time` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `migration` -- INSERT INTO `migration` (`version`, `apply_time`) VALUES ('m000000_000000_base', 1568809632), ('m130524_201442_init', 1568809644), ('m190124_110200_add_verification_token_column_to_user_table', 1568809645); -- -------------------------------------------------------- -- -- Table structure for table `questions` -- CREATE TABLE `questions` ( `id` bigint(20) NOT NULL, `user_agent_id` bigint(20) NOT NULL, `question` varchar(600) NOT NULL, `mp_id` varchar(255) NOT NULL, `louder_by` longtext, `status` smallint(6) NOT NULL DEFAULT '1', `is_delete` smallint(6) NOT NULL DEFAULT '0', `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `questions` -- INSERT INTO `questions` (`id`, `user_agent_id`, `question`, `mp_id`, `louder_by`, `status`, `is_delete`, `created_at`, `updated_at`) VALUES (39, 6, 'Hi Guys When I stand before God at the end of my life, I would hope that I would not have a single bit of talent left and could say, I used everything?', '2,12,14,20,19', '6', 1, 0, '2019-10-07 13:10:25', '2019-10-11 15:18:19'), (40, 6, 'hey MP i want to ask one question to you that our city\'s roads are very bad to drive and very risky also please repair it as soon as possible this is my complaint to you please fix it asap.', '12,14', '8', 1, 0, '2019-10-09 05:43:55', '2019-10-11 12:44:33'), (41, 8, 'Hi How are you? MP', '12', '8,6', 1, 0, '2019-10-09 09:17:31', '2019-10-12 16:24:00'), (42, 8, 'Hi How are you?', '12', '8,6', 1, 0, '2019-10-09 09:17:34', '2019-10-11 12:57:32'), (43, 8, 'test question test question test question', '19', '8', 1, 0, '2019-10-09 09:18:08', '2019-10-11 12:57:14'), (44, 8, 'test question 1', '19', '8,6', 1, 0, '2019-10-09 09:18:27', '2019-10-11 12:57:30'), (45, 8, 'test question 1', '13', '8', 1, 0, '2019-10-09 09:18:32', '2019-10-11 12:57:26'), (46, 8, 'test question 1', '13', '8,6', 1, 0, '2019-10-09 09:18:33', '2019-10-14 08:59:19'), (47, 8, 'test question 2', '10', '8,6', 1, 0, '2019-10-09 09:18:50', '2019-10-12 16:23:56'), (48, 8, 'test question 3', '17,10', '6', 1, 0, '2019-10-09 09:19:20', '2019-10-11 13:22:31'), (49, 8, 'test question 4', '14', '8,6', 1, 0, '2019-10-09 09:19:32', '2019-10-11 12:50:28'), (50, 8, 'test question 5 test question 5 test question 5test question 5 test question 5 test question 5 test question 5 test question 5 test question 5 test question 5 test question 5 test question 5 test question 5 test question 5test question 5 test question 5', '2,14', '8,6', 1, 0, '2019-10-09 09:19:59', '2019-10-14 08:59:10'), (51, 6, 'When I stand before God at the end of my life, I would hope that I would not have a single bit of talent left and could say, I used everything you gave me. When I stand before God at the end of my life, I would hope that I would not have a single bit of talent left and could say, I used everything you gave me. hope that I would not have a single bit of talent left and could say, I used When I stand before God at the end of my life, I would hope that I would not have a single bit of talent left and could say', '2,20,19', '8,6', 1, 0, '2019-10-09 11:40:53', '2019-10-12 16:24:23'), (52, 6, 'dasdasdsadasd', '12,14,20,19,15', '6', 1, 1, '2019-10-11 15:34:11', '2019-10-14 14:07:13'), (53, 6, 'When I stand before God at the end of my life, I would hope that I would not have a single bit of talent left and could say, I used everything you gave me. When I stand before God at the end of my life, I would hope that I would not have a single bit of talent left and could say, I used everything you gave me. hope that I would not have a single bit of talent left and could say, I used When I stand before God at the end of my life, I would hope that I would not have a single bit of talent left and could say', '12', '6,6', 1, 1, '2019-10-12 16:56:34', '2019-10-14 14:06:29'); -- -------------------------------------------------------- -- -- Table structure for table `question_hide` -- CREATE TABLE `question_hide` ( `id` int(10) NOT NULL, `user_id` int(10) NOT NULL, `question_id` text NOT NULL, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `question_hide` -- INSERT INTO `question_hide` (`id`, `user_id`, `question_id`, `created_at`, `updated_at`) VALUES (3, 6, '52,53', '2019-10-14 14:06:55', '2019-10-14 14:08:04'); -- -------------------------------------------------------- -- -- Table structure for table `question_louder` -- CREATE TABLE `question_louder` ( `id` bigint(20) NOT NULL, `question_id` bigint(20) NOT NULL, `user_id` bigint(20) NOT NULL, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `question_reported` -- CREATE TABLE `question_reported` ( `id` bigint(20) NOT NULL, `question_id` bigint(20) NOT NULL, `user_id` bigint(20) NOT NULL, `report_comment` text NOT NULL, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `shares` -- CREATE TABLE `shares` ( `id` bigint(20) NOT NULL, `question_id` bigint(20) NOT NULL, `user_agent_id` bigint(20) NOT NULL, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `user` -- CREATE TABLE `user` ( `id` int(11) NOT NULL, `username` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `auth_key` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `password_hash` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `password_reset_token` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `status` smallint(6) NOT NULL DEFAULT '10', `created_at` int(11) NOT NULL, `updated_at` int(11) NOT NULL, `verification_token` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `role_id` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `user` -- INSERT INTO `user` (`id`, `username`, `auth_key`, `password_hash`, `password_reset_token`, `email`, `status`, `created_at`, `updated_at`, `verification_token`, `role_id`) VALUES (8, 'rutusha', 'bGGmDvu-kF2DhZr5_zbu8vOQIQmKts7K', '$2y$13$WT66IIMq9Oj440XP41paZ.jjm/2EjHtNzPh25OkzN59p5Gux69yTG', NULL, '<EMAIL>', 10, 1568890574, 1569244192, 'uQqgSw6J397lVhL9gfKJcbeuxk7CWz7z_1568890574', 2); -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE `users` ( `id` bigint(20) NOT NULL, `role_id` bigint(20) DEFAULT NULL, `email` varchar(255) DEFAULT NULL, `password` varchar(255) DEFAULT NULL, `user_name` varchar(255) DEFAULT NULL, `city` text, `age` int(11) DEFAULT NULL, `gender` tinyint(5) DEFAULT NULL, `photo` varchar(255) DEFAULT NULL, `education` varchar(255) DEFAULT NULL, `years_hopr` int(11) DEFAULT NULL, `password_reset_token` text, `badge_count` int(8) DEFAULT NULL, `standing_commitee` varchar(255) DEFAULT NULL, `status` smallint(6) NOT NULL DEFAULT '1' COMMENT '''0'':''Active,''1'':''In-Active''', `created_at` datetime DEFAULT NULL, `updated_at` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `users` -- INSERT INTO `users` (`id`, `role_id`, `email`, `password`, `user_name`, `city`, `age`, `gender`, `photo`, `education`, `years_hopr`, `password_reset_token`, `badge_count`, `standing_commitee`, `status`, `created_at`, `updated_at`) VALUES (1, 1, '<EMAIL>', '21232f297a57a5a743894a0e4a801fc3', 'parliament_admin', 'test', 1, NULL, 'bk1_5d8b08ac2cdd3.jpg', 'rrrrr', NULL, '', 0, '', 1, '2019-05-03 10:09:57', '2019-09-25 06:26:52'), (2, 2, '<EMAIL>', '21232f297a57a5a743894a0e4a801fc3', ' <NAME>', 'zydus', 30, 1, 'crs-fvicn-1_5d8b08d644ddd.png', 'MECE', NULL, NULL, 0, 'Foregign Relation & Peace', 1, '2019-05-03 10:09:57', '2019-09-25 13:36:05'), (6, 3, '<EMAIL>', '21232f297a57a5a743894a0e4a801fc3', '<NAME>', 'ahmedabad', 3, 2, 'business-3370832_1280_5d8b05ac72aac.jpg', 'e', NULL, NULL, NULL, 'Foregign Relation & Peace', 1, '2019-09-24 14:30:02', '2019-09-25 07:17:23'), (8, 3, '<EMAIL>', '21232f297a57a5a743894a0e4a801fc3', 'jay', 'ahmedabad', 29, 2, 'business-3370832_1280_5d8b05ac72aac.jpg', 'BECE', 3, NULL, NULL, 'Foregign Relation & Peace', 1, '2019-09-25 06:14:04', '2019-09-25 07:37:59'), (9, 2, '<EMAIL>', '<PASSWORD>', '<NAME>', 'baroda', 5, 2, 'chief-rs_logo_5d8b1337e06d7.png', 'rrrrr', NULL, NULL, NULL, 'Foregign Relation & Peace', 1, '2019-09-25 07:11:51', '2019-09-25 07:22:03'), (10, 2, '<EMAIL>', '<PASSWORD>', '<NAME>', 'rajkot', 90, 2, 'chief-rs_logo_5d8b1337e06d7.png', 'rrrrr', NULL, NULL, NULL, 'Foregign Relation & Peace', 1, '2019-09-25 07:11:51', '2019-09-25 07:22:03'), (11, 2, '<EMAIL>', '<PASSWORD>', '<NAME>', 'surat', 89, 2, 'chief-rs_logo_5d8b1337e06d7.png', 'rrrrr', NULL, NULL, NULL, 'Foregign Relation & Peace', 1, '2019-09-25 07:11:51', '2019-09-25 07:22:03'), (12, 2, '<EMAIL>', '<PASSWORD>', '<NAME>', 'charlie', 12, 2, 'chief-rs_logo_5d8b1337e06d7.png', 'rrrrr', NULL, NULL, NULL, 'Foregign Relation & Peace', 1, '2019-09-25 07:11:51', '2019-09-25 07:22:03'), (13, 2, '<EMAIL>', '<PASSWORD>', '<NAME>', 'gg', 12, 2, 'chief-rs_logo_5d8b1337e06d7.png', 'rrrrr', NULL, NULL, NULL, 'Foregign Relation & Peace', 1, '2019-09-25 07:11:51', '2019-09-25 07:22:03'), (14, 2, '<EMAIL>', '<PASSWORD>', '<NAME>', 'gg', 12, 2, 'chief-rs_logo_5d8b1337e06d7.png', 'rrrrr', NULL, NULL, NULL, 'Foregign Relation & Peace', 1, '2019-09-25 07:11:51', '2019-09-25 07:22:03'), (15, 2, '<EMAIL>', '<PASSWORD>', 'Hoang ', 'gg', 12, 2, 'chief-rs_logo_5d8b1337e06d7.png', 'rrrrr', NULL, NULL, NULL, 'Foregign Relation & Peace', 1, '2019-09-25 07:11:51', '2019-09-25 07:22:03'), (16, 2, '<EMAIL>', '<PASSWORD>', '<NAME>', 'gg', 12, 2, 'chief-rs_logo_5d8b1337e06d7.png', 'rrrrr', NULL, NULL, NULL, 'Foregign Relation & Peace', 1, '2019-09-25 07:11:51', '2019-09-25 07:22:03'), (17, 2, '<EMAIL>', '<PASSWORD>', '<NAME>', 'gg', 12, 2, 'chief-rs_logo_5d8b1337e06d7.png', 'rrrrr', NULL, NULL, NULL, 'Foregign Relation & Peace', 1, '2019-09-25 07:11:51', '2019-09-25 07:22:03'), (18, 2, '<EMAIL>', '<PASSWORD>', '<NAME>', 'gg', 12, 2, 'chief-rs_logo_5d8b1337e06d7.png', 'rrrrr', NULL, NULL, NULL, 'Foregign Relation & Peace', 1, '2019-09-25 07:11:51', '2019-09-25 07:22:03'), (19, 2, '<EMAIL>', '<PASSWORD>89faf95ad78aec2cbebab40ec5a73', '<NAME>', 'gg', 12, 2, 'chief-rs_logo_5d8b1337e06d7.png', 'rrrrr', NULL, NULL, NULL, 'Foregign Relation & Peace', 1, '2019-09-25 07:11:51', '2019-09-25 07:22:03'), (20, 2, '<EMAIL>', '<PASSWORD>89faf<PASSWORD>cbe<PASSWORD>', 'helcuras Lee', 'gg', 12, 2, 'chief-rs_logo_5d8b1337e06d7.png', 'rrrrr', NULL, NULL, NULL, 'Foregign Relation & Peace', 1, '2019-09-25 07:11:51', '2019-09-25 07:22:03'); -- -------------------------------------------------------- -- -- Table structure for table `user_roles` -- CREATE TABLE `user_roles` ( `id` int(11) NOT NULL, `role_name` varchar(255) NOT NULL, `role_description` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `user_roles` -- INSERT INTO `user_roles` (`id`, `role_name`, `role_description`) VALUES (1, 'admin', 'Administartor'), (2, 'MP', 'MP'), (3, 'User Agent', 'User Agent'); -- -------------------------------------------------------- -- -- Table structure for table `user_rules` -- CREATE TABLE `user_rules` ( `id` int(11) NOT NULL, `role_id` int(11) NOT NULL, `privileges_controller` varchar(255) NOT NULL, `privileges_actions` text NOT NULL, `permission` enum('allow','deny') NOT NULL DEFAULT 'allow', `permission_type` varchar(255) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `user_rules` -- INSERT INTO `user_rules` (`id`, `role_id`, `privileges_controller`, `privileges_actions`, `permission`, `permission_type`) VALUES (1, 1, 'SiteController', 'index,logout,change-password,forgot-password', 'allow', 'admin'), (2, 2, 'SiteController', 'logout,change-password,forgot-password,index,engagement,load-more-questions,answer-question,save-comment,validate-comment,report-question', 'allow', 'MP'), (3, 3, 'SiteController', 'logout,change-password,forgot-password,index,engagement,current-city,make-louder,load-more-questions,save-comment,validate-comment,report-question,retract-question,hide-question', 'allow', 'user_agent'), (4, 1, 'UsersController', 'create,update,delete,view,index', 'allow', 'admin'); -- -------------------------------------------------------- -- -- Table structure for table `user_rules_menu` -- CREATE TABLE `user_rules_menu` ( `id` int(10) NOT NULL, `category` enum('admin','front-top','front-bottom','front-middle') NOT NULL DEFAULT 'admin', `parent_id` int(10) NOT NULL DEFAULT '0', `user_rules_id` int(10) NOT NULL, `label` varchar(255) NOT NULL, `class` varchar(255) DEFAULT NULL, `url` varchar(255) NOT NULL, `position` int(10) NOT NULL, `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '0 - inactive, 1 - active' ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `user_rules_menu` -- INSERT INTO `user_rules_menu` (`id`, `category`, `parent_id`, `user_rules_id`, `label`, `class`, `url`, `position`, `status`) VALUES (1, 'admin', 0, 1, 'Dashboard', 'icon-home', 'site/index', 1, 1), (5, 'admin', 0, 4, 'Manage Users', 'icon-user', 'users/index', 2, 1); -- -- Indexes for dumped tables -- -- -- Indexes for table `answers` -- ALTER TABLE `answers` ADD PRIMARY KEY (`id`), ADD KEY `MP` (`mp_id`), ADD KEY `question_id` (`question_id`); -- -- Indexes for table `comments` -- ALTER TABLE `comments` ADD PRIMARY KEY (`id`), ADD KEY `question_id` (`question_id`), ADD KEY `user_agent_id` (`user_agent_id`); -- -- Indexes for table `email_format` -- ALTER TABLE `email_format` ADD PRIMARY KEY (`id`); -- -- Indexes for table `migration` -- ALTER TABLE `migration` ADD PRIMARY KEY (`version`); -- -- Indexes for table `questions` -- ALTER TABLE `questions` ADD PRIMARY KEY (`id`), ADD KEY `user_agent` (`user_agent_id`), ADD KEY `MPs` (`mp_id`); -- -- Indexes for table `question_hide` -- ALTER TABLE `question_hide` ADD PRIMARY KEY (`id`), ADD KEY `user_id` (`user_id`); -- -- Indexes for table `question_louder` -- ALTER TABLE `question_louder` ADD PRIMARY KEY (`id`), ADD KEY `question` (`question_id`), ADD KEY `user_id` (`user_id`); -- -- Indexes for table `question_reported` -- ALTER TABLE `question_reported` ADD PRIMARY KEY (`id`), ADD KEY `question` (`question_id`), ADD KEY `user` (`user_id`); -- -- Indexes for table `shares` -- ALTER TABLE `shares` ADD PRIMARY KEY (`id`), ADD KEY `question_id` (`question_id`), ADD KEY `user_agent_id` (`user_agent_id`); -- -- Indexes for table `user` -- ALTER TABLE `user` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `username` (`username`), ADD UNIQUE KEY `email` (`email`), ADD UNIQUE KEY `password_reset_token` (`password_reset_<PASSWORD>`), ADD KEY `role_id` (`role_id`); -- -- Indexes for table `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`id`), ADD KEY `role_id` (`role_id`); -- -- Indexes for table `user_roles` -- ALTER TABLE `user_roles` ADD PRIMARY KEY (`id`); -- -- Indexes for table `user_rules` -- ALTER TABLE `user_rules` ADD PRIMARY KEY (`id`), ADD KEY `role_id` (`role_id`); -- -- Indexes for table `user_rules_menu` -- ALTER TABLE `user_rules_menu` ADD PRIMARY KEY (`id`), ADD KEY `user_rules_id` (`user_rules_id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `answers` -- ALTER TABLE `answers` MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=31; -- -- AUTO_INCREMENT for table `comments` -- ALTER TABLE `comments` MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- AUTO_INCREMENT for table `email_format` -- ALTER TABLE `email_format` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `questions` -- ALTER TABLE `questions` MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=54; -- -- AUTO_INCREMENT for table `question_hide` -- ALTER TABLE `question_hide` MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- -- AUTO_INCREMENT for table `question_louder` -- ALTER TABLE `question_louder` MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `question_reported` -- ALTER TABLE `question_reported` MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `shares` -- ALTER TABLE `shares` MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `user` -- ALTER TABLE `user` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; -- -- AUTO_INCREMENT for table `users` -- ALTER TABLE `users` MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21; -- -- AUTO_INCREMENT for table `user_roles` -- ALTER TABLE `user_roles` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- -- AUTO_INCREMENT for table `user_rules` -- ALTER TABLE `user_rules` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `user_rules_menu` -- ALTER TABLE `user_rules_menu` MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- Constraints for dumped tables -- -- -- Constraints for table `answers` -- ALTER TABLE `answers` ADD CONSTRAINT `MP` FOREIGN KEY (`mp_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `questions` FOREIGN KEY (`question_id`) REFERENCES `questions` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `comments` -- ALTER TABLE `comments` ADD CONSTRAINT `question_id` FOREIGN KEY (`question_id`) REFERENCES `questions` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `user_agent_id` FOREIGN KEY (`user_agent_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `questions` -- ALTER TABLE `questions` ADD CONSTRAINT `user_agent` FOREIGN KEY (`user_agent_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `question_louder` -- ALTER TABLE `question_louder` ADD CONSTRAINT `qquestion` FOREIGN KEY (`question_id`) REFERENCES `questions` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `users` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `shares` -- ALTER TABLE `shares` ADD CONSTRAINT `question` FOREIGN KEY (`question_id`) REFERENCES `questions` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `useragent` FOREIGN KEY (`user_agent_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `user` -- ALTER TABLE `user` ADD CONSTRAINT `role_id` FOREIGN KEY (`role_id`) REFERENCES `user_roles` (`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 */;
<filename>openGaussBase/testcase/KEYWORDS/Destroy/Opengauss_Function_Keyword_Destroy_Case0022.sql -- @testpoint:opengauss关键字destroy(非保留),作为用户组名 --关键字不带引号-成功 drop group if exists destroy; create group destroy with password '<PASSWORD>'; drop group destroy; --关键字带双引号-成功 drop group if exists "destroy"; create group "destroy" with password '<PASSWORD>'; drop group "destroy"; --关键字带单引号-合理报错 drop group if exists 'destroy'; create group 'destroy' with password '<PASSWORD>'; --关键字带反引号-合理报错 drop group if exists `destroy`; create group `destroy` with password '<PASSWORD>';
<gh_stars>0 /*User*/ insert into user (id, email, fullname, nickname, picture, role) values (1, '<EMAIL>', 'tester001', 'test1', 'none', 'USER'); insert into user (id, email, fullname, nickname, picture, role) values (2, '<EMAIL>', 'tester002', 'test2', 'none', 'USER'); insert into user (id, email, fullname, nickname, picture, role) values (3, '<EMAIL>', 'tester003', 'test3', 'none', 'USER'); insert into user (id, email, fullname, nickname, picture, role) values (4, '<EMAIL>', 'tester004', 'test4', 'none', 'USER'); insert into user (id, email, fullname, nickname, picture, role) values (5, '<EMAIL>', 'tester005', 'test5', 'none', 'USER'); insert into user (id, email, fullname, nickname, picture, role) values (6, '<EMAIL>', 'tester006', 'test6', 'none', 'USER'); insert into user (id, email, fullname, nickname, picture, role) values (7, '<EMAIL>', '<NAME>', 'hwon', 'https://cdn.intra.42.fr/users/hwon.jpg', 'ADMIN'); insert into user (id, email, fullname, nickname, picture, role) values (8, '<EMAIL>', '<NAME>', 'ychoi', 'https://cdn.intra.42.fr/users/ychoi.jpg', 'ADMIN'); insert into user (id, email, fullname, nickname, picture, role) values (9, '<EMAIL>', '<NAME>', 'minkang', 'https://cdn.intra.42.fr/users/minkang.jpg', 'ADMIN'); /*project*/ insert into project (id, name) values (1, 'custom'); insert into project (id, name) values (2, 'ft_libft'); insert into project (id, name) values (3, 'ft_printf'); insert into project (id, name) values (4, 'get_next_line'); /*Team*/ insert into team (id, start_time, end_time, location, max_member_count, status, project_id) values (1, '2021-07-03 13:00:00', '2021-07-03 15:00:00', 'GAEPO', 3, 'READY', 2); insert into team (id, start_time, end_time, location, max_member_count, status, project_id) values (2, '2021-07-04 13:00:00', '2021-07-04 18:00:00', 'ONLINE', 4, 'WAITING', 3); insert into team (id, start_time, end_time, location, max_member_count, status, project_id) values (3, '2021-07-04 11:00:00', '2021-07-04 19:00:00', 'SEOCHO', 4, 'READY', 4); insert into team (id, start_time, end_time, location, max_member_count, status, project_id) values (4, '2021-07-04 13:00:00', '2021-07-04 15:00:00', 'GAEPO', 4, 'WAITING', 2); insert into team (id, start_time, end_time, location, max_member_count, status, project_id) values (5, '2021-07-01 13:00:00', '2021-07-01 15:00:00', 'ONLINE', 3, 'FULL', 2); insert into team (id, start_time, end_time, location, max_member_count, status, project_id) values (6, '2021-07-06 15:00:00', '2021-07-06 16:00:00', 'GAEPO', 3, 'WAITING', 3); insert into team (id, start_time, end_time, location, max_member_count, status, project_id) values (7, '2021-07-10 13:00:00', '2021-07-10 15:00:00', 'ONLINE', 10, 'READY', 4); insert into team (id, start_time, end_time, location, max_member_count, status, project_id) values (8, '2021-07-10 12:00:00', '2021-07-10 15:00:00', 'ONLINE', 3, 'WAITING', 4); insert into team (id, start_time, end_time, location, max_member_count, status, project_id) values (9, '2021-06-30 09:00:00', '2021-06-30 12:00:00', 'ONLINE', 3, 'END', 1); /*member*/ insert into member (id, team_id, user_id, role, creator) values (1, 1, 1, 'MENTEE', 1); insert into member (id, team_id, user_id, role, creator) values (2, 1, 2, 'MENTOR', 0); insert into member (id, team_id, user_id, role, creator) values (3, 2, 1, 'MENTEE', 1); insert into member (id, team_id, user_id, role, creator) values (4, 3, 1, 'MENTEE', 1); insert into member (id, team_id, user_id, role, creator) values (5, 3, 2, 'MENTEE', 0); insert into member (id, team_id, user_id, role, creator) values (6, 3, 3, 'MENTOR', 0); insert into member (id, team_id, user_id, role, creator) values (7, 3, 4, 'MENTEE', 0); insert into member (id, team_id, user_id, role, creator) values (8, 4, 5, 'MENTEE', 1); insert into member (id, team_id, user_id, role, creator) values (9, 5, 1, 'MENTOR', 0); insert into member (id, team_id, user_id, role, creator) values (10, 5, 2, 'MENTEE', 1); insert into member (id, team_id, user_id, role, creator) values (11, 5, 5, 'MENTEE', 0); insert into member (id, team_id, user_id, role, creator) values (12, 6, 2, 'MENTEE', 1); insert into member (id, team_id, user_id, role, creator) values (13, 7, 1, 'MENTEE', 1); insert into member (id, team_id, user_id, role, creator) values (14, 7, 4, 'MENTOR', 0); insert into member (id, team_id, user_id, role, creator) values (15, 8, 2, 'MENTEE', 1); insert into member (id, team_id, user_id, role, creator) values (16, 9, 1, 'MENTEE', 1); insert into member (id, team_id, user_id, role, creator) values (17, 9, 2, 'MENTEE', 0); insert into member (id, team_id, user_id, role, creator) values (18, 9, 3, 'MENTOR', 0);
CREATE SYNONYM [SqlNet].[BeginingOfWeek] FOR [SqlNet].[DateTimeBeginingOfWeek];
<filename>archive_db.sql -- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2.1 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 01-11-2018 a las 17:25:11 -- Versión del servidor: 5.7.24-0ubuntu0.16.04.1 -- Versión de PHP: 7.1.20-1+ubuntu16.04.1+deb.sury.org+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 */; -- -- Base de datos: `archive_db` -- -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `categories` -- CREATE TABLE `categories` ( `id_categorie` int(11) NOT NULL, `name` varchar(45) DEFAULT NULL, `path` varchar(550) DEFAULT NULL, `id_subproject` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `files` -- CREATE TABLE `files` ( `id` int(11) NOT NULL, `path` varchar(550) DEFAULT NULL, `code` varchar(45) DEFAULT NULL, `upload_date` varchar(45) DEFAULT NULL, `id_categorie` int(11) DEFAULT NULL, `name` varchar(255) NOT NULL, `name_unique` varchar(255) DEFAULT NULL, `type` varchar(255) NOT NULL, `user_created` varchar(10) NOT NULL, `date_created` datetime NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Volcado de datos para la tabla `files` -- INSERT INTO `files` (`id`, `path`, `code`, `upload_date`, `id_categorie`, `name`, `name_unique`, `type`, `user_created`, `date_created`) VALUES (1, '/var/www/html/adminsystem/public/storage/app/dfgdfg', NULL, NULL, NULL, 'dfgdfg', NULL, 'directory', 'Javier', '2018-11-01 22:11:45'), (2, '/var/www/html/adminsystem/public/storage/app/nueva', NULL, NULL, NULL, 'nueva', NULL, 'directory', 'Javier', '2018-11-01 22:11:43'), (3, '/var/www/html/adminsystem/public/storage/app/nueva/otra', NULL, NULL, NULL, 'otra', NULL, 'directory', 'Javier', '2018-11-01 22:11:55'), (4, '/var/www/html/adminsystem/public/storage/app/nueva/otra/ggg', NULL, NULL, NULL, 'ggg', NULL, 'directory', 'Javier', '2018-11-01 22:11:12'), (5, '/var/www/html/adminsystem/public/storage/app/adminsystemdb (1).sql', NULL, NULL, NULL, 'adminsystemdb (1).sql', 'daac22737fb698bc8b0ba02bb5ef90a0', 'file', 'Javier', '2018-11-01 22:11:34'), (6, '/var/www/html/adminsystem/public/storage/app/adminsystemdb (1).sql', NULL, NULL, NULL, 'adminsystemdb (1).sql', '9d51d2f88ed5205ac7d3eee272e108e6', 'file', 'Javier', '2018-11-01 22:11:39'), (7, '/var/www/html/adminsystem/public/storage/app/nueva/android.png', NULL, NULL, NULL, 'android.png', 'ed609466727fe055206cdd197b66f00e', 'file', 'Javier', '2018-11-01 22:11:50'); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `migrations` -- CREATE TABLE `migrations` ( `id` int(10) UNSIGNED NOT NULL, `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `batch` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Volcado de datos para la tabla `migrations` -- INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (1, '2014_10_12_000000_create_users_table', 1), (2, '2014_10_12_100000_create_password_resets_table', 1); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `password_resets` -- CREATE TABLE `password_resets` ( `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `projects` -- CREATE TABLE `projects` ( `id_project` int(11) NOT NULL, `name` varchar(125) DEFAULT NULL, `code` varchar(45) DEFAULT NULL, `path` varchar(550) DEFAULT NULL, `created_date` date DEFAULT NULL, `created_date_order` datetime DEFAULT NULL, `id_user` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `subprojects` -- CREATE TABLE `subprojects` ( `id_subproject` int(11) NOT NULL, `name` varchar(45) DEFAULT NULL, `path` varchar(550) DEFAULT NULL, `created_date_order` datetime DEFAULT NULL, `created_date` date DEFAULT NULL, `id_project` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `users` -- CREATE TABLE `users` ( `id` int(10) UNSIGNED NOT NULL, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Volcado de datos para la tabla `users` -- INSERT INTO `users` (`id`, `name`, `email`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES (1, 'Javier', '<EMAIL>', <PASSWORD>/VmUS', NULL, '2018-11-02 04:06:00', '2018-11-02 04:06:00'); -- -- Índices para tablas volcadas -- -- -- Indices de la tabla `categories` -- ALTER TABLE `categories` ADD PRIMARY KEY (`id_categorie`), ADD KEY `fk_files_subprojects1_idx` (`id_subproject`); -- -- Indices de la tabla `files` -- ALTER TABLE `files` ADD PRIMARY KEY (`id`), ADD KEY `fk_files_categories1_idx` (`id_categorie`); -- -- Indices de la tabla `migrations` -- ALTER TABLE `migrations` ADD PRIMARY KEY (`id`); -- -- Indices de la tabla `password_resets` -- ALTER TABLE `password_resets` ADD KEY `password_resets_email_index` (`email`); -- -- Indices de la tabla `projects` -- ALTER TABLE `projects` ADD PRIMARY KEY (`id_project`), ADD KEY `fk_projects_users_idx` (`id_user`); -- -- Indices de la tabla `subprojects` -- ALTER TABLE `subprojects` ADD PRIMARY KEY (`id_subproject`), ADD KEY `fk_subprojects_projects1_idx` (`id_project`); -- -- Indices de la tabla `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `users_email_unique` (`email`); -- -- AUTO_INCREMENT de las tablas volcadas -- -- -- AUTO_INCREMENT de la tabla `categories` -- ALTER TABLE `categories` MODIFY `id_categorie` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla `files` -- ALTER TABLE `files` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; -- -- AUTO_INCREMENT de la tabla `migrations` -- ALTER TABLE `migrations` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT de la tabla `projects` -- ALTER TABLE `projects` MODIFY `id_project` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla `subprojects` -- ALTER TABLE `subprojects` MODIFY `id_subproject` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla `users` -- ALTER TABLE `users` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- Restricciones para tablas volcadas -- -- -- Filtros para la tabla `categories` -- ALTER TABLE `categories` ADD CONSTRAINT `fk_files_subprojects1` FOREIGN KEY (`id_subproject`) REFERENCES `subprojects` (`id_subproject`) ON DELETE NO ACTION ON UPDATE NO ACTION; -- -- Filtros para la tabla `files` -- ALTER TABLE `files` ADD CONSTRAINT `fk_files_categories1` FOREIGN KEY (`id_categorie`) REFERENCES `categories` (`id_categorie`) ON DELETE NO ACTION ON UPDATE NO ACTION; /*!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 */;
<reponame>vasquez8d/CM_VirtualClassroomServices CREATE TABLE tbl_notifications (notf_id INTEGER, notf_text VARCHAR(200), user_id INTEGER, notf_flg_view VARCHAR(1), notf_redirect VARCHAR(200), notf_icon VARCHAR(20), est_registro INTEGER, fec_registro TIMESTAMP, usu_registro VARCHAR(50), CONSTRAINT pk_tbl_notifications PRIMARY KEY (notf_id), CONSTRAINT fk_user_notifications FOREIGN KEY (user_id) REFERENCES tbl_users(user_id)); CREATE TABLE tbl_messages (msg_id INTEGER, msg_text VARCHAR(200), msg_flg_view VARCHAR(1), user_sed INTEGER, user_rec INTEGER, est_registro INTEGER, fec_registro TIMESTAMP, usu_registro VARCHAR(50), CONSTRAINT pk_tbl_messages PRIMARY KEY (msg_id), CONSTRAINT fk_messages_user_sed FOREIGN KEY (user_sed) REFERENCES tbl_users (user_id), CONSTRAINT fk_messages_user_rec FOREIGN KEY (user_rec) REFERENCES tbl_users (user_id));
-- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Feb 14, 2018 at 10:21 AM -- Server version: 5.7.21-0ubuntu0.16.04.1 -- PHP Version: 7.0.25-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: `spk_supir` -- -- -------------------------------------------------------- -- -- Table structure for table `akun` -- CREATE TABLE `akun` ( `id` int(5) NOT NULL, `nama` varchar(125) NOT NULL, `email` varchar(100) NOT NULL, `password` varchar(60) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `akun` -- INSERT INTO `akun` (`id`, `nama`, `email`, `password`) VALUES (7, 'Fitriyanan', '<EMAIL>', <PASSWORD>'), (8, 'andreas', '<EMAIL>', <PASSWORD>'), (9, 'SEO SATU', '<EMAIL>', <PASSWORD>'), (10, 'ee', '<EMAIL>', <PASSWORD>'), (11, 'sanz', '<EMAIL>', <PASSWORD>'), (12, '123123', '<EMAIL>', <PASSWORD>'), (13, 'superadmin', '<EMAIL>', <PASSWORD>'); -- -------------------------------------------------------- -- -- Table structure for table `kriteria` -- CREATE TABLE `kriteria` ( `id_kriteria` int(11) NOT NULL, `nama_kriteria` varchar(50) NOT NULL, `comp_absensi` double NOT NULL, `comp_ketelitain` double NOT NULL, `comp_pemahaman_tugas` double NOT NULL, `comp_kecepatan_layanan` double NOT NULL, `comp_disiplin` double NOT NULL, `comp_semangat_motivasi` double NOT NULL, `comp_tanggung_jawab` double NOT NULL, `comp_sikap` double NOT NULL, `comp_etika` double NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `kriteria` -- INSERT INTO `kriteria` (`id_kriteria`, `nama_kriteria`, `comp_absensi`, `comp_ketelitain`, `comp_pemahaman_tugas`, `comp_kecepatan_layanan`, `comp_disiplin`, `comp_semangat_motivasi`, `comp_tanggung_jawab`, `comp_sikap`, `comp_etika`) VALUES (1, 'seleksi februari 2011', 1, 3, 2, 1, 3, 2, 1, 1, 1); -- -------------------------------------------------------- -- -- Table structure for table `master_kriteria` -- CREATE TABLE `master_kriteria` ( `kriteria_id` int(11) NOT NULL, `nama_kriteria` varchar(50) NOT NULL, `status` int(1) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `master_kriteria` -- INSERT INTO `master_kriteria` (`kriteria_id`, `nama_kriteria`, `status`) VALUES (1, 'absen', 1), (2, 'ketelitian', 1), (3, 'pemahaman tuigas', 1), (4, 'kecepatan layanan', 1), (5, 'disiplin', 1), (6, 'semangat/motivasi', 1), (7, 'tanggung jawab', 1), (8, 'sikap', 1), (9, 'etika', 1); -- -------------------------------------------------------- -- -- Table structure for table `pengguna` -- CREATE TABLE `pengguna` ( `pengguna_id` int(11) NOT NULL, `nama_pengguna` varchar(100) NOT NULL, `email_pengguna` varchar(50) NOT NULL, `kata_sandi` varchar(50) NOT NULL, `status` varchar(50) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `penilaian` -- CREATE TABLE `penilaian` ( `no_induk` int(11) NOT NULL, `absensi` double NOT NULL, `ketelitian` double NOT NULL, `pemahaman_tugas` double NOT NULL, `kecepatan_layanan` double NOT NULL, `disiplin` double NOT NULL, `semangat_motivasi` double NOT NULL, `tanggung_jawab` double NOT NULL, `sikap` double NOT NULL, `etika` double NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `supir` -- CREATE TABLE `supir` ( `no_induk` int(11) NOT NULL, `no_ktp` char(16) NOT NULL, `nama_lengkap` varchar(50) NOT NULL, `alamat_sekarang` varchar(150) NOT NULL, `kabupaten_kota` varchar(50) NOT NULL, `Provinsi` varchar(50) NOT NULL, `jenis_kelamin` varchar(50) NOT NULL, `tempat_lahir` varchar(50) NOT NULL, `tgl_lahir` date NOT NULL, `no_telp` char(50) NOT NULL, `status_perkawinan` varchar(20) NOT NULL, `mulai_kerja` date NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `supir` -- INSERT INTO `supir` (`no_induk`, `no_ktp`, `nama_lengkap`, `alamat_sekarang`, `kabupaten_kota`, `Provinsi`, `jenis_kelamin`, `tempat_lahir`, `tgl_lahir`, `no_telp`, `status_perkawinan`, `mulai_kerja`) VALUES (1, '1567893625725635', 'Wahyudi', 'Jl.Angkasa Raya Indah Blok B 2 No.5', 'Bekasi', 'Jawa Barat', 'Laki-Laki', 'Bandung', '1987-04-06', '081234562910', 'KAWIN', '2012-09-05'), (2, '0006534567814356', '<NAME>', 'Jl.Mawar Blok AA3 No.123 Taman Harapan Indah', 'Bekasi', 'Jawa Barat', 'Laki-Laki', 'Jakarta', '1990-01-07', '08123528197', 'KAWIN', '2014-02-13'), (3, '2006534567814356', '<NAME>', 'Jl.Kencana Raya Blok BB25 Jati Makmur', 'Jakarta', 'DKI-Jakarta', 'Laki-Laki', 'Purwokertoerrr', '1984-09-14', '081246382619', 'BELUM KAWIN', '2014-02-11'), (4, '1226740007946750', '<NAME>', 'Jl,Amanah barat Blok C89 Tambun Selatan', 'Bekasi', 'Jawa Barat', 'Laki-Laki', 'Bekasi', '2087-03-14', '081386985500', 'KAWIN', '2017-02-06'), (5, '1036740007946750', '<NAME>', 'Jl,Wibawa Mukti Blok A87 Tambun Utara', 'Bekasi', 'Jawa Barat', 'Laki-Laki', 'Cianjur', '1987-05-13', '081788557812', 'KAWIN', '2008-03-07'), (6, '1110008976453337', 'Ansori', 'Jl.Anggrek 5 Blok L No.45', 'Bekasi', 'Jawa Barat', 'Laki-Laki', 'Kuningan', '1977-07-27', '081275391313', 'KAWIN', '2016-03-14'), (7, '1110002226453337', '<NAME>', 'Jl.Anggrek 3 Blok B No.47', 'Bekasi', 'Jawa Barat', 'Laki-Laki', 'Tasik Malaya', '1988-02-13', '081233391313', 'BELUM KAWIN', '2016-02-19'), (8, '0006534222814356', '<NAME>', 'Jl.Kd.Bege Merah Kp.Udik No.18', 'Karawang', 'Jawa Barat', 'Laki-Laki', 'Karawang', '1987-06-13', '081234242446', 'KAWIN', '2017-02-12'), (9, '0008124222814356', '<NAME>', 'Jl.Bumi Sani Blok A No.23', 'Bekasi', 'Jawa Barat', 'Laki-Laki', 'Garut', '1989-01-14', '08123313134', 'KAWIN', '2017-05-12'), (10, '122674000790001', 'Sularso', 'Jl.Melati Raya Rt.05 RW.06 No.77', 'Solo', 'Jawa Tengah', 'Laki-Laki', 'Solo', '1985-08-21', '0814612863891', 'KAWIN', '2013-08-12'); -- -- Indexes for dumped tables -- -- -- Indexes for table `akun` -- ALTER TABLE `akun` ADD PRIMARY KEY (`id`); -- -- Indexes for table `kriteria` -- ALTER TABLE `kriteria` ADD PRIMARY KEY (`id_kriteria`); -- -- Indexes for table `master_kriteria` -- ALTER TABLE `master_kriteria` ADD PRIMARY KEY (`kriteria_id`); -- -- Indexes for table `pengguna` -- ALTER TABLE `pengguna` ADD PRIMARY KEY (`pengguna_id`), ADD UNIQUE KEY `email_pengguna` (`email_pengguna`), ADD KEY `nama_pengguna` (`nama_pengguna`), ADD KEY `kata_sandi` (`kata_sandi`), ADD KEY `status` (`status`); -- -- Indexes for table `penilaian` -- ALTER TABLE `penilaian` ADD PRIMARY KEY (`no_induk`); -- -- Indexes for table `supir` -- ALTER TABLE `supir` ADD PRIMARY KEY (`no_induk`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `akun` -- ALTER TABLE `akun` MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14; -- -- AUTO_INCREMENT for table `master_kriteria` -- ALTER TABLE `master_kriteria` MODIFY `kriteria_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; -- -- AUTO_INCREMENT for table `supir` -- ALTER TABLE `supir` MODIFY `no_induk` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11; /*!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 */;
select name as "Media ID:Link/Media:100", media_sub_type as `Sub Type`, media_owner as "Media Owner:Data:120", external_id as `External ID::100`, tape_title as `Tape Title`, tape_standard as `Tape Standard`, tape_manufacturer as `Tape Manufacturer`, tape_runtime_mins as `Tape Runtime (mins)` from `tabMedia` where media_type='Tape' order by modified desc
<reponame>aldohardiansyah/NgobrolBuku -- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jul 13, 2017 at 06:21 PM -- Server version: 10.1.19-MariaDB -- PHP Version: 5.6.28 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: `ngobrolbuku` -- -- -------------------------------------------------------- -- -- Table structure for table `tbl_diskusi` -- CREATE TABLE `tbl_diskusi` ( `diskusi_ID` mediumint(8) NOT NULL, `akun_ID` mediumint(8) NOT NULL, `created_on` date NOT NULL, `diskusi_isi` longtext NOT NULL, `diskusi_judul` varchar(30) NOT NULL, `diskusi_kategori` varchar(20) NOT NULL, `diskusi_gambar` text NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `tbl_diskusi` -- INSERT INTO `tbl_diskusi` (`diskusi_ID`, `akun_ID`, `created_on`, `diskusi_isi`, `diskusi_judul`, `diskusi_kategori`, `diskusi_gambar`) VALUES (1, 1, '2017-07-08', 'Oasis adalah band rock influental asal Inggris yang dibentuk di Manchester pada tahun 1991. Pada awalnya menggunakan nama The Rain, grup ini dibentuk oleh Liam Gallagher (vokal), <NAME> (gitar), <NAME> (bass), dan <NAME> (drum dan perkusi), hingga kemudian ikut bergabung pula kakak Liam, <NAME> (gitar dan vokal). Setelah mengganti nama menjadi Oasis, para anggotanya menandatangani kontrak dengan label rekaman indie Creation Records dan setelah itu merilis album perdana mereka Definitely Maybe pada tahun 1994. Tahun berikutnya, Oasis merilis (What''s the Story) Morning Glory? bersama drummer baru <NAME> di tengah persaingan dengan band britpop lain, Blur. Gallagher bersaudara juga secara berkala menjadi topik dalam tabloid dan berita atas gaya hidup liar dan perselisihan mereka. Pada tahun 1997, Oasis merilis album ketiga mereka, Be Here Now. Walaupun album memiliki angka penjualan tercepat dalam sejarah Inggris, popularitas album ketiga mereka menurun dengan sangat cepat. Oasis kemudian kehilangan anggota <NAME> dan <NAME> ketika mereka dalam proses rekaman dan akan merilis Standing on the Shoulder of Giants pada tahun 2000. Dua posisi kosong tersebut kemudian digantikan oleh <NAME> dan <NAME>. Oasis berhasil menemukan kesuksesan dan popularitas kembali melalui album Don''t Believe the Truth pada tahun 2005.[1] Pada Agustus 2009, <NAME> mengumumkan pengunduran dirinya dari Oasis pasca perkelahian belakang panggung dengan Liam.[2][3][4] Anggota tersisa dari Oasis, dipimpin oleh <NAME>, memutuskan untuk melanjutkan pekerjaan mereka bersama di bawah nama Beady Eye,[5] sementara Noel membentuk proyek solo Noel Gallagher''s High Flying Birds.', 'The Greatest One: Oasis', 'Cari Barang', 'upl_oasis.jpg'), (3, 1, '2017-07-13', '<p><strong>Blur</strong> adalah sebuah grup musik rock asal Inggris yang didirikan di Colchester pada tahun 1989 dengan nama Seymour di Goldsmiths College dari mantan personel suatu band yang bernama Circus. Anggota awal dari band ini adalah <NAME> sebagai vokalis/keyboardis, <NAME> sebagai pemain gitar dan <em>back</em>-vokal, dan <NAME> sebagai pemain drum. <NAME> kemudian bergabung sebagai pemain bass. Blur dianggap sebagai ikon dari aliran musik Britpop dan termasuk salah satu band yang sukses baik dari sudut pandang kritikus maupun komersil.</p><p>Pada tahun 2002, <NAME> meninggalkan Blur di saat mereka merekam album Think Tank. Blur kemudian menyelesaikan album tersebut pada 2003. Mereka juga melaksanakan tour dengan menyewa mantan gitaris The Verve, Simon Tong. Sejak akhir tour mereka pada tahun 2003, Blur menjadi tidak aktif karena anggotanya lebih berkonsentrasi pada proyek solo mereka masing-masing.</p>', 'Blur', 'Cari Barang', 'upl_blur.jpg'); -- -- Indexes for dumped tables -- -- -- Indexes for table `tbl_diskusi` -- ALTER TABLE `tbl_diskusi` ADD PRIMARY KEY (`diskusi_ID`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `tbl_diskusi` -- ALTER TABLE `tbl_diskusi` MODIFY `diskusi_ID` mediumint(8) 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 */;
<reponame>KMalif/Java_CRUD_APOTEK -- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 03 Jan 2021 pada 13.41 -- Versi server: 10.4.14-MariaDB -- Versi PHP: 7.2.33 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: `dbapotek` -- -- -------------------------------------------------------- -- -- Struktur dari tabel `admin` -- CREATE TABLE `admin` ( `id` int(20) NOT NULL, `admin_username` varchar(20) NOT NULL, `admin_password` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data untuk tabel `admin` -- INSERT INTO `admin` (`id`, `admin_username`, `admin_password`) VALUES (1, 'alif', '<PASSWORD>'), (2, 'admin', 'admin'), (3, 'admin', '<PASSWORD>'); -- -------------------------------------------------------- -- -- Struktur dari tabel `tb_obat` -- CREATE TABLE `tb_obat` ( `id_obat` int(11) NOT NULL, `nama_obat` varchar(50) NOT NULL, `jumlah_obat` varchar(50) NOT NULL, `deskripsi` varchar(50) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data untuk tabel `tb_obat` -- INSERT INTO `tb_obat` (`id_obat`, `nama_obat`, `jumlah_obat`, `deskripsi`) VALUES (1, '<NAME>', '100', 'Tahan Lama'); -- -- Indexes for dumped tables -- -- -- Indeks untuk tabel `admin` -- ALTER TABLE `admin` ADD PRIMARY KEY (`id`); -- -- Indeks untuk tabel `tb_obat` -- ALTER TABLE `tb_obat` ADD PRIMARY KEY (`id_obat`); -- -- AUTO_INCREMENT untuk tabel yang dibuang -- -- -- AUTO_INCREMENT untuk tabel `tb_obat` -- ALTER TABLE `tb_obat` MODIFY `id_obat` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; 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 */;
<reponame>ridridku/adminlte /* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50516 Source Host : localhost:3306 Source Database : cendana Target Server Type : MYSQL Target Server Version : 50516 File Encoding : 65001 Date: 2017-10-11 08:58:57 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for admin -- ---------------------------- DROP TABLE IF EXISTS `admin`; CREATE TABLE `admin` ( `id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(15) DEFAULT NULL, `password` varchar(50) DEFAULT NULL, `nama` varchar(50) DEFAULT NULL, `foto` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1; -- ---------------------------- -- Records of admin -- ---------------------------- INSERT INTO `admin` VALUES ('1', 'admin', '<PASSWORD>', 'Oziluwfar', 'profil2.jpg'); INSERT INTO `admin` VALUES ('2', 'tgl_hrd', 'f4e404c7f815fc68e7ce8e3c2e61e347', 'Mesut ', 'profil2.jpg'); -- ---------------------------- -- Table structure for kelamin -- ---------------------------- DROP TABLE IF EXISTS `kelamin`; CREATE TABLE `kelamin` ( `id` int(11) NOT NULL, `nama` varchar(50) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- ---------------------------- -- Records of kelamin -- ---------------------------- INSERT INTO `kelamin` VALUES ('1', 'Laki laki'); INSERT INTO `kelamin` VALUES ('2', 'Perempuan'); -- ---------------------------- -- Table structure for kota -- ---------------------------- DROP TABLE IF EXISTS `kota`; CREATE TABLE `kota` ( `id` int(11) NOT NULL AUTO_INCREMENT, `nama` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=latin1; -- ---------------------------- -- Records of kota -- ---------------------------- INSERT INTO `kota` VALUES ('1', 'Malang'); INSERT INTO `kota` VALUES ('3', 'Blitar'); INSERT INTO `kota` VALUES ('4', 'Tulungagung'); INSERT INTO `kota` VALUES ('17', 'Jakarta'); INSERT INTO `kota` VALUES ('21', 'Surabaya'); INSERT INTO `kota` VALUES ('22', 'Paris'); INSERT INTO `kota` VALUES ('23', 'BRU'); INSERT INTO `kota` VALUES ('24', 'A'); INSERT INTO `kota` VALUES ('25', 'Ss'); INSERT INTO `kota` VALUES ('26', 'Bb'); INSERT INTO `kota` VALUES ('27', 'Vv'); INSERT INTO `kota` VALUES ('28', 'V'); -- ---------------------------- -- Table structure for pegawai -- ---------------------------- DROP TABLE IF EXISTS `pegawai`; CREATE TABLE `pegawai` ( `id` varchar(255) NOT NULL, `nama` varchar(255) DEFAULT NULL, `telp` varchar(255) DEFAULT NULL, `id_kota` int(11) DEFAULT NULL, `id_kelamin` int(1) DEFAULT NULL, `id_posisi` int(11) DEFAULT NULL, `status` int(1) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- ---------------------------- -- Records of pegawai -- ---------------------------- INSERT INTO `pegawai` VALUES ('9', 'zzzzzz', '085736333728', '1', '1', '2', '1'); INSERT INTO `pegawai` VALUES ('11', '<NAME>', '081330493322', '1', '1', '3', '1'); INSERT INTO `pegawai` VALUES ('12', '<NAME>', '083854520015', '1', '1', '2', '1'); INSERT INTO `pegawai` VALUES ('13', '<NAME>', '085749535400', '3', '1', '2', '1'); INSERT INTO `pegawai` VALUES ('14', '<NAME>', '08984119934', '2', '1', '1', '1'); INSERT INTO `pegawai` VALUES ('15', 'Rizal Ferdian', '087777284179', '1', '1', '3', '1'); INSERT INTO `pegawai` VALUES ('16', 'Red<NAME>ga Pratama', '083834657395', '1', '1', '3', '1'); INSERT INTO `pegawai` VALUES ('8', 'Tolkha Hasan', '081233072122', '1', '1', '4', '1'); INSERT INTO `pegawai` VALUES ('10', '<NAME>', '085745966707', '4', '1', '4', '1'); INSERT INTO `pegawai` VALUES ('1', 'Tolkha Hasan', '081233072122', '1', '1', '4', '1'); INSERT INTO `pegawai` VALUES ('2', '<NAME>', '085736333728', '1', '1', '2', '1'); INSERT INTO `pegawai` VALUES ('3', '<NAME>', '085745966707', '4', '1', '4', '1'); INSERT INTO `pegawai` VALUES ('4', '<NAME>', '081330493322', '1', '1', '3', '1'); INSERT INTO `pegawai` VALUES ('5', '<NAME>', '083854520015', '1', '1', '2', '1'); INSERT INTO `pegawai` VALUES ('6', '<NAME>', '085749535400', '3', '1', '2', '1'); INSERT INTO `pegawai` VALUES ('7', '<NAME>', '08984119934', '2', '1', '1', '1'); -- ---------------------------- -- Table structure for posisi -- ---------------------------- DROP TABLE IF EXISTS `posisi`; CREATE TABLE `posisi` ( `id` int(11) NOT NULL AUTO_INCREMENT, `nama` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1; -- ---------------------------- -- Records of posisi -- ---------------------------- INSERT INTO `posisi` VALUES ('1', 'IT KOMPUTER'); INSERT INTO `posisi` VALUES ('2', 'HRD'); INSERT INTO `posisi` VALUES ('3', 'Keuangan'); INSERT INTO `posisi` VALUES ('4', 'Produk'); INSERT INTO `posisi` VALUES ('5', 'Web Developer'); -- ---------------------------- -- Table structure for tbl_ecom -- ---------------------------- DROP TABLE IF EXISTS `tbl_ecom`; CREATE TABLE `tbl_ecom` ( `ORDER_SN` varchar(255) NOT NULL, `PRODUCT_ID` varchar(255) NOT NULL, `SKU_FOR_PRODUCT_ID` varchar(255) DEFAULT NULL, `MODEL_ID` varchar(255) DEFAULT NULL, `NO_INDUK_FOR_MODEL_ID` varchar(255) DEFAULT NULL, `ITEM_NAME` varchar(255) DEFAULT NULL, `MODEL_NAME` varchar(255) DEFAULT NULL, `QTY` varchar(255) DEFAULT NULL, `ORDER_VALUE` varchar(255) DEFAULT NULL, `SHIPPING_OPTION` varchar(255) DEFAULT NULL, `SHIPPING_PAID_BY_BUYER` varchar(255) DEFAULT NULL, `BUYER_USER_ID` varchar(255) DEFAULT NULL, `BUYER_USER_NAME` varchar(255) DEFAULT NULL, `BUYER_REAL_NAME` varchar(255) DEFAULT NULL, `TEL_BUYER` varchar(255) DEFAULT NULL, `BUYER_ADDRES` varchar(255) DEFAULT NULL, `BUYER_NOTE` varchar(255) DEFAULT NULL, `PURCHASED_DATE` date DEFAULT NULL, `SPESIFIC_PURCHASE_TIME` datetime DEFAULT NULL, `PAY_DATE` date DEFAULT NULL, `SPECIFIC_PAY_TIME` datetime DEFAULT NULL, `ORDER_STATUS` varchar(255) DEFAULT NULL, `SHIPPING_PAID_BY_SHOPEE` varchar(255) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- ---------------------------- -- Records of tbl_ecom -- ---------------------------- INSERT INTO `tbl_ecom` VALUES ('17092610157HYT8', '82236203', 'bundling 10000040 & 10000500', '0', '', 'Olay Total Effects 7 in 1 Day Cream Normal SPF 15 (50 gr)', '', '1', '99000', 'J&T Express', '0', '8744010', 'dithaarbas', '<NAME>', '6285813574480', 'PT. MULTISUKSES WAHANA KARYA (HIGHLANDER GENSET) Pergudangan prima center 1 blok d no.5 jl. Pool ppd pesing, jakarta barat, KOTA JAKARTA BARAT, CENGKARENG, DKI JAKARTA, ID, 11710', 'Kirim hari ini via GOJEK. Thankyou', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '10000'); INSERT INTO `tbl_ecom` VALUES ('17092610157HYT8', '82236213', '055551', '0', '', 'Olay Total Effects 7in1 Anti-ageing Night Cream 50gr', '', '1', '99000', 'J&T Express', '0', '8744010', 'dithaarbas', '<NAME>', '6285813574480', 'PT. MULTISUKSES WAHANA KARYA (HIGHLANDER GENSET) Pergudangan prima center 1 blok d no.5 jl. Pool ppd pesing, jakarta barat, KOTA JAKARTA BARAT, CENGKARENG, DKI JAKARTA, ID, 11710', 'Kirim hari ini via GOJEK. Thankyou', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '10000'); INSERT INTO `tbl_ecom` VALUES ('170926231876SRC', '338484025', 'bundling 10000040 & 10000500', '244732789', '10000040 & 10000500', 'Pantene Sampo 480ml FREE Kondisioner 3 Minutes Miracle 180ml ( Hairfall Control )', 'Hairfall Control', '1', '56280', 'J&T Express', '0', '29779015', 'ucha_hs', 'Yusra Dian', '6289611205702', 'Perum bukit asri blok A5 no.14, KAB. BOGOR, CIOMAS, JAWA BARAT, ID, 16610', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '20000'); INSERT INTO `tbl_ecom` VALUES ('170926231876SRC', '398447324', '10000637', '0', '', 'Downy Pelembut Pakaian Passion Refill 800ml ( PULAU JAWA DAN LAMPUNG ONLY )', '', '1', '28500', 'J&T Express', '0', '29779015', 'ucha_hs', 'Yusra Dian', '6289611205702', 'Perum bukit asri blok A5 no.14, KAB. BOGOR, CIOMAS, JAWA BARAT, ID, 16610', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '20000'); INSERT INTO `tbl_ecom` VALUES ('170926234677DW3', '338484025', 'bundling 10000040 & 10000500', '244732789', '10000040 & 10000500', 'Pantene Sampo 480ml FREE Kondisioner 3 Minutes Miracle 180ml ( Hairfall Control )', 'Hairfall Control', '1', '56280', 'J&T Express', '10000', '2267022', 'dloving_shop', '<NAME>', '6287878418645', 'Ruko kapuk muara blok C32 RT06/01 ( DEKAT PABRIK BAKSO IKAN), KOTA JAKARTA UTARA, PENJARINGAN, DKI JAKARTA, ID, 14460', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '0'); INSERT INTO `tbl_ecom` VALUES ('17092606497EQDK', '472092686', '10000582 bundling', '0', '', 'Paket isi 2 - Rejoice Sampo Rich Halus Lembut 340ml', '', '1', '63800', 'J&T Express', '10000', '13536030', '081225916930_ayu.', 'Ayu', '6281225916930', 'Kontrakan Cijingga Rt001/Rw002 serang cikarang selatan kontrakan bapak haji yanto vermax levis kamar 1131, KAB. BEKASI, CIKARANG SELATAN, JAWA BARAT, ID, 57550', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '0'); INSERT INTO `tbl_ecom` VALUES ('170926232276VNH', '338484025', 'bundling 10000040 & 10000500', '244732789', '10000040 & 10000500', 'Pantene Sampo 480ml FREE Kondisioner 3 Minutes Miracle 180ml ( Hairfall Control )', 'Hairfall Control', '1', '56280', 'J&T Express', '10000', '36267034', 'neni_89', 'Neni', '6282214931528', 'Jln. Tegar beriman gg.al-kinanah no 73 rt. 03/04 kel. Pakansari Kec. Cibinong, KAB. BOGOR, CIBINONG, JAWA BARAT, ID, 16915', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '0'); INSERT INTO `tbl_ecom` VALUES ('17092523227AP34', '433704566', 'bundling 055551 & 055531', '0', '', 'Olay Set Perawatan Anti Aging', '', '1', '189670', 'J&T Express', '0', '9452044', 'amilickitung', 'Ventino Bayu Diarga', '6285233517511', 'Instalasi Radiologi.Jl Raya Tlogomas no 45 Landungsari, Dau, Malang, KAB. MALANG, DAU, JAWA TIMUR, ID, 65151', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '26000'); INSERT INTO `tbl_ecom` VALUES ('170924203779VFA', '95550229', '076173', '0', '', 'Gillette Foamy Shave Cream Menthol 175gr ( PULAU JAWA DAN LAMPUNG ONLY )', '', '1', '33000', 'J&T Express', '0', '7071045', 'bagja.kurnia', 'BAGJA KURNIA ( ADE )', '6289628910845', 'Dsn. Bumirejo Gg. 1 No. 17 RT/RW : 02/06 Ds. Cukir, KAB. JOMBANG, DIWEK, JAWA TIMUR, ID, 61471', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '30000'); INSERT INTO `tbl_ecom` VALUES ('170924203779VFA', '480912386', '10000641 bundling isi 2', '0', '', 'Paket isi 2 - Gillette Pisau Cukur Blue Simple 3 Isi 4', '', '1', '52000', 'J&T Express', '0', '7071045', 'bagja.kurnia', 'BAGJA KURNIA ( ADE )', '6289628910845', 'Dsn. Bumirejo Gg. 1 No. 17 RT/RW : 02/06 Ds. Cukir, KAB. JOMBANG, DIWEK, JAWA TIMUR, ID, 61471', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '30000'); INSERT INTO `tbl_ecom` VALUES ('170925221478TFT', '82157873', '10000524', '0', '', 'Head & Shoulder Sampo Cool Menthol (2 pcs x 480 ml)', '', '1', '84600', 'J&T Express', '0', '3485045', 'anindyaolshop', 'ida saida', '6287775511942', 'jl.pulo makmur rt 04 rw 12 no.35 kel.gandaria utara, KOTA JAKARTA SELATAN, KEBAYORAN BARU, DKI JAKARTA, ID, 12140', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '20000'); INSERT INTO `tbl_ecom` VALUES ('1709241911784K9', '227296337', '10000567', '0', '', 'Head & Shoulder Sampo Cool Menthol Iconic 330ml', '', '1', '39900', 'J&T Express', '0', '12382051', 'naffiworld', '<NAME>', '6285271506060', '<NAME> (LORONG KOLONG), LR. SWADAYA MURNI III, NO.19 - PARIT SEBELAS - TEMBILAHAN KOTA., KAB. INDRAGIRI HILIR, TEMBILAHAN, RIAU, ID, 29212', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '39000'); INSERT INTO `tbl_ecom` VALUES ('1709241911784K9', '480912386', '10000641 bundling isi 2', '0', '', 'Paket isi 2 - Gillette Pisau Cukur Blue Simple 3 Isi 4', '', '1', '52000', 'J&T Express', '0', '12382051', 'naffiworld', '<NAME>', '6285271506060', '<NAME> (LORONG KOLONG), LR. SWADAYA MURNI III, NO.19 - PARIT SEBELAS - TEMBILAHAN KOTA., KAB. INDRAGIRI HILIR, TEMBILAHAN, RIAU, ID, 29212', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '39000'); INSERT INTO `tbl_ecom` VALUES ('170926190570Q5C', '92748873', '100011', '0', '', 'Whisper Reguler Flow Wings 40s', '', '1', '47500', 'J&T Express', '10000', '31064061', 'kessy71', 'kessy', '6281574590026', 'PT. Buccheri Indonesia, Ruko Centra Latumenten Blok G3, Jln Latumenten Raya No.50, KOTA JAKARTA BARAT, GROGOL PETAMBURAN, DKI JAKARTA, ID, 11460', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '30000'); INSERT INTO `tbl_ecom` VALUES ('170926190570Q5C', '92749074', '130006', '0', '', 'Whisper Regular Flow Wings 20s', '', '1', '25700', 'J&T Express', '10000', '31064061', 'kessy71', 'kessy', '6281574590026', 'PT. Buccheri Indonesia, Ruko Centra Latumenten Blok G3, Jln Latumenten Raya No.50, KOTA JAKARTA BARAT, GROGOL PETAMBURAN, DKI JAKARTA, ID, 11460', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '30000'); INSERT INTO `tbl_ecom` VALUES ('17092615187T1MN', '82236203', '055531', '0', '', 'Olay Total Effects 7 in 1 Day Cream Normal SPF 15 (50 gr)', '', '1', '99000', 'J&T Express', '0', '25469076', 'betty170987', 'Wahyuningrum', '6281332226069', 'Jalan kembang turi no 9, RT:02, RW:04, KOTA MALANG, LOWOKWARU, JAWA TIMUR, ID, 65141', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '22000'); INSERT INTO `tbl_ecom` VALUES ('170925193774SKS', '85395556', '055175', '0', '', 'Olay Total Effects 7in1 Day Cream Touch of Foundation SPF 15 50gr', '', '1', '99000', 'J&T Express', '0', '33387087', 'tety1404', 'Inkeu', '6285221919600', 'Bni syariah kcp astana anyar jl kopo no 61 A bandung, KOTA BANDUNG, ASTANA ANYAR, JAWA BARAT, ID, 40241', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '11000'); INSERT INTO `tbl_ecom` VALUES ('1709262330772B2', '338484025', 'bundling 10000040 & 10000500', '244732789', '10000040 & 10000500', 'Pantene Sampo 480ml FREE Kondisioner 3 Minutes Miracle 180ml ( Hairfall Control )', 'Hairfall Control', '1', '56280', 'J&T Express', '0', '31169090', 'sucinuril', 'Suci', '6285217290003', 'Green Palace, Palem 10-AF, Jl. Kalibata Raya No. 1 Rawajati, KOTA JAKARTA SELATAN, PANCORAN, DKI JAKARTA, ID, 12750', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '30000'); INSERT INTO `tbl_ecom` VALUES ('170926230776G6P', '338484025', 'bundling 10000040 & 10000500', '244732789', '10000040 & 10000500', 'Pantene Sampo 480ml FREE Kondisioner 3 Minutes Miracle 180ml ( Hairfall Control )', 'Hairfall Control', '1', '56280', 'J&T Express', '10000', '19959095', 've2shop', 'Veve', '6287808161889', 'Perumahan poris indah jln melati2 blok c no 563 cipondoh tgr banten, KOTA TANGERANG, CIPONDOH, BANTEN, ID, 15148', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '0'); INSERT INTO `tbl_ecom` VALUES ('170926233277498', '338484025', 'bundling 10000040 & 10000500', '244732789', '10000040 & 10000500', 'Pantene Sampo 480ml FREE Kondisioner 3 Minutes Miracle 180ml ( Hairfall Control )', 'Hairfall Control', '1', '56280', 'J&T Express', '11000', '34540096', 'dhikasatriyo', 'Dhika satriyo', '6287822431618', 'Jl.Taman sari gang lurah hormat Rt3. Rw.13 no.87/58 kost pondok lurah hormat kec. Bandung wetan 40116(intruksi wateg sumber jaya, KOTA BANDUNG, BANDUNG WETAN, JAWA BARAT, ID, 40116', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '0'); INSERT INTO `tbl_ecom` VALUES ('17092617427WGEA', '118484883', '10000525', '0', '', 'Head & Shoulder Sampo Smooth & Silky 480ml', '', '2', '89800', 'J&T Express', '0', '21201108', 'vie0403', 'Viena', '6281289979786', 'Jalan tambora 1 no.19 , rt 009/02 , jembatan lima , jakarta barat, KOTA JAKARTA BARAT, TAMBORA, DKI JAKARTA, ID, 11220', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '10000'); INSERT INTO `tbl_ecom` VALUES ('17092609017GDQ0', '433704566', 'bundling 055551 & 055531', '0', '', 'Olay Set Perawatan Anti Aging', '', '1', '189670', 'J&T Express', '0', '8339109', 'ganiiaaa', 'G<NAME>', '6285222276519', 'Komp.Giri mande A 4 no. 4 Cikadut, KOTA BANDUNG, MANDALAJATI, JAWA BARAT, ID, 40195', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '11000'); INSERT INTO `tbl_ecom` VALUES ('17092609557HG7E', '433704566', 'bundling 055551 & 055531', '0', '', 'Olay Set Perawatan Anti Aging', '', '1', '189670', 'J&T Express', '0', '22827114', 'dedehdudin', 'Dedeh (Dudin Kamaludin)', '6285654839085', 'Dedeh (Dudin Kamaludin) | Jln. RE Martadinata Belakang 272 | RT/RW 01/01 | kec.indihiang | Desa Panyingkiran Indihiang, kota Tasikmalaya, KOTA TASIKMALAYA, INDIHIANG, JAWA BARAT, ID, 46151', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '14000'); INSERT INTO `tbl_ecom` VALUES ('170926200472117', '82236203', '055531', '0', '', 'Olay Total Effects 7 in 1 Day Cream Normal SPF 15 (50 gr)', '', '1', '99000', 'J&T Express', '0', '17972115', 'yudirobiantoro', 'Yudi', '6281380192507', 'Alfamart alam sutera 2,jalan jalur sutra Tangerang alam sutera, KOTA TANGERANG, PINANG (PENANG), BANTEN, ID, 84521', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '10000'); INSERT INTO `tbl_ecom` VALUES ('17092609587HJBR', '433704566', 'bundling 055551 & 055531', '0', '', 'Olay Set Perawatan Anti Aging', '', '1', '189670', 'J&T Express', '0', '26151126', 'citraa3', 'Citra Kurniawan', '6281289590052', 'INDOSURYA SIMPAN PINJAM JL JENDRAL SUDIRMAN RUKO TANGERANG CITY BUSINESS PARK BLOK D 1 KEC. CIKOKOL, KEL. TANGERANG, KOTA TANGERANG, TANGERANG, BANTEN, ID, 15117', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '10000'); INSERT INTO `tbl_ecom` VALUES ('1709262328770V4', '338484025', 'bundling 10000040 & 10000500', '244732789', '10000040 & 10000500', 'Pantene Sampo 480ml FREE Kondisioner 3 Minutes Miracle 180ml ( Hairfall Control )', 'Hairfall Control', '1', '56280', 'J&T Express', '10000', '10566128', 'niniknurjanah', '<NAME>', '628569044326', 'Pondok Pakulonan Blok M 12 No.7 RT 02/05 Kel.Pakualam, KOTA TANGERANG SELATAN, SERPONG UTARA, BANTEN, ID, 15325', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '0'); INSERT INTO `tbl_ecom` VALUES ('1709262330772AA', '95383572', '', '75890760', '10000501', 'Pantene Conditioner 3 Minutes Miracle Quantum (180ml)', 'Total Damage Care', '2', '43000', 'J&T Express', '11000', '18953129', 'lsuna', 'Lie susiana', '6289629679473', 'Tb. Papanggo(toko bangunan) desa mekarsari jln. Kadu ngampar, citeras, KAB. LEBAK, RANGKASBITUNG, BANTEN, ID, 42312', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '0'); INSERT INTO `tbl_ecom` VALUES ('1709262330772AA', '338484025', 'bundling 10000040 & 10000500', '244732789', '10000040 & 10000500', 'Pantene Sampo 480ml FREE Kondisioner 3 Minutes Miracle 180ml ( Hairfall Control )', 'Hairfall Control', '1', '56280', 'J&T Express', '11000', '18953129', 'lsuna', 'Lie susiana', '6289629679473', 'Tb. Papanggo(toko bangunan) desa mekarsari jln. Kadu ngampar, citeras, KAB. LEBAK, RANGKASBITUNG, BANTEN, ID, 42312', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '0'); INSERT INTO `tbl_ecom` VALUES ('17092605507EBAD', '433704566', 'bundling 055551 & 055531', '0', '', 'Olay Set Perawatan Anti Aging', '', '1', '189670', 'J&T Express', '0', '20588133', 'nokir70', '<NAME>', '6285257865550', 'perum Griya Mapan Jln Bandung F No 08 KACONGAN SUMENEP, KAB. SUMENEP, KOTA SUMENEP, JAWA TIMUR, ID, 69451', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '30000'); INSERT INTO `tbl_ecom` VALUES ('17092514497VD0M', '82236209', '055581', '0', '', 'Olay Total Effects 7in1 Day Cream Gentle SPF 15 50gr', '', '1', '99000', 'J&T Express', '0', '3274136', 'kawaiisugoishop', 'Della', '6289653354645', 'Jl. Cideng jaya gg bribin no 19 rt 16 rw 04 desa kertawinangun, KAB. CIREBON, KEDAWUNG, JAWA BARAT, ID, 45153', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '14000'); INSERT INTO `tbl_ecom` VALUES ('170926232276VVN', '338484025', 'bundling 10000040 & 10000500', '244732789', '10000040 & 10000500', 'Pantene Sampo 480ml FREE Kondisioner 3 Minutes Miracle 180ml ( Hairfall Control )', 'Hairfall Control', '1', '56280', 'J&T Express', '11000', '24759141', 'yelisite', 'yeliana o<drg.Weliamo< ', '6289671201375', 'Jl. Sadireja no. 310/41 Rt 02/ RW03, Sukamaju, Cibeunying Kidul 40121, KOTA BANDUNG, CIBEUNYING KIDUL, JAWA BARAT, ID, 40121', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '0'); INSERT INTO `tbl_ecom` VALUES ('170926230576F2X', '224986193', '056043', '0', '', 'Olay White Radiance Intensive Lotion (30 ml)', '', '1', '27900', 'J&T Express', '0', '3727142', 'wardasamira', 'Noni basyarahil', '6285866257181', 'd.a Kantor Kementerian Agama Kota Pekalongan Jl. Majapahit No. 7 Kota Pekalongan, KOTA PEKALONGAN, PEKALONGAN BARAT, JAWA TENGAH, ID, 51111', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '21000'); INSERT INTO `tbl_ecom` VALUES ('170926230576F2X', '338484025', 'bundling 10000040 & 10000500', '244732789', '10000040 & 10000500', 'Pantene Sampo 480ml FREE Kondisioner 3 Minutes Miracle 180ml ( Hairfall Control )', 'Hairfall Control', '1', '56280', 'J&T Express', '0', '3727142', 'wardasamira', 'Noni basyarahil', '6285866257181', 'd.a Kantor Kementerian Agama Kota Pekalongan Jl. Majapahit No. 7 Kota Pekalongan, KOTA PEKALONGAN, PEKALONGAN BARAT, JAWA TENGAH, ID, 51111', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '21000'); INSERT INTO `tbl_ecom` VALUES ('17092605527EBJA', '433704566', 'bundling 055551 & 055531', '0', '', 'Olay Set Perawatan Anti Aging', '', '1', '189670', 'J&T Express', '0', '30562147', 'tethiwiedha', 'Teti widaningsih', '6282115634320', 'Jl. Pahlawan kiangroke_ciherang . Kp. Dangdeur rt. 02 rw. 08 ds. Kiangroke, KAB. BANDUNG, BANJARAN, JAWA BARAT, ID, 40377', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '11000'); INSERT INTO `tbl_ecom` VALUES ('170927000777Y9S', '338484025', 'bundling 10000040 & 10000500', '244732789', '10000040 & 10000500', 'Pantene Sampo 480ml FREE Kondisioner 3 Minutes Miracle 180ml ( Hairfall Control )', 'Hairfall Control', '1', '56280', 'J&T Express', '11000', '1646147', 'pulchrastore', '<NAME>', '628561703004', 'Jalan Senam III No 8 Sukamiskin, KOTA BANDUNG, ARCAMANIK, JAWA BARAT, ID, 40293', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '0'); INSERT INTO `tbl_ecom` VALUES ('17092609147GNBE', '433704566', 'bundling 055551 & 055531', '0', '', 'Olay Set Perawatan Anti Aging', '', '1', '189670', 'J&T Express', '0', '6616160', 'salmanurh', '<NAME>', '6285868777590', 'Jalan Nangka V Nomor 2, RT 01 RW 04, Perumahan Kalinegoro, KAB. MAGELANG, MERTOYUDAN, JAWA TENGAH, ID, 56172', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '24000'); INSERT INTO `tbl_ecom` VALUES ('17092623387785T', '95383572', '', '75890761', '10000500', 'Pantene Conditioner 3 Minutes Miracle Quantum (180ml)', 'Hair Fall Control', '1', '21500', 'J&T Express', '0', '28722169', 'windriakusuma86', 'tyas', '6282232767674', 'kreditplus jl setia budi 41f-g, KOTA MADIUN, TAMAN, JAWA TIMUR, ID, 00000', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '22000'); INSERT INTO `tbl_ecom` VALUES ('17092623387785T', '338484025', 'bundling 10000040 & 10000500', '244732789', '10000040 & 10000500', 'Pantene Sampo 480ml FREE Kondisioner 3 Minutes Miracle 180ml ( Hairfall Control )', 'Hairfall Control', '1', '56280', 'J&T Express', '0', '28722169', 'windriakusuma86', 'tyas', '6282232767674', 'kreditplus jl setia budi 41f-g, KOTA MADIUN, TAMAN, JAWA TIMUR, ID, 00000', null, '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '22000'); INSERT INTO `tbl_ecom` VALUES ('17092623387785T', '520893675', '0137243', '0', '', 'Pantene Treatment Total Damage Care 135ml', '', '1', '29900', 'J&T Express', '0', '28722169', 'windriakusuma86', 'tyas', '6282232767674', 'kreditplus jl setia budi 41f-g, KOTA MADIUN, TAMAN, JAWA TIMUR, ID, 00000', null, '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '22000'); INSERT INTO `tbl_ecom` VALUES ('17092610277J8V2', '433704566', 'bundling 055551 & 055531', '0', '', 'Olay Set Perawatan Anti Aging', '', '1', '189670', 'J&T Express', '0', '17210170', 'taripetruk', 'Lestari', '628566063763', 'Gejagan rt/w 001/12 gemblegan, KAB. KLATEN, KALIKOTES, JAWA TENGAH, ID, 57451', null, '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '27000'); INSERT INTO `tbl_ecom` VALUES ('17092523277ASW3', '433704566', 'bundling 055551 & 055531', '0', '', 'Olay Set Perawatan Anti Aging', '', '1', '189670', 'J&T Express', '10000', '11866177', 'gendoita01', 'Gendo rosita', '6289670104011', 'Jln bungur raya rt014/06.no.72, KOTA JAKARTA SELATAN, KEBAYORAN LAMA, DKI JAKARTA, ID, 12240', null, '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '0'); INSERT INTO `tbl_ecom` VALUES ('170924204279YW6', '480912386', '10000641 bundling isi 2', '0', '', 'Paket isi 2 - Gillette Pisau Cukur Blue Simple 3 Isi 4', '', '1', '52000', 'J&T Express', '10000', '14552179', 'rizkinaayu', 'Rizkina Ayu Khoriri', '628562846652', 'Ruko Mutiara Bekasi Center Jl. Ahmad Yani Kav A no. 16 Kayuringin Jaya, KOTA BEKASI, BEKASI SELATAN, JAWA BARAT, ID, 17144', null, '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '0'); INSERT INTO `tbl_ecom` VALUES ('17092508137JD6J', '95550188', '10000123', '0', '', 'Gillette Pisau Cukur Wanita Daisy Classic (Isi 5)', '', '1', '26400', 'J&T Express', '14000', '30782183', 'hamidnf91', 'Hamid', '6281384650625', 'Perum. Garut City Residence Blok G-4, Desa Muara Sanding,, KAB. GARUT, GARUT KOTA, JAWA BARAT, ID, 44119', null, '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '0'); INSERT INTO `tbl_ecom` VALUES ('17092508137JD6J', '480912386', '10000641 bundling isi 2', '0', '', 'Paket isi 2 - Gillette Pisau Cukur Blue Simple 3 Isi 4', '', '1', '52000', 'J&T Express', '14000', '30782183', 'hamidnf91', 'Hamid', '6281384650625', 'Perum. Garut City Residence Blok G-4, Desa Muara Sanding,, KAB. GARUT, GARUT KOTA, JAWA BARAT, ID, 44119', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '0'); INSERT INTO `tbl_ecom` VALUES ('170926231276N6W', '338484025', 'bundling 10000040 & 10000500', '244732789', '10000040 & 10000500', 'Pantene Sampo 480ml FREE Kondisioner 3 Minutes Miracle 180ml ( Hairfall Control )', 'Hairfall Control', '1', '56280', 'J&T Express', '10000', '17393190', 'ratu06', 'Ratu', '6281380373110', 'Komp pondok bahar jl betet 2 blok p no 67 rt 002 rw 006, KOTA TANGERANG, KARANG TENGAH, BANTEN, ID, 15158', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '0'); INSERT INTO `tbl_ecom` VALUES ('170926231576PUU', '338484025', 'bundling 10000040 & 10000500', '244732789', '10000040 & 10000500', 'Pantene Sampo 480ml FREE Kondisioner 3 Minutes Miracle 180ml ( Hairfall Control )', 'Hairfall Control', '1', '56280', 'J&T Express', '10000', '36141197', 'margarettamasli', '<NAME>', '6282180465431', 'jalan taman daanmogot 2 no. 33, KOTA JAKARTA BARAT, GROGOL PETAMBURAN, DKI JAKARTA, ID, 11470', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '0'); INSERT INTO `tbl_ecom` VALUES ('1709262334775BH', '224315137', '10000187', '0', '', 'Pantene Kondisioner Daily Moisture Repair 165ml', '', '1', '21900', 'J&T Express', '10000', '19006199', 'dianshafa062', '<NAME>', '6285715257311', 'Pt. Koyorad kawasan MM2100 industrial twon jl lombok blok N4-7, KAB. BEKASI, CIKARANG BARAT, JAWA BARAT, ID, 17530', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '0'); INSERT INTO `tbl_ecom` VALUES ('1709262334775BH', '338484025', 'bundling 10000040 & 10000500', '244732789', '10000040 & 10000500', 'Pantene Sampo 480ml FREE Kondisioner 3 Minutes Miracle 180ml ( Hairfall Control )', 'Hairfall Control', '1', '56280', 'J&T Express', '10000', '19006199', 'dianshafa062', 'Dian Anggraini', '6285715257311', 'Pt. Koyorad kawasan MM2100 industrial twon jl lombok blok N4-7, KAB. BEKASI, CIKARANG BARAT, JAWA BARAT, ID, 17530', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '0'); INSERT INTO `tbl_ecom` VALUES ('17092608147FPNC', '433704566', 'bundling 055551 & 055531', '0', '', 'Olay Set Perawatan Anti Aging', '', '1', '189670', 'J&T Express', '0', '11771200', 'dania_lz', 'Tessa', '6281281396497', 'MENARA BTPN LT.21 Jl. DR IDE ANAK AGUNG GDE AGUNG KAV 5.5-5.6 CBD MEGA KUNINGAN, KOTA JAKARTA SELATAN, SETIA BUDI, DKI JAKARTA, ID, 12950', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '10000'); INSERT INTO `tbl_ecom` VALUES ('1709270013783UM', '338484025', 'bundling 10000040 & 10000500', '244732789', '10000040 & 10000500', 'Pantene Sampo 480ml FREE Kondisioner 3 Minutes Miracle 180ml ( Hairfall Control )', 'Hairfall Control', '1', '56280', 'J&T Express', '10000', '8957208', 'twentytwo_shop', 'Dewi', '6287881103546', 'jl.Pluit Karang Ayu Blok B 1 Utara, apartemen Green Bay Pluit, tower F25BC, Jakarta Utara-14450., KOTA JAKARTA UTARA, PENJARINGAN, DKI JAKARTA, ID, 14450', 'Tolong di packing yang aman dan yang exp datenya masih lama', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '0'); INSERT INTO `tbl_ecom` VALUES ('17092608427G45K', '433704566', 'bundling 055551 & 055531', '0', '', 'Olay Set Perawatan Anti Aging', '', '1', '189670', 'J&T Express', '21000', '32008209', 'fannytumewu', '<NAME>', '6285240717667', 'Jl. Bolian no.120 gogagoman, KOTA KOTAMOBAGU, KOTAMOBAGU BARAT, SULAWESI UTARA, ID, 95715', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '40000'); INSERT INTO `tbl_ecom` VALUES ('17092700107818S', '338484025', 'bundling 10000040 & 10000500', '244732789', '10000040 & 10000500', 'Pantene Sampo 480ml FREE Kondisioner 3 Minutes Miracle 180ml ( Hairfall Control )', 'Hairfall Control', '1', '56280', 'J&T Express', '10000', '5381210', 'putrikatonohardjo', '<NAME>', '6287882956783', 'Jln Triloka 6 No.K1 komplek MBAU RT 03/Rw 04, KOTA JAKARTA SELATAN, PANCORAN, DKI JAKARTA, ID, 12780', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '0'); INSERT INTO `tbl_ecom` VALUES ('17092608577GBB7', '433704566', 'bundling 055551 & 055531', '0', '', 'Olay Set Perawatan Anti Aging', '', '1', '189670', 'J&T Express', '0', '34163216', 'yanihuda', 'Arina', '6281320207790', 'Jalan Purwakarta, Komp. Bougenville blok f-5, Antapani, KOTA BANDUNG, ANTAPANI (CICADAS), JAWA BARAT, ID, 40291', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '11000'); INSERT INTO `tbl_ecom` VALUES ('17092609337H1NN', '199008986', '10000582', '0', '', 'Rejoice Sampo Rich Halus Lembut 340ml', '', '3', '76500', 'J&T Express', '0', '4152218', 'markasbayi', 'Rianah', '6285921215924', 'Taman Pegangsaan Indah blok N no.10, KOTA JAKARTA UTARA, KELAPA GADING, DKI JAKARTA, ID, 14250', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '20000'); INSERT INTO `tbl_ecom` VALUES ('17092615517TVBX', '82236209', '055581', '0', '', 'Olay Total Effects 7in1 Day Cream Gentle SPF 15 50gr', '', '1', '99000', 'J&T Express', '0', '11439223', 'tantinurhidayah21', 'Tanti nurhidayah', '6281215959516', 'PT. Alun nusantara. Jln mulawarman no.45 rt.32 kelurahan manggar kecamatan balikpapan timur, KOTA BALIKPAPAN, BALIKPAPAN TIMUR, KALIMANTAN TIMUR, ID, 76117', 'Olay day cream gentle spf 15', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '40000'); INSERT INTO `tbl_ecom` VALUES ('170926230876HR3', '338484025', 'bundling 10000040 & 10000500', '244732789', '10000040 & 10000500', 'Pantene Sampo 480ml FREE Kondisioner 3 Minutes Miracle 180ml ( Hairfall Control )', 'Hairfall Control', '1', '56280', 'J&T Express', '10000', '31173239', 'bowo.adira', 'Bowo', '628128934974', 'Graha Adira Jl. MT Haryonokav 42, KOTA JAKARTA SELATAN, PANCORAN, DKI JAKARTA, ID, 12770', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '0'); INSERT INTO `tbl_ecom` VALUES ('17092523347AXW1', '433704566', 'bundling 055551 & 055531', '0', '', 'Olay Set Perawatan Anti Aging', '', '1', '189670', 'J&T Express', '0', '12086242', 'lovely_fi96', 'FIFI', '6281929482966', 'MS Advertising - Jl. Jend. Sudirman Lrg. Pemulutan No. 908 B (Belakang Restoran Cipta Rasa) Palembang, KOTA PALEMBANG, ILIR TIMUR I, SUMATERA SELATAN, ID, 30244', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '22000'); INSERT INTO `tbl_ecom` VALUES ('170926234777ETY', '338484025', 'bundling 10000040 & 10000500', '244732789', '10000040 & 10000500', 'Pantene Sampo 480ml FREE Kondisioner 3 Minutes Miracle 180ml ( Hairfall Control )', 'Hairfall Control', '1', '56280', 'J&T Express', '10000', '35424244', 'sammi.pakpahan91', '<NAME>', '628986125128', 'Perumahan pondok Sani jl Sadewa III blok B7 no 11 RT.005RW.005 Bekasi barat, KOTA BEKASI, MEDAN SATRIA, JAWA BARAT, ID, 17181', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '0'); INSERT INTO `tbl_ecom` VALUES ('17092609437H7UU', '82236203', '055531', '0', '', 'Olay Total Effects 7 in 1 Day Cream Normal SPF 15 (50 gr)', '', '1', '99000', 'J&T Express', '0', '10765248', 'nonanashwa', 'Toko Nammy', '6281210471161', 'jln. kartini no. 35 (sebelah timur RS Palang Biru) gombong kebumen 54411, KAB. KEBUMEN, GOMBONG, JAWA TENGAH, ID, 54411', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '30000'); INSERT INTO `tbl_ecom` VALUES ('17092609437H7UU', '82236213', '055551', '0', '', 'Olay Total Effects 7in1 Anti-ageing Night Cream 50gr', '', '1', '99000', 'J&T Express', '0', '10765248', 'nonanashwa', 'To<NAME>', '6281210471161', 'jln. kartini no. 35 (sebelah timur RS Palang Biru) gombong kebumen 54411, KAB. KEBUMEN, GOMBONG, JAWA TENGAH, ID, 54411', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '30000'); INSERT INTO `tbl_ecom` VALUES ('17092610077HSQV', '118484883', '10000525', '0', '', 'Head & Shoulder Sampo Smooth & Silky 480ml', '', '2', '89800', 'J&T Express', '0', '26822251', 'noivamya', 'Vita', '6285220872049', 'Jl. Ciumbuleuit G<NAME> 31/155C, KOTA BANDUNG, COBLONG, JAWA BARAT, ID, 40141', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '11000'); INSERT INTO `tbl_ecom` VALUES ('1709262328771AK', '338484025', 'bundling 10000040 & 10000500', '244732789', '10000040 & 10000500', 'Pantene Sampo 480ml FREE Kondisioner 3 Minutes Miracle 180ml ( Hairfall Control )', 'Hairfall Control', '1', '56280', 'J&T Express', '10000', '14354265', 'silviaharyantih_evi', '<NAME> (evi)', '6283890934655', 'jl alfalah 2 kp kecil rt 002/08 no 39 sukabumi selatan, KOTA JAKARTA BARAT, KEBON JERUK, DKI JAKARTA, ID, 11560', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '0'); INSERT INTO `tbl_ecom` VALUES ('17092610077HSE1', '85395556', '055175', '0', '', 'Olay Total Effects 7in1 Day Cream Touch of Foundation SPF 15 50gr', '', '1', '99000', 'J&T Express', '0', '15892275', 'lialaelasari21', 'Lia laelasari', '6285603164583', 'Kp babakan ciajur rt 8 rw 21 desa sukamanah kecamatan pangalengan, KAB. BANDUNG, PANGALENGAN, JAWA BARAT, ID, 40378', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '28000'); INSERT INTO `tbl_ecom` VALUES ('17092610077HSE1', '179875944', '10000603', '0', '', 'Downy Pelembut Pakaian Sunrise Fresh Refill 1.6L( PULAU JAWA DAN LAMPUNG ONLY )', '', '1', '37500', 'J&T Express', '0', '15892275', 'lialaelasari21', 'Lia laelasari', '6285603164583', 'Kp babakan ciajur rt 8 rw 21 desa sukamanah kecamatan pangalengan, KAB. BANDUNG, PANGALENGAN, JAWA BARAT, ID, 40378', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '28000'); INSERT INTO `tbl_ecom` VALUES ('17092610177J13J', '433704566', 'bundling 055551 & 055531', '0', '', 'Olay Set Perawatan Anti Aging', '', '1', '189670', 'J&T Express', '0', '25113277', 'rindamiyongkeceng', 'Iis', '6281804485780', 'Krajan 05/03 no.11 Mojosongo Jebres Surakarta 57127, KOTA SURAKARTA (SOLO), JEBRES, JAWA TENGAH, ID, 57127', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '18000'); INSERT INTO `tbl_ecom` VALUES ('170926230876H82', '338484025', 'bundling 10000040 & 10000500', '244732789', '10000040 & 10000500', 'Pantene Sampo 480ml FREE Kondisioner 3 Minutes Miracle 180ml ( Hairfall Control )', 'Hairfall Control', '1', '56280', 'J&T Express', '10000', '24854278', 'tantrigloria', 'tantri gloriawati', '6287885522826', 'ibox kota kasablanka lt UG 36-38, jl casablanka no88 rt 16/05 kel menteng dalam kec tebet, KOTA JAKARTA SELATAN, TEBET, DKI JAKARTA, ID, 12870', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '0'); INSERT INTO `tbl_ecom` VALUES ('1709241215707BH', '227503059', '10000115', '0', '', 'Rejoice Kondisioner Rich Halus Lembut 320ml', '', '1', '31900', 'J&T Express', '0', '11819280', 'rosamegawati', 'Rosa (PT. Tiga Permata Logistik)', '6285646299995', 'PT. Tiga Permata Logistik (samping auto 2000), KAB. <NAME>ANGAN, JAWA TIMUR, ID, 61254', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '19000'); INSERT INTO `tbl_ecom` VALUES ('1709241215707BH', '472092686', '10000582 bundling', '0', '', 'Paket isi 2 - Rejoice Sampo Rich Halus Lembut 340ml', '', '1', '51000', 'J&T Express', '0', '11819280', 'rosamegawati', 'Rosa (PT. Tiga Permata Logistik)', '6285646299995', 'PT. Tiga Permata Logistik (samping auto 2000), KAB. SIDOARJO, GEDANGAN, JAWA TIMUR, ID, 61254', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '19000'); INSERT INTO `tbl_ecom` VALUES ('170926232376WA7', '338484025', 'bundling 10000040 & 10000500', '244732789', '10000040 & 10000500', 'Pantene Sampo 480ml FREE Kondisioner 3 Minutes Miracle 180ml ( Hairfall Control )', 'Hairfall Control', '1', '56280', 'J&T Express', '10000', '10235282', 'kennybutik_', '<NAME>', '628119834876', 'Jalan Kampung Jawa 4 No 10 Rt 002 Rw 10, KOTA JAKARTA BARAT, TAMAN SARI, DKI JAKARTA, ID, 11130', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '0'); INSERT INTO `tbl_ecom` VALUES ('17092608047FJHX', '433704566', 'bundling 055551 & 055531', '0', '', 'Olay Set Perawatan Anti Aging', '', '1', '189670', 'J&T Express', '0', '1850285', 'alliyyariani', '<NAME>', '6281380715577', 'Mutiara Gading Timur Cluster Columbus Mansion Blok P05 No.07 RT013/018 Kel.Mustikajaya, KOTA BEKASI, BEKASI TIMUR, JAWA BARAT, ID, 17158', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '10000'); INSERT INTO `tbl_ecom` VALUES ('170926223975T49', '133802918', '10000390 Bundling', '0', '', 'Paket Isi 2 - Head & Shoulder Sampo Lemon Fresh (Anti Dandruff) 330 ml', '', '1', '75800', 'J&T Express', '0', '7165286', 'zubaidifanani', '<NAME>ani', '6285226997676', 'Jln. Tanjung Sari II Lr. Anggrek No.59 RT35 Bukit Sangkal, KOTA PALEMBANG, KALIDONI, SUMATERA SELATAN, ID, 30114', '', '2017-10-02', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '22000'); INSERT INTO `tbl_ecom` VALUES ('170926235177HB4', '338484025', 'bundling 10000040 & 10000500', '244732789', '10000040 & 10000500', 'Pantene Sampo 480ml FREE Kondisioner 3 Minutes Miracle 180ml ( Hairfall Control )', 'Hairfall Control', '1', '56280', 'J&T Express', '10000', '30933286', 'ninesepti', 'Nine', '6281218620215', 'Pesona gading cibitung 2 blok AC3 no. 12A, KAB. BEKASI, CIBITUNG, JAWA BARAT, ID, 12942', '', '0000-00-00', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '0'); INSERT INTO `tbl_ecom` VALUES ('1709241909782V2', '480912386', '10000641 bundling isi 2', '0', '', 'Paket isi 2 - Gillette Pisau Cukur Blue Simple 3 Isi 4', '', '1', '52000', 'J&T Express', '10000', '12008289', 'rusdys', '<NAME>', '62818637392', 'Jl.Adhi karya Rt.015 Rw.05 No.88 kedoya selatan, KOTA JAKARTA BARAT, KEBON JERUK, DKI JAKARTA, ID, 11520', '', '0000-00-00', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '0'); INSERT INTO `tbl_ecom` VALUES ('1709261924714NP', '224986193', '056043', '0', '', 'Olay White Radiance Intensive Lotion (30 ml)', '', '1', '27900', 'J&T Express', '10000', '18097296', 'huzaifahahadia', '<NAME>', '6282167750750', 'Jl. Buncit raya gg langgar rt.002/002 no.62 ( dibelakang gedung graha kramayudha ), KOTA JAKARTA SELATAN, PANCORAN, DKI JAKARTA, ID, 12760', '', '0000-00-00', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '0'); INSERT INTO `tbl_ecom` VALUES ('1709251833739TQ', '82236203', '055531', '0', '', 'Olay Total Effects 7 in 1 Day Cream Normal SPF 15 (50 gr)', '', '2', '198000', 'J&T Express', '74000', '9298299', 'irmasimaela79', '<NAME>', '6281399747071', 'GKII EFFATA, Jalan SD Percobaan no. 25, KAB. JAYAWIJAYA, WAMENA, PAPUA, ID, 99511', '', '0000-00-00', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '40000'); INSERT INTO `tbl_ecom` VALUES ('1709262337777QX', '338484025', 'bundling 10000040 & 10000500', '244732789', '10000040 & 10000500', 'Pantene Sampo 480ml FREE Kondisioner 3 Minutes Miracle 180ml ( Hairfall Control )', 'Hairfall Control', '1', '56280', 'J&T Express', '10000', '28064302', 'vitria84', 'Vitria', '6281219933838', 'Jl ekor kuning 4 no 31 Rt/Rw 007/007 kel jati, kec pulogadung Rawamangun jakarta timur 13220, KOTA JAKARTA TIMUR, PULO GADUNG, DKI JAKARTA, ID, 13220', '', '0000-00-00', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '0'); INSERT INTO `tbl_ecom` VALUES ('17092406467TG0X', '82208641', '10000482', '0', '', 'Pampers Popok Celana L-42 Premium Care', '', '1', '127400', 'J&T Express', '12000', '8192318', 'nurcahyoadi', '<NAME> / TRI ANDRIYA W', '62818456717', 'RANDULAWANG RT.1 RW.2 KEL.JETIS, KAB. SUKOHARJO, SUKOHARJO, JAWA TENGAH, ID, 12345', 'L-42 ya sis thx', '0000-00-00', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '30000'); INSERT INTO `tbl_ecom` VALUES ('170927000978131', '338484025', 'bundling 10000040 & 10000500', '244732789', '10000040 & 10000500', 'Pantene Sampo 480ml FREE Kondisioner 3 Minutes Miracle 180ml ( Hairfall Control )', 'Hairfall Control', '1', '56280', 'J&T Express', '10000', '36286322', 'jimyjiauw', 'Jimy', '6282114063282', 'Rusun tambora IV blok b lt.2. No.14, KOTA JAKARTA BARAT, TAMBORA, DKI JAKARTA, ID, 113330', '', '0000-00-00', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '0'); INSERT INTO `tbl_ecom` VALUES ('170926230776GH8', '338484025', 'bundling 10000040 & 10000500', '244732789', '10000040 & 10000500', 'Pantene Sampo 480ml FREE Kondisioner 3 Minutes Miracle 180ml ( Hairfall Control )', 'Hairfall Control', '1', '56280', 'J&T Express', '10000', '34928325', '88stevcahyadi', 'Steven', '6285714005600', 'Toko Super Jalan Kaliabang Raya No.21 Rt. 03 Rw. 006 (sebelah Kimia Farma gg. Damai) Perwira, KOTA BEKASI, BEKASI UTARA, JAWA BARAT, ID, 17122', '', '0000-00-00', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '0'); INSERT INTO `tbl_ecom` VALUES ('17092609117GKDR', '118445819', 'bundling 10000040 & 10000500', '0', '', 'Pantene Sampo Hair Fall Control 750ml', '', '1', '60700', 'J&T Express', '0', '7273328', 'seruninabila', 'Seruni Nabila', '6285311862667', 'CommonRoom jln. Cilandak tengah raya no 1 ( detail box area) Rt 002 Rw 001 kelurahan cilandak barat, KOTA JAKARTA SELATAN, CILANDAK, DKI JAKARTA, ID, 12430', '', '0000-00-00', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '20000'); INSERT INTO `tbl_ecom` VALUES ('17092609117GKDR', '205770387', '10000500', '0', '', 'Pantene Kondisioner 3 Minutes Miracle Quantum Hair Fall Control 180ml', '', '1', '21500', 'J&T Express', '0', '7273328', 'seruninabila', 'Seruni Nabila', '6285311862667', 'CommonRoom jln. Cilandak tengah raya no 1 ( detail box area) Rt 002 Rw 001 kelurahan cilandak barat, KOTA JAKARTA SELATAN, CILANDAK, DKI JAKARTA, ID, 12430', '', '0000-00-00', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', 'order_paid', '20000'); INSERT INTO `tbl_ecom` VALUES ('170927000477W53', '82157833', 'bundling 10000040 & 10000500', '0', '', 'Head & Shoulders Sampo Cool Blast 165 ml', '', '1', '22500', 'J&T Express', '0', '28411333', 'nitatriawulandari', 'Nita tria wulandari', '62895359582258', 'Jln.kopo sayati g.h.abbas no.33 rt.01 rw.03 desa.sayati, KAB. BANDUNG, MARGAHAYU, JAWA BARAT, ID, 40228', 'Mohon dipacking yg rapi ya makasih........p', '0000-00-00', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', '', ''); INSERT INTO `tbl_ecom` VALUES ('170927000477W53', '83850325', '160227', '0', '', 'Downy Pelembut Pakaian Antibacteria Refill 1L ( PULAU JAWA DAN LAMPUNG ONLY )', '', '1', '29000', 'J&T Express', '0', '28411333', 'nitatriawulandari', 'Nita tria wulandari', '62895359582258', 'Jln.kopo sayati g.h.abbas no.33 rt.01 rw.03 desa.sayati, KAB. BANDUNG, MARGAHAYU, JAWA BARAT, ID, 40228', 'Mohon dipacking yg rapi ya makasih........p', '0000-00-00', '2017-10-10 09:53:06', '2017-10-10', '2017-10-10 09:53:06', '', ''); -- ---------------------------- -- Table structure for tbl_produk -- ---------------------------- DROP TABLE IF EXISTS `tbl_produk`; CREATE TABLE `tbl_produk` ( `product__id` int(11) NOT NULL AUTO_INCREMENT, `produk__sku` varchar(255) NOT NULL, `produk__desc` varchar(255) DEFAULT NULL, `produk__user_created` int(11) DEFAULT NULL, `produk__user_updated` int(11) DEFAULT NULL, `produk__date_created` datetime DEFAULT NULL, `produk__date_updated` datetime NOT NULL, PRIMARY KEY (`product__id`,`produk__sku`) ) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=latin1; -- ---------------------------- -- Records of tbl_produk -- ---------------------------- INSERT INTO `tbl_produk` VALUES ('1', '82236203', 'Olay Total Effects 7 in 1 Day Cream Normal SPF 15 (50 gr)', '1', '1', '2017-10-03 10:08:21', '2017-10-03 10:08:21'); INSERT INTO `tbl_produk` VALUES ('2', '82236213', 'Olay Total Effects 7in1 Anti-ageing Night Cream 50gr', '1', '1', '2017-10-03 10:08:21', '2017-10-03 10:08:21'); INSERT INTO `tbl_produk` VALUES ('3', '338484025', 'Pantene Sampo 480ml FREE Kondisioner 3 Minutes Miracle 180ml ( Hairfall Control )', '1', '1', '2017-10-03 10:08:21', '2017-10-03 10:08:21'); INSERT INTO `tbl_produk` VALUES ('4', '398447324', 'Downy Pelembut Pakaian Passion Refill 800ml ( PULAU JAWA DAN LAMPUNG ONLY )', '1', '1', '2017-10-03 10:08:21', '2017-10-03 10:08:21'); INSERT INTO `tbl_produk` VALUES ('5', '472092686', 'Paket isi 2 - Rejoice Sampo Rich Halus Lembut 340ml', '1', '1', '2017-10-03 10:08:21', '2017-10-03 10:08:21'); INSERT INTO `tbl_produk` VALUES ('6', '433704566', 'Olay Set Perawatan Anti Aging', '1', '1', '2017-10-03 10:08:21', '2017-10-03 10:08:21'); INSERT INTO `tbl_produk` VALUES ('7', '95550229', 'Gillette Foamy Shave Cream Menthol 175gr ( PULAU JAWA DAN LAMPUNG ONLY )', '1', '1', '2017-10-03 10:08:21', '2017-10-03 10:08:21'); INSERT INTO `tbl_produk` VALUES ('8', '480912386', 'Paket isi 2 - Gillette Pisau Cukur Blue Simple 3 Isi 4', '1', '1', '2017-10-03 10:08:21', '2017-10-03 10:08:21'); INSERT INTO `tbl_produk` VALUES ('9', '82157873', 'Head & Shoulder Sampo Cool Menthol (2 pcs x 480 ml)', '1', '1', '2017-10-03 10:08:21', '2017-10-03 10:08:21'); INSERT INTO `tbl_produk` VALUES ('10', '227296337', 'Head & Shoulder Sampo Cool Menthol Iconic 330ml', '1', '1', '2017-10-03 10:08:21', '2017-10-03 10:08:21'); INSERT INTO `tbl_produk` VALUES ('11', '92748873', 'Whisper Reguler Flow Wings 40s', '1', '1', '2017-10-03 10:08:21', '2017-10-03 10:08:21'); INSERT INTO `tbl_produk` VALUES ('12', '92749074', 'Whisper Regular Flow Wings 20s', '1', '1', '2017-10-03 10:08:21', '2017-10-03 10:08:21'); INSERT INTO `tbl_produk` VALUES ('13', '85395556', 'Olay Total Effects 7in1 Day Cream Touch of Foundation SPF 15 50gr', '1', '1', '2017-10-03 10:08:21', '2017-10-03 10:08:21'); INSERT INTO `tbl_produk` VALUES ('14', '229735849', 'Paket isi 2 - Downy Pelembut Pakaian Sunrise Fresh Refill 900ml (PULAU JAWA DAN LAMPUNG ONLY)', '1', '1', '2017-10-03 10:08:21', '2017-10-03 10:08:21'); INSERT INTO `tbl_produk` VALUES ('15', '118484883', 'Head & Shoulder Sampo Smooth & Silky 480ml', '1', '1', '2017-10-03 10:08:21', '2017-10-03 10:08:21'); INSERT INTO `tbl_produk` VALUES ('16', '95383572', 'Pantene Conditioner 3 Minutes Miracle Quantum (180ml)', '1', '1', '2017-10-03 10:08:21', '2017-10-03 10:08:21'); INSERT INTO `tbl_produk` VALUES ('17', '82236209', 'Olay Total Effects 7in1 Day Cream Gentle SPF 15 50gr', '1', '1', '2017-10-03 10:08:21', '2017-10-03 10:08:21'); INSERT INTO `tbl_produk` VALUES ('18', '224986193', 'Olay White Radiance Intensive Lotion (30 ml)', '1', '1', '2017-10-03 10:08:21', '2017-10-03 10:08:21'); INSERT INTO `tbl_produk` VALUES ('19', '520893675', 'Pantene Treatment Total Damage Care 135ml', '1', '1', '2017-10-03 10:08:21', '2017-10-03 10:08:21'); INSERT INTO `tbl_produk` VALUES ('20', '95550188', 'Gillette Pisau Cukur Wanita Daisy Classic (Isi 5)', '1', '1', '2017-10-03 10:08:21', '2017-10-03 10:08:21'); INSERT INTO `tbl_produk` VALUES ('21', '224315137', 'Pantene Kondisioner Daily Moisture Repair 165ml', '1', '1', '2017-10-03 10:08:21', '2017-10-03 10:08:21'); INSERT INTO `tbl_produk` VALUES ('22', '229763996', 'Paket isi 2 - Downy Pelembut Pakaian Sunrise Fresh Refill 1.6L ( PULAU JAWA DAN LAMPUNG ONLY )', '1', '1', '2017-10-03 10:08:21', '2017-10-03 10:08:21'); INSERT INTO `tbl_produk` VALUES ('23', '199008986', 'Rejoice Sampo Rich Halus Lembut 340ml', '1', '1', '2017-10-03 10:08:21', '2017-10-03 10:08:21'); INSERT INTO `tbl_produk` VALUES ('24', '179875944', 'Downy Pelembut Pakaian Sunrise Fresh Refill 1.6L( PULAU JAWA DAN LAMPUNG ONLY )', '1', '1', '2017-10-03 10:08:21', '2017-10-03 10:08:21'); INSERT INTO `tbl_produk` VALUES ('25', '227503059', 'Rejoice Kondisioner Rich Halus Lembut 320ml', '1', '1', '2017-10-03 10:08:21', '2017-10-03 10:08:21'); INSERT INTO `tbl_produk` VALUES ('26', '133802918', 'Paket Isi 2 - Head & Shoulder Sampo Lemon Fresh (Anti Dandruff) 330 ml', '1', '1', '2017-10-03 10:08:21', '2017-10-03 10:08:21'); INSERT INTO `tbl_produk` VALUES ('27', '82208641', 'Pampers Popok Celana L-42 Premium Care', '1', '1', '2017-10-03 10:08:21', '2017-10-03 10:08:21'); INSERT INTO `tbl_produk` VALUES ('28', '118445819', 'Pantene Sampo Hair Fall Control 750ml', '1', '1', '2017-10-03 10:08:21', '2017-10-03 10:08:21'); INSERT INTO `tbl_produk` VALUES ('29', '118484090', 'Head & Shoulder Sampo Cool Menthol 480 ml', '1', '1', '2017-10-03 10:08:21', '2017-10-03 10:08:21'); INSERT INTO `tbl_produk` VALUES ('30', '205770387', 'Pantene Kondisioner 3 Minutes Miracle Quantum Hair Fall Control 180ml', '1', '1', '2017-10-03 10:08:21', '2017-10-03 10:08:21'); INSERT INTO `tbl_produk` VALUES ('31', '82157833', 'Head & Shoulders Sampo Cool Blast 165 ml', '1', '1', '2017-10-03 10:08:21', '2017-10-03 10:08:21'); INSERT INTO `tbl_produk` VALUES ('32', '9/26/2017', 'order_paid', '1', '1', '2017-10-03 10:08:21', '2017-10-03 10:08:21'); INSERT INTO `tbl_produk` VALUES ('33', '83850325', 'Downy Pelembut Pakaian Antibacteria Refill 1L ( PULAU JAWA DAN LAMPUNG ONLY )', '1', '1', '2017-10-03 10:08:21', '2017-10-03 10:08:21'); -- ---------------------------- -- Table structure for tbl_sys_master_menu -- ---------------------------- DROP TABLE IF EXISTS `tbl_sys_master_menu`; CREATE TABLE `tbl_sys_master_menu` ( `menu_id` int(10) NOT NULL AUTO_INCREMENT, `menu_label` text, `menu_link` text CHARACTER SET latin1 COLLATE latin1_general_ci, `menu_normal_icon` text CHARACTER SET latin1 COLLATE latin1_general_ci, `menu_mouseover_icon` text CHARACTER SET latin1 COLLATE latin1_general_ci, `menu_expanded_icon` text CHARACTER SET latin1 COLLATE latin1_general_ci, `menu_tooltip` text CHARACTER SET latin1 COLLATE latin1_general_ci, `menu_target` text CHARACTER SET latin1 COLLATE latin1_general_ci, `menu_style` text CHARACTER SET latin1 COLLATE latin1_general_ci, `menu_title_style` text CHARACTER SET latin1 COLLATE latin1_general_ci, `menu_level` smallint(1) DEFAULT NULL, `menu_parent` int(4) DEFAULT NULL, `menu_sort` int(1) DEFAULT NULL, `menu_active` int(1) DEFAULT NULL, PRIMARY KEY (`menu_id`) ) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=latin1 AVG_ROW_LENGTH=119; -- ---------------------------- -- Records of tbl_sys_master_menu -- ---------------------------- INSERT INTO `tbl_sys_master_menu` VALUES ('1', 'HOME', 'home', 'fa fa-home', 'folder1.gif', 'folder1.gif', 'Data Master', null, null, null, '0', '0', '0', '1'); INSERT INTO `tbl_sys_master_menu` VALUES ('2', 'PENGATURAN', '', 'fa fa-cog', 'folder1.gif', 'folder1.gif', 'Modul Lembur', null, null, null, '0', '0', '0', '1'); INSERT INTO `tbl_sys_master_menu` VALUES ('3', 'Pegawai', 'pegawai', 'fa fa-bolt', 'folder1.gif', 'folder1.gif', 'MASTER DATA', null, null, null, '1', '4', '1', '0'); INSERT INTO `tbl_sys_master_menu` VALUES ('4', 'Posisi', 'posisi', 'fa fa-location-arrow', 'text.gif', 'text.gif', 'Penempatan Pegawai', 'mainFrame', null, null, '1', '4', '2', '0'); INSERT INTO `tbl_sys_master_menu` VALUES ('5', 'Kota', 'kota', ' fa fa-location-arrow', 'text.gif', 'text.gif', 'Data Pegawai', 'mainFrame', null, null, '1', '4', '3', '0'); INSERT INTO `tbl_sys_master_menu` VALUES ('6', 'Ecommerce', 'ecommerce', 'fa fa-location-arrow', 'folder1.gif', 'folder1.gif', 'Data Master', null, null, null, '1', '2', '4', '1'); -- ---------------------------- -- Table structure for tbl_sys_master_privileges -- ---------------------------- DROP TABLE IF EXISTS `tbl_sys_master_privileges`; CREATE TABLE `tbl_sys_master_privileges` ( `priv_user_id` varchar(25) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT '', `priv_menu_id` int(10) unsigned NOT NULL DEFAULT '0', `priv_view` int(1) DEFAULT '0', `priv_insert` int(1) DEFAULT '0', `priv_edit` int(1) DEFAULT '0', `priv_delete` int(1) DEFAULT '0', `priv_search` int(1) DEFAULT '0', `priv_report` int(1) DEFAULT '0', `priv_print` int(1) DEFAULT '0', PRIMARY KEY (`priv_user_id`,`priv_menu_id`), KEY `id_menu` (`priv_menu_id`), KEY `id_user` (`priv_user_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AVG_ROW_LENGTH=43 COMMENT='tabel hak akses user ke menu'; -- ---------------------------- -- Records of tbl_sys_master_privileges -- ---------------------------- INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd', '4', '0', '1', '1', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd', '1', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd', '5', '1', '1', '1', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('personalia', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('personalia', '0', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('personalia', '4', '1', '0', '0', '0', '0', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('personalia', '5', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '113', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '4', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '112', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '7', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '8', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '49', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '21', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '11', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '34', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '31', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '33', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '19', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '10', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '29', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '28', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '159', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '30', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '12', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '32', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '2', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '36', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '5', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '38', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '39', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '40', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '41', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '45', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '42', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '43', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '46', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '47', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '48', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '1', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '50', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '51', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '52', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '53', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '54', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '55', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '58', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '57', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '56', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '59', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '60', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '63', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '64', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '65', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '66', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '67', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '68', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '69', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '70', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '71', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '72', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '73', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '74', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '75', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '76', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '77', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '78', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '79', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '80', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '81', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '82', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '83', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '84', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '85', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '86', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '87', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '88', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '89', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '90', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '91', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '92', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '6', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '0', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd', '2', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin2', '1', '1', '1', '1', '0', '1', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin2', '5', '1', '1', '1', '0', '1', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin2', '16', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '15', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '3', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin2', '14', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin2', '2', '1', '1', '1', '0', '1', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin2', '12', '1', '1', '1', '0', '1', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin2', '13', '1', '1', '1', '1', '1', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bom', '1', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bom', '5', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bom', '2', '1', '1', '1', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bom', '17', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bom', '18', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hlgm', '1', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hlgm', '20', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hlgm', '19', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hlgm', '2', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hlgm', '3', '1', '0', '1', '0', '1', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hlgm', '15', '1', '0', '1', '0', '1', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('', '5', '1', '1', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('', '1', '1', '1', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('', '13', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('', '12', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('', '16', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('', '20', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('', '18', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('', '14', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('', '19', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('', '17', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('', '2', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '13', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '12', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '31', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hglm', '4', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hglm', '34', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hglm', '31', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hglm', '3', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '29', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '55', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '16', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '13', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '12', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '37', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '61', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '74', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '0', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '10', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '22', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '29', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cbg_pst', '1', '1', '1', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cbg_pst', '2', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cbg_pst', '5', '1', '1', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cbg_pst', '4', '1', '1', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cbg_pst', '14', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cbg_pst', '12', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cbg_pst', '13', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cbg_pst', '16', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bom_bdg', '1', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bom_bdg', '2', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bom_bdg', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bom_bdg', '5', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bom_bdg', '4', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bom_bdg', '10', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bom_bdg', '11', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bom_bdg', '22', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bom_bdg', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bom_subang', '1', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bom_subang', '2', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bom_subang', '3', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bom_subang', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bom_subang', '5', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bom_subang', '4', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bom_subang', '10', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bom_subang', '11', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '37', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '49', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '2', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '34', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '33', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bom_crb', '4', '1', '1', '1', '1', '1', '1', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bom_crb', '2', '1', '1', '1', '1', '1', '1', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bom_crb', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bom_crb', '1', '1', '1', '1', '1', '1', '1', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bom_crb', '5', '1', '1', '1', '1', '1', '1', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bom_crb', '19', '1', '1', '1', '1', '1', '1', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bom_crb', '14', '1', '1', '1', '1', '1', '1', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bom_crb', '18', '1', '1', '1', '1', '1', '1', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bandung_bom', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bandung_bom', '1', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bandung_bom', '5', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bandung_bom', '4', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bandung_bom', '2', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bandung_bom', '17', '1', '1', '1', '0', '1', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bandung_bom', '18', '1', '1', '1', '0', '1', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bandung_bom', '10', '1', '1', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bandung_bom', '11', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bandung_bom', '22', '1', '1', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bandung_bom', '21', '1', '1', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cirebon_bom', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cirebon_bom', '2', '1', '1', '1', '1', '1', '1', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cirebon_bom', '1', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cirebon_bom', '5', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cirebon_bom', '4', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cirebon_bom', '17', '1', '1', '1', '1', '1', '1', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cirebon_bom', '18', '1', '1', '1', '1', '1', '1', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '68', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrgm', '1', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrgm', '2', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrgm', '3', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrgm', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrgm', '5', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrgm', '4', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrgm', '19', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrgm', '13', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrgm', '18', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrgm', '20', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrgm', '10', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrgm', '22', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrgm', '21', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrgm', '11', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrgm', '24', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrgm', '23', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hglm', '0', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hglm', '21', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hglm', '10', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hglm', '22', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hglm', '28', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hglm', '30', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hglm', '11', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '36', '1', '1', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '22', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '4', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '22', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '18', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hglm', '5', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hglm', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '5', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '34', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '30', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '11', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '16', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '2', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '11', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '37', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '4', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '17', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '49', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '31', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '34', '0', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '2', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '30', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '38', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '10', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '22', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '11', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '66', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '38', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '84', '1', '1', '1', '1', '1', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '17', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '49', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '5', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '31', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '34', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '2', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '30', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '10', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '22', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '11', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '38', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '65', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '4', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '14', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '5', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '38', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '28', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '10', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '12', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '2', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '34', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '22', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '11', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '17', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '5', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '31', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '34', '1', '1', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '2', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '30', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '38', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '10', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '22', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '11', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '13', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '37', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '4', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '2', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '17', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '14', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '67', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '22', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '63', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '10', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '11', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_bom', '5', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_bom', '2', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_bom', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_bom', '37', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_bom', '4', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_bom', '31', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_bom', '17', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_bom', '18', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '1', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '5', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '34', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '31', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '2', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '38', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '22', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '29', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '10', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '28', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '11', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '1', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '18', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '37', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '49', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '17', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '31', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '34', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '33', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '2', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '28', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '10', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '22', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '11', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '30', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '38', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '4', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '14', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '31', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '34', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '65', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '22', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '11', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '28', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '38', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '18', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '5', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '17', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '31', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '34', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '33', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '2', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '22', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '38', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '28', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '53', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '30', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '47', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '49', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '16', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '74', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '4', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '49', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '13', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '12', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '14', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '31', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '34', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '1', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '22', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '29', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '10', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '28', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '11', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '37', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '59', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '4', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '49', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '18', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '17', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '31', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '33', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '34', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '2', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '28', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '38', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '10', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '22', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '30', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '11', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_hrd', '2', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_hrd', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_hrd', '4', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_hrd', '74', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_hrd', '16', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_hrd', '13', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_hrd', '12', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_hrd', '14', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_hrd', '31', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_hrd', '34', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_hrd', '65', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_hrd', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_hrd', '22', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_hrd', '29', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_hrd', '10', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_hrd', '28', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_hrd', '11', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '84', '1', '1', '1', '1', '1', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '4', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_hrd', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '18', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '33', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '17', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '31', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '34', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '2', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_hrd', '49', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_hrd', '13', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_hrd', '37', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '28', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '38', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '10', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '22', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '30', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '11', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_hrd', '12', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_hrd', '2', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_hrd', '34', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_hrd', '31', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_hrd', '14', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_hrd', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_hrd', '22', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_hrd', '68', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_hrd', '10', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_hrd', '28', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_hrd', '11', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '1', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '18', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '5', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '33', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '17', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '31', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '34', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '2', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '28', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '38', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '10', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '22', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '30', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '11', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '66', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '4', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '31', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '62', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '14', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '2', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '60', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '39', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '63', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '36', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '67', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '53', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '84', '1', '1', '1', '1', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '5', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '28', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '38', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '10', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '22', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '30', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '11', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '13', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '4', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '12', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '2', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '34', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '31', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '14', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '39', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '68', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '36', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '22', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '31', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '84', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '5', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '17', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '34', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '2', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '33', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '18', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '67', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '70', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '10', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '22', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '30', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '11', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_hrd', '1', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_hrd', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_hrd', '4', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_hrd', '34', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_hrd', '5', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_hrd', '14', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_hrd', '12', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_hrd', '2', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_hrd', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_hrd', '22', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_hrd', '29', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_hrd', '10', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_hrd', '28', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_hrd', '11', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '2', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '34', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hglm', '49', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hglm', '1', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hglm', '38', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hglm', '29', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hglm', '36', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hglm', '32', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hglm', '19', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hglm', '20', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hglm', '35', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hglm', '2', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hglm', '15', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '38', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '10', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '39', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '28', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '37', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '1', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '50', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '56', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '18', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '2', '1', '1', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '34', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '31', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '35', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '39', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '53', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '22', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '38', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '5', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '44', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '5', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '28', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '29', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '11', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '30', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '37', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '4', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '1', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '1', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_hrd', '37', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_hrd', '1', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '1', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_hrd', '37', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '32', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '38', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '38', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_hrd', '38', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_hrd', '38', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '38', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_hrd', '38', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '37', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '49', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hglm', '37', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '10', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '3', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '51', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '52', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '36', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '32', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '66', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '55', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '57', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '13', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '14', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '17', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '35', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '58', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '59', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '60', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '62', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '61', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '5', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '37', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '69', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '72', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '40', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '4', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '56', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '50', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '42', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '6', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '3', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '2', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '49', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '65', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '5', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '12', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '13', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '61', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '34', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '31', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '33', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '19', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '17', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '15', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '69', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '72', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '40', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '7', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '8', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '39', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '48', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '54', '1', '0', '0', '0', '0', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '60', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '64', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '68', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '71', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '67', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '28', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '29', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '11', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '30', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '47', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '59', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '63', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '66', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '1', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '62', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '57', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '58', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '45', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '44', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '43', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '55', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '38', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '22', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '10', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '14', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '36', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '32', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '53', '1', '0', '0', '0', '0', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '70', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '51', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '52', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '65', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '13', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '50', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '42', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '3', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '20', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '1', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '5', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '49', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '4', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '37', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '12', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_ga', '14', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '61', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '2', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '34', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '31', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '72', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '69', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '73', '0', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '15', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '56', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '45', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '44', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '43', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '51', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '52', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '57', '1', '0', '0', '0', '0', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '58', '1', '0', '0', '0', '0', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '62', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '66', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '10', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '11', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '47', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '59', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '63', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '67', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '70', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '22', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '38', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '55', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '30', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '28', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '29', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '39', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '36', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '32', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '48', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '54', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '53', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '60', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '64', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '68', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '71', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '4', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '12', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '3', '1', '0', '0', '0', '1', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '42', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '50', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '61', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '65', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '66', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '62', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '58', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '57', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '56', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '45', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '44', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '43', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '5', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '74', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '49', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '13', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '2', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '34', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '31', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '15', '1', '0', '0', '0', '1', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '69', '1', '0', '0', '0', '1', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '72', '1', '0', '0', '0', '1', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '40', '1', '0', '0', '0', '1', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '10', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '11', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '47', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '53', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '59', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '63', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '67', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '70', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '22', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '38', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '55', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '30', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '28', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '29', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '39', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '36', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '32', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '48', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '54', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '60', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '64', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '68', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '51', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '52', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '49', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '14', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '6', '1', '1', '1', '0', '1', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '42', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '50', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '56', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '61', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '65', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '5', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '12', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '2', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '34', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '31', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '72', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '69', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '15', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '3', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '10', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '11', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '47', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '53', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '59', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '63', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '67', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '70', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '71', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '68', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '64', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '60', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '54', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '48', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '30', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '28', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '29', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '39', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '36', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '32', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '22', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '38', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '55', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '45', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '44', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '43', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '51', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '52', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '57', '1', '1', '1', '0', '1', '0', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '58', '1', '1', '1', '0', '1', '0', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '62', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '66', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '40', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '1', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '65', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '61', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '37', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '22', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '10', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '59', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '68', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '55', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '53', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '32', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '54', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '11', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '28', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '29', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '64', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '68', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '12', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '4', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '18', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '72', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '49', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '1', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '5', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '2', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '34', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '31', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '19', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '17', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '14', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '12', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '13', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '69', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '3', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '15', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '7', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '6', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '10', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '11', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '47', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '53', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '59', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '63', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '67', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '70', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '22', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '38', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '55', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '30', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '28', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '29', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '39', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '36', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '32', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '48', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '60', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '64', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '68', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '71', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '8', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '42', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '45', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '51', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '50', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '44', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '57', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '56', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '52', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '61', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '58', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '65', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '59', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '53', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '36', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '38', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '67', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '64', '1', '1', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '48', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '4', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '74', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '65', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '57', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '58', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '62', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '51', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '52', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '53', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '32', '1', '1', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '64', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '59', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '29', '1', '1', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '39', '1', '1', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '11', '1', '1', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '28', '1', '1', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '61', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '65', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '57', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '58', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '51', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '52', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '32', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '59', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '67', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '63', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '11', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '28', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '29', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '60', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '38', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '55', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '74', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '45', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '66', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '4', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '19', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '42', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '49', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '1', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '5', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '62', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '2', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '34', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '31', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '10', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '22', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '38', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '55', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '11', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '53', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '59', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '63', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '67', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '70', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '30', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '28', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '29', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '39', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '36', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '32', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '48', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '47', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '54', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '60', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '64', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '61', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '65', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '44', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '43', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '52', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '51', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '50', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '58', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '56', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '40', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '16', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '75', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '42', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '0', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '3', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '15', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '69', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '72', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '40', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '5', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '49', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '4', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '37', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_ga', '13', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_ga', '12', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '70', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '63', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '59', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '53', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '47', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '11', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '10', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '22', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '38', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '55', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '30', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '28', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '29', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '39', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '36', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '32', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '48', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '54', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '60', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '64', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '68', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '67', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '66', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '71', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '45', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '44', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '43', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '52', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '51', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '1', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '58', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '62', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_hrd', '65', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_hrd', '4', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_hrd', '5', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_hrd', '60', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_hrd', '54', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_hrd', '29', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_hrd', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_hrd', '53', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_hrd', '59', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_hrd', '64', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_hrd', '67', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '37', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ceo_tmw', '20', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '14', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '22', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '10', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '54', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '60', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '65', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_COOR', '66', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_COOR', '61', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_COOR', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_coor', '13', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_coor', '1', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_coor', '5', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_coor', '2', '1', '0', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_coor', '34', '1', '0', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_coor', '31', '1', '0', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_coor', '14', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_COOR', '10', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_COOR', '11', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_COOR', '53', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_COOR', '59', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_COOR', '63', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_COOR', '67', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_COOR', '70', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_COOR', '22', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_COOR', '38', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_COOR', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_COOR', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_COOR', '55', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_COOR', '28', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_COOR', '29', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_COOR', '39', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_COOR', '36', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_COOR', '32', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_COOR', '54', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_COOR', '60', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_COOR', '64', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_COOR', '68', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_COOR', '71', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_COOR', '62', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_COOR', '65', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_GA', '5', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_GA', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_ga', '4', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_coor', '4', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_coor', '49', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_GA', '64', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_GA', '53', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_GA', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_GA', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_GA', '10', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_GA', '63', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '4', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '13', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '10', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '54', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '60', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '67', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '31', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '55', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('CRB_GA', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('CRB_GA', '5', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('CRB_GA', '53', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('CRB_GA', '63', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('CRB_GA', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('CRB_GA', '10', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_GA', '54', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('CRB_GA', '61', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('CRB_GA', '51', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('CRB_GA', '52', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_GA', '61', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_GA', '51', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_GA', '52', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('CRB_GA', '1', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('CRB_GA', '62', '1', '1', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('BDG_GA', '62', '1', '1', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '49', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '16', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '10', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '64', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '62', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '66', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '5', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '61', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '2', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '53', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '59', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '63', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '67', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '55', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '39', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '36', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '32', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '54', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '60', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '64', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '68', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '65', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '51', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '52', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '62', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '74', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '66', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '5', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '34', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '49', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '53', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '59', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '63', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '67', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '55', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '39', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '36', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '32', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '54', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '60', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '64', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '68', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '2', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '62', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '66', '1', '1', '1', '0', '1', '0', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_hrd', '16', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_hrd', '55', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_hrd', '39', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_hrd', '36', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_hrd', '32', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_hrd', '66', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_GA', '1', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_GA', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_GA', '61', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('CRB_GA', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_GA', '10', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_GA', '53', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_GA', '63', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_GA', '64', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_coor', '4', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_COOR', '2', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_COOR', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_COOR', '61', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_COOR', '65', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_coor', '49', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_coor', '1', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_coor', '5', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_COOR', '34', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_COOR', '31', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_COOR', '14', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_COOR', '12', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_COOR', '13', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_COOR', '16', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_COOR', '10', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_COOR', '11', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_COOR', '53', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_COOR', '59', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_COOR', '63', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_COOR', '67', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_COOR', '22', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_COOR', '38', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_COOR', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_COOR', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_COOR', '55', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_COOR', '28', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_COOR', '29', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_COOR', '39', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_COOR', '36', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_COOR', '32', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_COOR', '54', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_COOR', '60', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_COOR', '64', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_COOR', '68', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_COOR', '62', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SMG_COOR', '66', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_ga', '5', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('YGY_GA', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('YGY_GA', '61', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_ga', '1', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('YGY_GA', '10', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('YGY_GA', '53', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('YGY_GA', '63', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('YGY_GA', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('YGY_GA', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('YGY_GA', '54', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('YGY_GA', '64', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_hrd', '65', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_hrd', '49', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_hrd', '31', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_hrd', '53', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_hrd', '59', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_hrd', '67', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_hrd', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_hrd', '55', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_hrd', '39', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_hrd', '36', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_hrd', '32', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_hrd', '54', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_hrd', '60', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_hrd', '68', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_hrd', '66', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_hrd', '49', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_hrd', '53', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_hrd', '59', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_hrd', '67', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_hrd', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_hrd', '55', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_hrd', '39', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_hrd', '36', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_hrd', '32', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_hrd', '54', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_hrd', '60', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_hrd', '68', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_hrd', '66', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '61', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '65', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '49', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '74', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '14', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '53', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '59', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '63', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '67', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '55', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '39', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '36', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '32', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '54', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '60', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '64', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '68', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SLO_GA', '1', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SLO_GA', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SLO_GA', '61', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SLO_GA', '5', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SLO_GA', '10', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SLO_GA', '53', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SLO_GA', '63', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SLO_GA', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SLO_GA', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SLO_GA', '54', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SLO_GA', '64', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('SLO_GA', '62', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '61', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '65', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '5', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '12', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '34', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '59', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '53', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '28', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '55', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '29', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '39', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '36', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '32', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '54', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '60', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '64', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '68', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '62', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '66', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '61', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '49', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '31', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '53', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '59', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '63', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '67', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '55', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '29', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '39', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '36', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '32', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '54', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '60', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '64', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '68', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '62', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '1', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '66', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '37', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '49', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '1', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '31', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '17', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '3', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '69', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '40', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '47', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '53', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '59', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '63', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '67', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '70', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '55', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '28', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '29', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '39', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '36', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '32', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '48', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '54', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '60', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '64', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '68', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '71', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '18', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '47', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '53', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '59', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '63', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '67', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '70', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '55', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '28', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '29', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '39', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '36', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '32', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '48', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '54', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '60', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '64', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '68', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '71', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '37', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '4', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '47', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '2', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '34', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '31', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '17', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '18', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '47', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '53', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '59', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '63', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '67', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '70', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '55', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '29', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '39', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '36', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '32', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '48', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '54', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '60', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '64', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '68', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '71', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '49', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '70', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '63', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '53', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '11', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '55', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '29', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '39', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '36', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '32', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '5', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '48', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '4', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '54', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '67', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '60', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '59', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '64', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '47', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '68', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '10', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '71', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '59', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '63', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '67', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '70', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '55', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '29', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '39', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '36', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '32', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '48', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '54', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '60', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '64', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '68', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '71', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '49', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '47', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '53', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '59', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '63', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '67', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '70', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '55', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '29', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '39', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '36', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '32', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '48', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '54', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '60', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '64', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '68', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '71', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '5', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '47', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '53', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '59', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '63', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '67', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '70', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '55', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '29', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '39', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '36', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '32', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '48', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '54', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '60', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '64', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '68', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '71', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '49', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '18', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '47', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '53', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '59', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '63', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '67', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '70', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '55', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '28', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '29', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '39', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '36', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '32', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '48', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '54', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '60', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '64', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '68', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '71', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_bom', '10', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_bom', '11', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_bom', '47', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_bom', '53', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_bom', '59', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_bom', '63', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_bom', '67', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_bom', '70', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_bom', '22', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_bom', '38', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_bom', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_bom', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_bom', '55', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_bom', '30', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_bom', '28', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_bom', '29', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_bom', '39', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_bom', '36', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_bom', '32', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_bom', '48', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_bom', '54', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_bom', '60', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_bom', '64', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_bom', '68', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_bom', '71', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '37', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '4', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '63', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '59', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '53', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '47', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '28', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '38', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '55', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '29', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '39', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '36', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '32', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '48', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '54', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '60', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '64', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '68', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '71', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '5', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '63', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '67', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '70', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '55', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '29', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '39', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '36', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '32', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '48', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '54', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '60', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '64', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '68', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '71', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '37', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '4', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '18', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '47', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '53', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '59', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '63', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '67', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '70', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '21', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '41', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '55', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '28', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '29', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '39', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '36', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '32', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '48', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '54', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '60', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '64', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '68', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '71', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '62', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '66', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '37', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '20', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '16', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '40', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('demo', '43', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '12', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '13', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '16', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_hrd', '13', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_hrd', '33', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '18', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '20', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('admin', '16', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '18', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '20', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '16', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hgla', '1', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hgla', '2', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hgla', '3', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hgla', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hgla', '42', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hgla', '50', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hgla', '56', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hgla', '61', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hgla', '65', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hgla', '5', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hgla', '49', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hgla', '4', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hgla', '37', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '33', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '49', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '5', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '74', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '74', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '37', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '14', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '33', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '16', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '14', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_ga', '2', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '75', '1', '1', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '33', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '17', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '16', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '1', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '4', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '1', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '5', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '49', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_hrd', '37', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_hrd', '1', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_hrd', '5', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_hrd', '74', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '74', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '1', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '5', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_hrd', '74', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '77', '1', '1', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '19', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '33', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '12', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '13', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '16', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_hrd', '16', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '74', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '78', '1', '1', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('support_hris', '76', '1', '1', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '4', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '74', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '13', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '9', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '83', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '77', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '78', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '82', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '81', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '76', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '79', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('cfo_tmw', '80', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '16', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_ga', '16', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '16', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_coor', '12', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '81', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ass_hglm', '75', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_hrd', '84', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '49', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_bom', '1', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_bom', '84', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '1', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_coor', '37', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_coor', '84', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_ga', '5', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_ga', '1', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_ga', '84', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_hrd', '84', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('coor_pst', '84', '1', '1', '1', '1', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '37', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat1', '84', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '37', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '84', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_bom', '1', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_hrd', '84', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('crb_bom', '84', '1', '1', '1', '1', '1', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('mgl_hrd', '84', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '4', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '74', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '1', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_bom', '1', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_hrd', '84', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '1', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '37', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_hrd', '84', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pwo_bom', '84', '1', '1', '1', '1', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_hrd', '84', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbg_bom', '84', '1', '1', '1', '1', '1', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_bom', '84', '1', '1', '1', '1', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('slo_hrd', '84', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '37', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_coor', '37', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_coor', '84', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_hrd', '84', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '37', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('pti_bom', '84', '1', '1', '1', '1', '1', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '4', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_hrd', '84', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '49', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_bom', '1', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '37', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tsk_hrd', '84', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('ygy_ga', '84', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('bdg_coor', '16', '1', '1', '1', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '4', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '1', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '37', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('sbm_bom', '84', '1', '1', '1', '1', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '49', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('smg_bom', '1', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '37', '1', '0', '0', '0', '1', '1', '1'); INSERT INTO `tbl_sys_master_privileges` VALUES ('tgl_bom', '84', '1', '1', '1', '1', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '1', '1', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '0', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `tbl_sys_master_privileges` VALUES ('hrd_pusat2', '7', '1', '1', '1', '0', '1', '0', '0'); -- ---------------------------- -- Table structure for tbl_sys_master_user -- ---------------------------- DROP TABLE IF EXISTS `tbl_sys_master_user`; CREATE TABLE `tbl_sys_master_user` ( `user_id` varchar(25) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT '', `user_password` varchar(35) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, `user_first_name` varchar(35) CHARACTER SET latin1 COLLATE latin1_general_ci DEFAULT NULL, `user_last_name` varchar(35) DEFAULT NULL, `user_date_join` datetime NOT NULL, `user_address` text CHARACTER SET latin1 COLLATE latin1_general_ci, `user_telp` varchar(20) CHARACTER SET latin1 COLLATE latin1_general_ci DEFAULT NULL, `user_gender` char(1) CHARACTER SET latin1 COLLATE latin1_general_ci DEFAULT NULL, `user_email` varchar(40) CHARACTER SET latin1 COLLATE latin1_general_ci DEFAULT NULL, `user_active_status` char(1) CHARACTER SET latin1 COLLATE latin1_general_ci DEFAULT NULL, `level` int(2) DEFAULT NULL, `user_current_login_date` datetime NOT NULL, `user_current_login_host` varchar(35) CHARACTER SET latin1 COLLATE latin1_general_ci DEFAULT NULL, `kode_cabang` varchar(20) DEFAULT NULL, `id_pegawai` int(11) DEFAULT NULL, `group_user` int(11) DEFAULT NULL, `user_session_aktif` int(11) DEFAULT NULL, `user_created` int(255) DEFAULT NULL, `user_updated` int(255) DEFAULT NULL, `date_created` datetime DEFAULT NULL, `date_updated` datetime DEFAULT NULL, PRIMARY KEY (`user_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AVG_ROW_LENGTH=67 COMMENT='\r\n<option value="">[Pilih Group Pengguna]</option>\r\n<option value="1" <!--{if $EDIT_LEVEL == 1}--> selected <!--{/if}-->>HR STAFF</option>\r\n<option value="2" <!--{if $EDIT_LEVEL == 2}--> selected <!--{/if}-->>HR SVP CABANG</option>\r\n<option value="2" <!--{if $EDIT_LEVEL == 3}--> selected <!--{/if}-->>BOM</option>\r\n <option value="2" <!--{if $EDIT_LEVEL == 4}--> selected <!--{/if}-->>HR STAFF PUSAT</option>\r\n <option value="2" <!--{if $EDIT_LEVEL == 5}--> selected <!--{/if}-->>HR SPV PUSAT</option>\r\n <option value="2" <!--{if $EDIT_LEVEL == 6}--> selected <!--{/if}-->>HR MGR PUSAT</option>\r\n <option value="2" <!--{if $EDIT_LEVEL == 7}--> selected <!--{/if}-->>DIREKTUR</option>\r\n <option value="2" <!--{if $EDIT_LEVEL == 8}--> selected <!--{/if}-->>ADMIN</option>\r\n'; -- ---------------------------- -- Records of tbl_sys_master_user -- ---------------------------- INSERT INTO `tbl_sys_master_user` VALUES ('admin', 'YWRtaW4=', 'MOCHAMAD', 'TAUFIK', '2017-02-21 11:20:21', 'JL Pangauban No 91 bandung', '', '', '', '1', '1', '0000-00-00 00:00:00', '::1', '1', '69', '8', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('tsk_hrd', 'YWxhbmRhMDE5', 'MIKA', 'JAYANTIKA', '2017-02-25 10:53:19', 'Bebedilan', '', '', '', '1', '2', '0000-00-00 00:00:00', '192.168.254.254', '6', '980', '1', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('crb_hrd', 'Y2lyZWJvbg==', 'CAROLINA', 'PRAESSA', '2017-02-21 11:24:44', 'Jl. Intan 3C 8 No. 08 Phu Rt/Rw 02/14 Kel. Kalijaga Kec. Harjamukti ', '08882343831', 'P', '', '1', '2', '0000-00-00 00:00:00', '192.168.254.254', '5', '742', '1', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('hglm', 'YWRtaW4=', 'IMAN', 'TEGUH', '2017-02-21 11:25:17', 'JL Antrasit B 16A', '08889415199', 'L', '', '1', '1', '0000-00-00 00:00:00', '192.168.254.254', '1', '55', '1', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('bdg_hrd', 'MTIzNDU=', 'YANI', 'CAHYANI', '2017-02-21 11:24:11', 'Kp Bojong Genggong', '-', '', '-', '1', '2', '2015-04-06 15:26:00', '192.168.254.254', '2', '464', '1', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('pti_hrd', 'MTIzNDU=', 'ANISAH', '', '2017-02-23 13:25:05', 'Desa Pesagi Rt 008/001, Kayen, Pati', '0888801859650', 'P', '', '1', '2', '0000-00-00 00:00:00', '192.168.254.254', '8', '2061', '1', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('smg_hrd', 'c21nMjAxMA==', 'RIZA', 'DWI', '2017-02-27 15:53:59', 'Jl. Sembungan Utara No. 276', '088809410231', 'L', '0', '1', '2', '0000-00-00 00:00:00', '192.168.254.254', '7', '1211', '1', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('pwo_hrd', 'YWRtaW4=', 'GANJAR', 'WIDYANTOMO', '2017-05-04 11:25:55', 'Jl. Kamandaka Gg. Muria 13', '088809415201', 'L', '281631146', '1', '2', '0000-00-00 00:00:00', '192.168.254.254', '12', '1826', '1', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('ygy_hrd', 'YWRtaW4=', 'BAYU', '', '2017-07-05 08:34:58', ' \r\n ', '', 'L', '', '1', '2', '0000-00-00 00:00:00', '192.168.254.254', '10', '2265', '1', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('sbm_hrd', 'MjEyMjE5', 'DODI', 'GANDANA', '2017-02-24 10:47:11', 'JL. <NAME>AN 2', '08889634169', 'L', '', '1', '2', '0000-00-00 00:00:00', '192.168.254.254', '4', '630', '1', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('sbg_hrd', 'YWRtaW4=', 'HM', 'ALILUDIN', '2017-03-23 15:07:17', 'jln otista gg nangka ', '088801859651', 'L', '', '0', '2', '0000-00-00 00:00:00', '192.168.254.246', '3', '542', '1', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('tgl_hrd', 'cXdlcnR5', 'EKO', 'PRASTYO', '2017-03-21 09:08:37', 'Jl. Rogojampi Ds. Sumurpanggang Rt 01/02 - tegal', '08882623198', 'L', '', '1', '2', '0000-00-00 00:00:00', '192.168.254.254', '9', '1322', '1', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('slo_hrd', 'YWRtaW4=', 'YOHANES', 'CHRISETYO', '2017-07-05 08:40:02', 'Salam RT 1/RW 3, jati, Gatak, Sukoharjo.', '088801859654', 'L', '', '0', '2', '0000-00-00 00:00:00', '192.168.254.254', '11', '1752', '1', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('mgl_hrd', 'YWRtaW4=', 'TRI', 'HARNINGSIH', '2017-02-23 09:49:40', 'Magersari Panjang', '088801859655', 'P', '', '0', '2', '0000-00-00 00:00:00', '192.168.254.254', '13', '2021', '1', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('bdg_bom', 'YWRtaW4=', 'SUMANTO', 'MS', '2017-07-11 16:18:32', 'JL.BALADEWA GG.V NO.50 RT/RW 7/9 PAJAJARAN PAJAJARAN CICENDO', '08882100819', 'L', '(022)6077877', '1', '2', '0000-00-00 00:00:00', '192.168.254.246', '2', '683', '3', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('crb_bom', 'YWRtaW4=', 'TEDDY', 'HERDIANTO', '2017-07-17 16:18:28', 'Jl. <NAME>i Dxi No. 117 Rt 01/07 Kel Kecapi Harjamukti Perumnas Cirebon', '08886050561', 'L', '', '1', '2', '0000-00-00 00:00:00', '192.168.254.254', '5', '862', '3', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('tsk_bom', 'YWRtaW4=', 'ACE', 'SYAIFULLOH', '2017-07-17 09:39:40', 'Gg Sukapakir Tengah No 97 197C', '08889421030', 'L', '', '1', '2', '2015-03-03 00:24:00', '192.168.254.254', '6', '1', '3', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('sbm_bom', 'YWRtaW4=', 'CHRISTIANUS', 'PURWONO', '2017-08-22 09:29:36', 'Komp Cingcin Permata Indah Blok GA No 58 RT1102 Soreang', '-', 'L', '-', '1', '2', '0000-00-00 00:00:00', '192.168.254.254', '4', '191', '3', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('sbg_bom', 'YWRtaW4=', 'MARDY', 'KARMIRAN', '2017-02-21 13:33:32', 'Komp. GBI Blok B4 No 11A Ciwastra', '08882101584', 'L', '', '1', '2', '0000-00-00 00:00:00', '192.168.254.254', '3', '556', '3', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('tgl_bom', 'YWRtaW4=', 'SUGIARNO', '', '2016-07-29 15:30:15', 'Jl. Melati IV Mejasem Barat No.19 RT.08/RW.08 Tegal', '-', '', '-', '1', '2', '0000-00-00 00:00:00', '192.168.254.254', '9', '100921686', '3', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('smg_bom', 'MTIzNDU=', 'UDI', 'PRATIKTO', '2017-05-10 09:35:01', 'Jl. Blanak II No.17, Perum Minomartani, Sleman, Yogyakarta', '08882706224', 'L', '', '1', '2', '0000-00-00 00:00:00', '192.168.254.254', '7', '1738', '3', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('pti_bom', 'YWRtaW4=', 'MARIA', 'MD', '2016-07-29 15:31:56', 'Karangploso RT 001/059 Kel. Maguwoharjo Kec Depok -Sleman', '-', 'P', '-', '1', '2', '0000-00-00 00:00:00', '192.168.254.254', '8', '10822623', '3', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('pwo_bom', 'NTYwMzc1MTBPZA==', 'DEDI', 'ROHENDI', '2017-02-20 10:38:06', 'Situ Beet', '08889398291', 'L', '', '1', '2', '0000-00-00 00:00:00', '192.168.254.254', '12', '1796', '3', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('ygy_bom', 'YWRtaW4=', 'PURBOWO', '', '2016-07-29 15:33:40', 'Kiyaran Rt/Rw 01/18 Wukirsari Cangkringan Sleman', '088802755061', 'L', '-', '1', '2', '0000-00-00 00:00:00', '192.168.254.254', '10', '81021971', '3', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('slo_bom', 'YWRtaW4=', 'CHILD', 'HITRA', '2017-05-03 20:40:01', 'Gawanan Barat', '08886708639', 'L', '', '1', '2', '2015-01-06 18:50:00', '192.168.254.254', '11', '20', '3', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('mgl_bom', 'YWRtaW4=', 'HERI', '', '2017-05-03 20:38:28', ' \r\n ', '-', 'L', '-', '1', '2', '0000-00-00 00:00:00', '192.168.254.254', '13', '981221772', '3', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('coor_pst', 'YWRtaW4=', 'LUCKY', 'SUHENDI', '2017-02-23 12:45:34', 'KP Bojongsalak', '088801844625', '', '', '1', '1', '2015-04-17 23:33:00', '192.168.254.254', '1', '64', '1', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('support_hris', 'c2VtYW5nYXQ0NQ==', 'GALIH', 'HUMAM', '2016-11-29 08:46:39', 'Kp. Cimaragas', '08889574043', '', '<EMAIL>', '1', '1', '0000-00-00 00:00:00', '192.168.254.254', '1', '100130048', '2', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('ass_hglm', 'MTIzNDU=', 'IQBAL', 'IQBAL', '2017-08-31 11:38:05', 'Kp Kertasari', '08882000003', 'L', '', '1', '1', '0000-00-00 00:00:00', '192.168.254.254', '1', '56', '1', '0', null, '69', null, '2017-08-31 11:38:05'); INSERT INTO `tbl_sys_master_user` VALUES ('hrd_pusat1', 'MTIzNDU=', 'ECIN', 'WARYATI', '2017-02-21 11:20:43', 'Jl Jatihandap', '088802024688', '', '', '1', '1', '0000-00-00 00:00:00', '192.168.254.79', '1', '35', '1', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('hrd_pusat2', 'MTIzNDU=', 'WAHYU', 'HIDAYAT', '2017-02-23 17:02:39', 'Jl Kiaracondong blk 350 gg sukamaju no 2', '088801859653', 'L', '', '1', '1', '0000-00-00 00:00:00', '192.168.254.75', '1', '94', '1', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('bdg_coor', 'YWRtaW4=', 'SANI', '', '2016-12-28 10:20:53', ' \r\n ', '``', 'L', '``', '1', '2', '0000-00-00 00:00:00', '192.168.254.254', '2', '502', '2', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('ceo_tmw', 'YWRtaW4=', 'HANAFIE', 'MULIANA', '2016-12-26 14:54:06', 'parahyangan rumah vila 8 / 106', '``', 'L', '``', '1', '1', '0000-00-00 00:00:00', '192.168.254.254', '1', '52', '1', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('cfo_tmw', 'YWRtaW4=', 'AGUSTIN', 'IMELLDA', '2016-12-26 15:11:03', 'Jl Cipaku indah VI No 1', '``', 'P', '``', '1', '1', '0000-00-00 00:00:00', '192.168.254.246', '1', '5', '7', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('bdg_ga', 'YWRtaW4=', 'VERDIX', 'JUNAEDI', '2017-02-21 11:24:27', 'Perum Rancaekek Permai Blok H6 No 5 ', '-', 'L', '-', '1', '2', '0000-00-00 00:00:00', '192.168.254.254', '2', '445', '2', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('crb_ga', 'YWRtaW4=', 'FIKRI', 'MAULAN', '2016-12-29 08:36:31', 'Empty', '-', 'L', '-', '1', '2', '2016-12-29 08:36:31', '2016-12-29 08:36:31', '5', '2863', '1', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('smg_ga', 'YWRtaW4=', 'ARIF', 'YUNANTO', '2016-12-29 15:19:00', 'Kp. Silandak Rt 001 Rw 013, <NAME>, Kec. Ngaliyan', '08883951350', 'L', '-', '1', '2', '2016-12-29 15:19:00', '2016-12-29 15:19:00', '7', '2079', '1', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('smg_coor', 'YWRtaW4=', 'RIZA', 'DWI', '2016-12-29 15:20:16', 'Jl. Sembungan Utara No. 276', '088809410231', 'P', '-', '0', '2', '2016-12-29 15:20:16', '2016-12-29 15:20:16', '7', '2245', '2', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('ygy_ga', 'YWRtaW4=', 'AZIS', 'NURHUDA', '2016-12-29 15:33:35', 'Jambean Rt 09 Rw 04 Menayu Muntilan Magelang', '``', 'L', '``', '1', '2', '2016-12-29 15:33:35', '2016-12-29 15:33:35', '10', '1874', '1', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('slo_ga', 'YWRtaW4=', 'YOHANES', 'CHRISETYO', '2017-02-21 13:34:49', 'Salam RT 1/RW 3, jati, Gatak, Sukoharjo.', '088801859654', 'L', '', '1', '2', '2016-12-29 15:55:37', '2016-12-29 15:55:37', '11', '1752', '2', '0', null, null, null, null); INSERT INTO `tbl_sys_master_user` VALUES ('demo', 'bWVyZGVrYWF0YXVtYXRp', 'DEMO', '', '2017-01-04 22:39:45', 'jl kopo jaya no 8 A', '-', '', '-', '1', '1', '0000-00-00 00:00:00', '192.168.254.254', '1', '2767', '2', '0', null, null, null, null); -- ---------------------------- -- Table structure for tbl_transaksi -- ---------------------------- DROP TABLE IF EXISTS `tbl_transaksi`; CREATE TABLE `tbl_transaksi` ( `TRX__SALES_ORDER` varchar(20) NOT NULL, `TRX__CUSTOMER_ID` varchar(255) NOT NULL, `TRX__QTY` varchar(255) DEFAULT NULL, `TRX__HEADER` varchar(255) DEFAULT NULL, `TRX__PRODUCT_ID` varchar(255) NOT NULL, `TRX__SATUAN` varchar(255) DEFAULT NULL, `TRX__PURCHASED_DATE` varchar(255) DEFAULT NULL, `TRX__PRICE` varchar(255) DEFAULT NULL, `TRX__DESKRIPSI_PRODUCT` varchar(255) DEFAULT NULL, `TRX__USER_CREATED` int(11) DEFAULT NULL, `TRX__USER_UPDATED` int(11) DEFAULT NULL, `TRX__DATE_CREATED` datetime DEFAULT NULL, `TRX__DATE_UPDATED` datetime DEFAULT NULL, PRIMARY KEY (`TRX__SALES_ORDER`,`TRX__PRODUCT_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- ---------------------------- -- Records of tbl_transaksi -- ---------------------------- INSERT INTO `tbl_transaksi` VALUES ('17092609117GKDR', 'SHOPEE_ID', '1', '', ' 10000040 ', 'PCS', '2017-10-06 14:12:06', '60700', 'Pantene Sampo Hair Fall Control 750ml', '1', '1', '2017-10-06 14:12:06', '2017-10-06 14:12:06'); INSERT INTO `tbl_transaksi` VALUES ('17092609117GKDR', 'SHOPEE_ID', '1', '', '10000500', 'PCS', '2017-10-06 14:12:06', '60700', 'Pantene Sampo Hair Fall Control 750ml', '1', '1', '2017-10-06 14:12:06', '2017-10-06 14:12:06'); INSERT INTO `tbl_transaksi` VALUES ('17092610077HSQV', 'SHOPEE_ID', '2', '', '10000525', 'PCS', '2017-10-06 14:11:34', '89800', 'Head & Shoulder Sampo Smooth & Silky 480ml', '1', '1', '2017-10-06 14:11:34', '2017-10-06 14:11:34'); INSERT INTO `tbl_transaksi` VALUES ('170926223975T49', 'SHOPEE_ID', '1', '', '10000390 ', 'PCS', '2017-10-06 14:12:06', '75800', 'Paket Isi 2 - Head & Shoulder Sampo Lemon Fresh (Anti Dandruff) 330 ml', '1', '1', '2017-10-06 14:12:06', '2017-10-06 14:12:06'); -- ---------------------------- -- Table structure for tb_menu -- ---------------------------- DROP TABLE IF EXISTS `tb_menu`; CREATE TABLE `tb_menu` ( `id_menu` int(11) NOT NULL AUTO_INCREMENT, `nama_menu` varchar(50) NOT NULL, `icon` varchar(20) NOT NULL, `link` varchar(25) NOT NULL, `kat_menu` int(11) NOT NULL, PRIMARY KEY (`id_menu`) ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1; -- ---------------------------- -- Records of tb_menu -- ---------------------------- INSERT INTO `tb_menu` VALUES ('1', 'Dasboard', 'fa fa-dashboard', '#', '0'); INSERT INTO `tb_menu` VALUES ('2', 'Dasboard 1', 'fa fa-dashboard', 'dashboard', '1'); INSERT INTO `tb_menu` VALUES ('3', 'Dasboard 2', 'fa fa-dashboard', 'dashboard/2', '1'); INSERT INTO `tb_menu` VALUES ('4', 'Seting Menu', 'fa fa-gears', '#', '0'); INSERT INTO `tb_menu` VALUES ('6', 'menu admin', 'fa fa-gear', 'menu', '4'); INSERT INTO `tb_menu` VALUES ('7', 'Page', 'fa fa-folder', 'menu/page', '0');
<reponame>pedroetb/tajinaste-database \c tajinaste CREATE SCHEMA IF NOT EXISTS auth; CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; CREATE TABLE IF NOT EXISTS auth.users ( id smallserial PRIMARY KEY, uuid uuid UNIQUE NOT NULL DEFAULT uuid_generate_v4(), email text UNIQUE NOT NULL CHECK(email ~* '^.+@.+\..+$'), password text NOT NULL, role text NOT NULL CHECK(length(role) < 64), name text NOT NULL, photo uuid, created timestamp NOT NULL DEFAULT now() ); CREATE OR REPLACE FUNCTION auth.check_role_exists() RETURNS TRIGGER AS $$ BEGIN IF NOT EXISTS (SELECT 1 FROM pg_roles AS r WHERE r.rolname = NEW.role) THEN RAISE foreign_key_violation USING MESSAGE = 'unknown database role: ' || NEW.role; RETURN NULL; END IF; RETURN NEW; END $$ LANGUAGE plpgsql; DROP TRIGGER IF EXISTS ensure_user_role_exists ON auth.users; CREATE CONSTRAINT TRIGGER ensure_user_role_exists AFTER INSERT OR UPDATE ON auth.users FOR EACH ROW EXECUTE PROCEDURE auth.check_role_exists(); CREATE EXTENSION IF NOT EXISTS pgcrypto; CREATE OR REPLACE FUNCTION auth.encrypt_password() RETURNS TRIGGER AS $$ BEGIN IF TG_OP = 'INSERT' OR NEW.password <> OLD.password THEN NEW.password = crypt(NEW.password, gen_salt('bf')); END IF; RETURN NEW; END $$ LANGUAGE plpgsql; DROP TRIGGER IF EXISTS encrypt_password ON auth.users; CREATE TRIGGER encrypt_password BEFORE INSERT OR UPDATE ON auth.users FOR EACH ROW EXECUTE PROCEDURE auth.encrypt_password(); CREATE OR REPLACE FUNCTION auth.get_user_data(email text, password text) RETURNS text AS $$ BEGIN RETURN ( SELECT role AS user_role FROM auth.users WHERE users.email = get_user_data.email AND users.password = crypt(get_user_data.password, users.password) ); END; $$ LANGUAGE plpgsql; DROP TYPE IF EXISTS user_data; CREATE TYPE user_data AS ( id smallint, uuid text, email text, role text, name text, photo text ); CREATE OR REPLACE FUNCTION login(email text, password text) RETURNS user_data AS $$ DECLARE role text; data user_data; BEGIN SELECT auth.get_user_data(email, password) INTO role; IF role IS NULL THEN RAISE invalid_password USING MESSAGE = 'invalid user or password'; RETURN NULL; END IF; SELECT id, uuid, u.email, u.role, name, photo FROM auth.users u WHERE login.email = u.email INTO data; RETURN data; END; $$ LANGUAGE plpgsql;
SET @name = '%s'; SET @description = '%s';
<filename>migrations/2019-10-30-155718_schema/down.sql drop table users; drop table client; drop view postfix_view;
UPDATE games SET owner_id=$2, opponent_id=$3, current_player_id=$4, step_count=$5, winner_id=$6, field=$7, current_state=$8 WHERE id=$1
<gh_stars>1-10 -- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 05, 2017 at 02:14 AM -- Server version: 10.1.21-MariaDB -- PHP Version: 5.6.30 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: `hpcs_admin` -- -- -------------------------------------------------------- -- -- Table structure for table `attendance_table` -- CREATE TABLE `attendance_table` ( `EmpId` varchar(200) NOT NULL, `AttendanceDate` date NOT NULL, `AttendanceDay` varchar(20) NOT NULL, `EntryTime` varchar(50) NOT NULL, `ExitTime` varchar(50) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `attendance_table` -- INSERT INTO `attendance_table` (`EmpId`, `AttendanceDate`, `AttendanceDay`, `EntryTime`, `ExitTime`) VALUES ('HPCS16005', '2017-04-19', 'Wednesday', '09:03', '18:41'), ('HPCS16005', '2017-04-20', 'Thursday', '09:07', '18:35'), ('HPCS16005', '2017-04-21', 'Friday', '08:59', '19:11'), ('HPCS16005', '2017-04-24', 'Monday', '09:02', '18:54'), ('HPCS16005', '2017-04-25', 'Tuesday', '09:04', '18:44'), ('HPCS16005', '2017-04-26', 'Wednesday', '09:12', '18:40'), ('HPCS16005', '2017-04-27', 'Thursday', '09:26', '19:30'), ('HPCS16005', '2017-04-28', 'Friday', '09:10', '18:43'), ('HPCS16005', '2017-05-01', 'Monday', '09:10', '18:40'), ('HPCS16005', '2017-05-02', 'Tuesday', '09:13', '18:35'), ('HPCS16005', '2017-05-03', 'Wednesday', '09:11', '18:45'), ('HPCS16005', '2017-05-04', 'Thursday', '09:01', '18:37'), ('HPCS16005', '2017-05-05', 'Friday', '09:07', '18:30'), ('HPCS16005', '2017-05-08', 'Monday', '09:08', '18:53'), ('HPCS16005', '2017-05-09', 'Tuesday', '09:05', '18:43'), ('HPCS16005', '2017-05-10', 'Wednesday', '09:05', '18:44'), ('HPCS16005', '2017-05-11', 'Thursday', '08:48', '18:35'), ('HPCS16005', '2017-05-12', 'Friday', '09:02', '18:41'), ('HPCS16005', '2017-05-15', 'Monday', '09:06', '18:37'), ('HPCS16005', '2017-05-16', 'Tuesday', '10:25', '18:40'), ('HPCS16005', '2017-05-17', 'Wednesday', '09:28', '19:05'), ('HPCS16005', '2017-05-18', 'Thursday', '08:48', '18:33'), ('HPCS16005', '2017-05-22', 'Monday', '09:04', '19:11'), ('HPCS16005', '2017-05-23', 'Tuesday', '09:03', '18:36'), ('HPCS16005', '2017-05-24', 'Wednesday', '09:14', '18:35'), ('HPCS16005', '2017-05-25', 'Thursday', '09:00', '18:36'), ('HPCS16005', '2017-05-26', 'Friday', '08:56', '19:47'), ('HPCS16005', '2017-05-29', 'Monday', '09:08', '18:37'), ('HPCS16005', '2017-05-30', 'Tuesday', '09:07', '18:39'), ('HPCS16005', '2017-05-31', 'Wednesday', '09:14', '18:40'), ('HPCS16005', '2017-06-01', 'Thursday', '12:55', '19:00'), ('HPCS16005', '2017-06-02', 'Friday', '09:17', '18:54'), ('HPCS16005', '2017-06-05', 'Monday', '09:03', '18:45'), ('HPCS16005', '2017-06-12', 'Monday', '09:10', '18:43'), ('HPCS16005', '2017-06-13', 'Tuesday', '09:05', '19:08'), ('HPCS16005', '2017-06-14', 'Wednesday', '09:05', '18:34'), ('HPCS16005', '2017-06-15', 'Thursday', '09:18', '18:38'), ('HPCS16005', '2017-06-16', 'Friday', '09:15', '19:14'), ('HPCS16005', '2017-06-19', 'Monday', '09:20', '19:18'), ('HPCS16005', '2017-06-20', 'Tuesday', '09:20', '18:34'), ('HPCS16005', '2017-06-21', 'Wednesday', '09:10', '18:42'), ('HPCS16005', '2017-06-22', 'Thursday', '08:38', '18:34'), ('HPCS16005', '2017-06-23', 'Friday', '09:20', '18:45'), ('HPCS16005', '2017-06-26', 'Monday', '08:28', '18:38'), ('HPCS16005', '2017-06-27', 'Tuesday', '09:20', '18:38'), ('HPCS16005', '2017-06-28', 'Wednesday', '09:14', '18:36'), ('HPCS17012', '2017-04-19', 'Wednesday', '09:03', '18:41'), ('HPCS17012', '2017-04-20', 'Thursday', '09:07', '18:35'), ('HPCS17012', '2017-04-21', 'Friday', '08:59', '19:11'), ('HPCS17012', '2017-04-24', 'Monday', '09:02', '18:54'), ('HPCS17012', '2017-04-25', 'Tuesday', '09:04', '18:44'), ('HPCS17012', '2017-04-26', 'Wednesday', '09:12', '18:40'), ('HPCS17012', '2017-04-27', 'Thursday', '09:26', '19:30'), ('HPCS17012', '2017-04-28', 'Friday', '09:10', '18:43'), ('HPCS17012', '2017-05-01', 'Monday', '09:10', '18:40'), ('HPCS17012', '2017-05-02', 'Tuesday', '09:13', '18:35'), ('HPCS17012', '2017-05-03', 'Wednesday', '09:11', '18:45'), ('HPCS17012', '2017-05-04', 'Thursday', '09:01', '18:37'), ('HPCS17012', '2017-05-05', 'Friday', '09:07', '18:30'), ('HPCS17012', '2017-05-08', 'Monday', '09:08', '18:53'), ('HPCS17012', '2017-05-09', 'Tuesday', '09:05', '18:43'), ('HPCS17012', '2017-05-10', 'Wednesday', '09:05', '18:44'), ('HPCS17012', '2017-05-11', 'Thursday', '08:48', '18:35'), ('HPCS17012', '2017-05-12', 'Friday', '09:02', '18:41'), ('HPCS17012', '2017-05-15', 'Monday', '09:06', '18:37'), ('HPCS17012', '2017-05-16', 'Tuesday', '10:25', '18:40'), ('HPCS17012', '2017-05-17', 'Wednesday', '09:28', '19:05'), ('HPCS17012', '2017-05-18', 'Thursday', '08:48', '18:33'), ('HPCS17012', '2017-05-22', 'Monday', '09:04', '19:11'), ('HPCS17012', '2017-05-23', 'Tuesday', '09:03', '18:36'), ('HPCS17012', '2017-05-24', 'Wednesday', '09:14', '18:35'), ('HPCS17012', '2017-05-25', 'Thursday', '09:00', '18:36'), ('HPCS17012', '2017-05-26', 'Friday', '08:56', '19:47'), ('HPCS17012', '2017-05-29', 'Monday', '09:08', '18:37'), ('HPCS17012', '2017-05-30', 'Tuesday', '09:07', '18:39'), ('HPCS17012', '2017-05-31', 'Wednesday', '09:14', '18:40'), ('HPCS17012', '2017-06-01', 'Thursday', '12:55', '19:00'), ('HPCS17012', '2017-06-02', 'Friday', '09:17', '18:54'), ('HPCS17012', '2017-06-05', 'Monday', '09:03', '18:45'), ('HPCS17012', '2017-06-12', 'Monday', '09:10', '18:43'), ('HPCS17012', '2017-06-13', 'Tuesday', '09:05', '19:08'), ('HPCS17012', '2017-06-14', 'Wednesday', '09:05', '18:34'), ('HPCS17012', '2017-06-15', 'Thursday', '09:18', '18:38'), ('HPCS17012', '2017-06-16', 'Friday', '09:15', '19:14'), ('HPCS17012', '2017-06-19', 'Monday', '09:20', '19:18'), ('HPCS17012', '2017-06-20', 'Tuesday', '09:20', '18:34'), ('HPCS17012', '2017-06-21', 'Wednesday', '09:10', '18:42'), ('HPCS17012', '2017-06-22', 'Thursday', '08:38', '18:34'), ('HPCS17012', '2017-06-23', 'Friday', '09:20', '18:45'), ('HPCS17012', '2017-06-26', 'Monday', '08:28', '18:38'), ('HPCS17012', '2017-06-27', 'Tuesday', '09:20', '18:38'), ('HPCS17012', '2017-06-28', 'Wednesday', '09:14', '18:36'); -- -------------------------------------------------------- -- -- Table structure for table `checklist` -- CREATE TABLE `checklist` ( `serialNo` int(100) NOT NULL, `EmployeeID` varchar(100) NOT NULL, `name` varchar(100) NOT NULL, `hpcs_email_ID` varchar(100) NOT NULL DEFAULT '0', `prepare_laptop` varchar(100) NOT NULL DEFAULT '0', `email_social` varchar(100) NOT NULL DEFAULT '0', `email_instructions` varchar(100) NOT NULL DEFAULT '0', `email_mlq4` varchar(100) NOT NULL DEFAULT '0', `email_teamsID` varchar(100) NOT NULL DEFAULT '0', `email_joiningProcess` varchar(100) NOT NULL DEFAULT '0', `GoogleDriveAccount` varchar(100) NOT NULL DEFAULT '0', `FillDetailsSheet` varchar(100) NOT NULL DEFAULT '0', `collectDocs` varchar(100) NOT NULL DEFAULT '0', `initialVerification` varchar(100) NOT NULL DEFAULT '0', `handOriginals` varchar(100) NOT NULL DEFAULT '0', `giveLaptop` varchar(100) NOT NULL DEFAULT '0', `giveNotebookPen` varchar(100) NOT NULL DEFAULT '0', `greetingCard` varchar(100) NOT NULL DEFAULT '0', `trainingSchedule` varchar(100) NOT NULL DEFAULT '0', `welcomeMeeting` varchar(100) NOT NULL DEFAULT '0', `welcomeEmail` varchar(100) NOT NULL DEFAULT '0', `skypeID` varchar(100) NOT NULL DEFAULT '0', `pingID` varchar(100) NOT NULL DEFAULT '0', `addInSkypeGroup` varchar(100) NOT NULL DEFAULT '0', `giveJoiningDocs` varchar(100) NOT NULL DEFAULT '0', `signOnDocs` varchar(100) NOT NULL DEFAULT '0', `performaSheet` varchar(100) NOT NULL DEFAULT '0', `verifyPersonalContact` varchar(100) NOT NULL DEFAULT '0', `createEmpFile` varchar(100) NOT NULL DEFAULT '0', `placeSignedDocs` varchar(100) NOT NULL DEFAULT '0', `addBankKotak` varchar(100) NOT NULL DEFAULT '0', `attendanceSheet` varchar(100) NOT NULL DEFAULT '0', `fillEmpDetailSheet` varchar(100) NOT NULL DEFAULT '0', `fillEmpSalarySheet` varchar(100) NOT NULL DEFAULT '0', `addBirthday` varchar(100) NOT NULL DEFAULT '0', `addMarriage` varchar(100) NOT NULL DEFAULT '0', `addOneYearCompletion` varchar(100) NOT NULL DEFAULT '0', `addOnePointFiveYear` varchar(100) NOT NULL DEFAULT '0', `probationCompletion` varchar(100) NOT NULL DEFAULT '0', `addInWhatsappGroup` varchar(100) NOT NULL DEFAULT '0', `verifyOriginals` varchar(100) NOT NULL DEFAULT '0', `returnDocsToEmp` varchar(100) NOT NULL DEFAULT '0', `EmpAddressInGMap` varchar(100) NOT NULL DEFAULT '0', `WordpressAccount` varchar(100) NOT NULL DEFAULT '0', `OCLsheet` varchar(100) NOT NULL DEFAULT '0', `salaryReview` varchar(100) NOT NULL DEFAULT '0', `checklistStatus` varchar(100) NOT NULL DEFAULT '0' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `checklist` -- INSERT INTO `checklist` (`serialNo`, `EmployeeID`, `name`, `hpcs_email_ID`, `prepare_laptop`, `email_social`, `email_instructions`, `email_mlq4`, `email_teamsID`, `email_joiningProcess`, `GoogleDriveAccount`, `FillDetailsSheet`, `collectDocs`, `initialVerification`, `handOriginals`, `giveLaptop`, `giveNotebookPen`, `greetingCard`, `trainingSchedule`, `welcomeMeeting`, `welcomeEmail`, `skypeID`, `pingID`, `addInSkypeGroup`, `giveJoiningDocs`, `signOnDocs`, `performaSheet`, `verifyPersonalContact`, `createEmpFile`, `placeSignedDocs`, `addBankKotak`, `attendanceSheet`, `fillEmpDetailSheet`, `fillEmpSalarySheet`, `addBirthday`, `addMarriage`, `addOneYearCompletion`, `addOnePointFiveYear`, `probationCompletion`, `addInWhatsappGroup`, `verifyOriginals`, `returnDocsToEmp`, `EmpAddressInGMap`, `WordpressAccount`, `OCLsheet`, `salaryReview`, `checklistStatus`) VALUES (1, 'abc', 'abcd', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1'), (2, 'emp2', 'newemp', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1'), (21, 'HPCS17000', '', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'), (6, 'HPCS17003', 'asd', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'), (7, 'HPCS17004', 'abcabcabc', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'), (8, 'HPCS17005', '', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'), (14, 'HPCS17006', '', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'), (15, 'HPCS17007', '', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'), (16, 'HPCS17008', '', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'), (17, 'HPCS17009', '', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'), (19, 'HPCS17010', '', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'), (20, 'HPCS17011', '', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'), (5, 'HPCS17012', 'Yash', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'), (22, 'HPCS17013', '', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'), (4, 'HPCS17016', '', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'); -- -------------------------------------------------------- -- -- Table structure for table `employees` -- CREATE TABLE `employees` ( `serialNo` int(100) NOT NULL, `imgPath` varchar(500) NOT NULL, `name` varchar(500) NOT NULL, `modeOfEmployment` varchar(500) NOT NULL, `Post` varchar(100) NOT NULL, `EmployeeID` varchar(500) NOT NULL, `DOJ` date NOT NULL, `confirmDate` date NOT NULL, `DOR` date NOT NULL, `trainingStartDate` date NOT NULL, `trainingCompletionDate` date NOT NULL, `certiDOB` date NOT NULL, `actualDOB` date NOT NULL, `fatherName` varchar(500) NOT NULL, `pContactNo` int(100) NOT NULL, `eContactNo` bigint(100) NOT NULL, `presentAddr` varchar(500) NOT NULL, `presentAddrCity` varchar(100) NOT NULL, `presentAddrCountry` varchar(100) NOT NULL, `permanentAddr` varchar(500) NOT NULL, `permaAddrCity` varchar(100) NOT NULL, `permaAddrCountry` varchar(100) NOT NULL, `pEmailID` varchar(123) NOT NULL, `oEmailID` varchar(100) NOT NULL, `skypeID` varchar(500) NOT NULL, `blood` varchar(100) NOT NULL, `aadhar` int(100) NOT NULL, `PAN` varchar(500) NOT NULL, `voterID` varchar(500) NOT NULL, `passport` varchar(500) NOT NULL, `spouseContact` varchar(500) NOT NULL, `BankAccountNum` bigint(250) NOT NULL, `accountType` varchar(110) NOT NULL, `IFSC` varchar(100) NOT NULL, `bankName` varchar(100) NOT NULL, `bankAddress` varchar(200) NOT NULL, `10th` int(11) NOT NULL, `12th` int(11) NOT NULL, `degName` varchar(110) NOT NULL, `degMarks` int(123) NOT NULL, `passYear` int(11) NOT NULL, `Salary` int(100) NOT NULL, `offPass` varchar(100) NOT NULL, `skypePass` varchar(100) NOT NULL, `HPC_Uni_Pass` varchar(100) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `employees` -- INSERT INTO `employees` (`serialNo`, `imgPath`, `name`, `modeOfEmployment`, `Post`, `EmployeeID`, `DOJ`, `confirmDate`, `DOR`, `trainingStartDate`, `trainingCompletionDate`, `certiDOB`, `actualDOB`, `fatherName`, `pContactNo`, `eContactNo`, `presentAddr`, `presentAddrCity`, `presentAddrCountry`, `permanentAddr`, `permaAddrCity`, `permaAddrCountry`, `pEmailID`, `oEmailID`, `skypeID`, `blood`, `aadhar`, `PAN`, `voterID`, `passport`, `spouseContact`, `BankAccountNum`, `accountType`, `IFSC`, `bankName`, `bankAddress`, `10th`, `12th`, `degName`, `degMarks`, `passYear`, `Salary`, `offPass`, `skypePass`, `HPC_Uni_Pass`) VALUES (404, '../uploads/', '', '-', 'Software Engineer', 'HPCS17000', '2017-12-30', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '', 0, 0, '', '', '', '', '', '', '', '<EMAIL>', 'kjfd', 'O-', 0, '', '', '', '', 0, 'Savings', '', '', '', 0, 0, '', 0, 0, 0, 'kjnd', 'kjnfd', 'xjz20aEp7t'), (395, '../uploads/', '', '-', 'Software Engineer', 'HPCS17001', '2016-11-30', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '', 0, 0, '', '', '', '', '', '', '', '<EMAIL>', 'kjnsd', 'O-', 0, '', '', '', '', 0, 'Savings', '', '', '', 0, 0, '', 0, 0, 0, 'jknsdkj@dkj.', 'kjnd', 'EoVttZQ738'), (358, '../uploads/', 'abcabcabc', '-', 'Software Engineer', 'HPCS17002', '2017-12-31', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '', 0, 0, '', '', '', '', '', '', '', '<EMAIL>', '89u2e', 'O-', 0, '', '', '', '', 0, 'Savings', '', '', '', 0, 0, '', 0, 0, 0, 'laskdn', 'ladsj', 'BuvGboLuBK'), (384, '../uploads/', '', '-', 'Software Engineer', 'HPCS17003', '2017-12-31', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '', 0, 0, '', '', '', '', '', '', '', '<EMAIL>', 'ajn', 'O-', 0, '', '', '', '', 0, 'Savings', '', '', '', 0, 0, '', 0, 0, 0, 'kjdakjsd', 'kjsd', 'vTt66Xig6X'), (385, '../uploads/', '', '-', 'Software Engineer', 'HPCS17004', '2017-12-31', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '', 0, 0, '', '', '', '', '', '', '', '<EMAIL>', 'sdkj', 'O-', 0, '', '', '', '', 0, 'Savings', '', '', '', 0, 0, '', 0, 0, 0, 'kjasdnj', 'kjsd', 'o0C5Bke4gF'), (388, '../uploads/', '', '-', 'Software Engineer', 'HPCS17005', '2017-12-31', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '', 0, 0, '', '', '', '', '', '', '', '<EMAIL>', 'lkjdoiq', 'O-', 0, '', '', '', '', 0, 'Savings', '', '', '', 0, 0, '', 0, 0, 0, 'kjfd', 'wd', 'a7PjFodd8U'), (390, '../uploads/', '', '-', 'Software Engineer', 'HPCS17006', '2017-12-31', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '', 0, 0, '', '', '', '', '', '', '', '<EMAIL>', 'iq', 'O-', 0, '', '', '', '', 0, 'Savings', '', '', '', 0, 0, '', 0, 0, 0, 'idbui', 'iiuhhhiw', 'w22b9xEW6z'), (392, '../uploads/', '', '-', 'Software Engineer', 'HPCS17007', '2017-12-31', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '', 0, 0, '', '', '', '', '', '', '', '<EMAIL>', 'kjnd', 'O-', 0, '', '', '', '', 0, 'Savings', '', '', '', 0, 0, '', 0, 0, 0, 'jkd', 'adkjsa', 'BYKM3FhFqD'), (394, '../uploads/', '', '-', 'Software Engineer', 'HPCS17008', '2017-12-31', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '', 0, 0, '', '', '', '', '', '', '', '<EMAIL>', 'dkj', 'O-', 0, '', '', '', '', 0, 'Savings', '', '', '', 0, 0, '', 0, 0, 0, 'kdj', 'kjds', 'I6wGXAI1cz'), (398, '../uploads/', '', '-', 'Software Engineer', 'HPCS17009', '2017-12-31', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '', 0, 0, '', '', '', '', '', '', '', '<EMAIL>', 'kjnd', 'O-', 0, '', '', '', '', 0, 'Savings', '', '', '', 0, 0, '', 0, 0, 0, 'knd', 'kjnd', 'p8mFF9Zntg'), (400, '../uploads/', '', '-', 'Software Engineer', 'HPCS17010', '2017-12-31', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '', 0, 0, '', '', '', '', '', '', '', '<EMAIL>', 'sdkjn', 'O-', 0, '', '', '', '', 0, 'Savings', '', '', '', 0, 0, '', 0, 0, 0, 'kjndkjn', 'kasjnd', 'YBcL1gilQR'), (402, '../uploads/', '', '-', 'Software Engineer', 'HPCS17011', '2017-12-31', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '', 0, 0, '', '', '', '', '', '', '', '<EMAIL>', 'kjn', 'O-', 0, '', '', '', '', 0, 'Savings', '', '', '', 0, 0, '', 0, 0, 0, 'jknd', 'dkajsad', 'cLDaP53s4j'), (356, '../uploads/chuck.jpg', 'Yashh', 'Full Time', 'Software Engineer', 'HPCS17012', '2017-04-10', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '', 0, 0, '', '', '', '', '', '', '', '<EMAIL>asd', '3wkm21', 'O-', 0, '', '', '', '', 0, 'Savings', '', '', '', 0, 0, '', 0, 0, 2147483647, 'asdlklm', '23eklm', 'LzP695qJ3B'), (405, '../uploads/', '', '-', 'Software Engineer', 'HPCS17013', '2017-12-31', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '', 0, 0, '', '', '', '', '', '', '', '<EMAIL>', 'kjnd', 'O-', 0, '', '', '', '', 0, 'Savings', '', '', '', 0, 0, '', 0, 0, 0, 'kjnd', 'kjd', 'scm18QU9J2'); -- -------------------------------------------------------- -- -- Table structure for table `login` -- CREATE TABLE `login` ( `loginId` varchar(500) NOT NULL, `loginPassword` varchar(500) NOT NULL, `Name` varchar(200) NOT NULL, `EmpId` varchar(200) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `login` -- INSERT INTO `login` (`loginId`, `loginPassword`, `Name`, `EmpId`) VALUES ('<EMAIL>', 'yash1234', 'Yash', ''); -- -- Indexes for dumped tables -- -- -- Indexes for table `checklist` -- ALTER TABLE `checklist` ADD PRIMARY KEY (`EmployeeID`), ADD KEY `serialNo` (`serialNo`); -- -- Indexes for table `employees` -- ALTER TABLE `employees` ADD PRIMARY KEY (`EmployeeID`), ADD KEY `index` (`serialNo`); -- -- Indexes for table `login` -- ALTER TABLE `login` ADD PRIMARY KEY (`loginId`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `checklist` -- ALTER TABLE `checklist` MODIFY `serialNo` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23; -- -- AUTO_INCREMENT for table `employees` -- ALTER TABLE `employees` MODIFY `serialNo` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=407; DELIMITER $$ -- -- Events -- CREATE DEFINER=`root`@`localhost` EVENT `StatusUpdate` ON SCHEDULE EVERY 5 SECOND STARTS '2017-06-22 00:00:00' ENDS '2020-07-23 00:00:00' ON COMPLETION PRESERVE ENABLE DO UPDATE checklist SET `checklistStatus` = 1 where `hpcs_email_ID`= 1 and `prepare_laptop`= 1 and `email_social`=1 and `email_instructions`=1 and `email_mlq4`=1 and `email_teamsID`=1 and `email_joiningProcess`=1 and `GoogleDriveAccount`=1 and `FillDetailsSheet`=1 and `collectDocs`=1 and `initialVerification`=1 and `handOriginals`=1 and `giveLaptop`=1 and `giveNotebookPen`=1 and `greetingCard`=1 and `trainingSchedule`=1 and `welcomeMeeting`=1 and `welcomeEmail`=1 and `skypeID`=1 and `pingID`=1 and `addInSkypeGroup`=1 and `giveJoiningDocs`=1 and `signOnDocs`=1 and `performaSheet`=1 and `verifyPersonalContact`=1 and `createEmpFile`=1 and `placeSignedDocs`=1 and `addBankKotak`=1 and `attendanceSheet`=1 and `fillEmpDetailSheet`=1 and `fillEmpSalarySheet`=1 and `addBirthday`=1 and `addMarriage`=1 and `addOneYearCompletion`=1 and `addOnePointFiveYear`=1 and `probationCompletion`=1 and `addInWhatsappGroup`=1 and `verifyOriginals`=1 and `returnDocsToEmp`=1 and `EmpAddressInGMap`=1 and `WordpressAccount`=1 and `OCLsheet`=1 and `salaryReview`=1$$ DELIMITER ; /*!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 */;
<reponame>jaydeesimon/vetd-app DROP TABLE IF EXISTS vetd.form_template_prompt; --;; CREATE TABLE vetd.form_template_prompt (id bigint NOT NULL, idstr text, created timestamp with time zone, updated timestamp with time zone, deleted timestamp with time zone, form_template_id bigint, prompt_id bigint, sort integer) --;; ALTER TABLE vetd.form_template_prompt OWNER TO vetd --;; GRANT SELECT ON TABLE vetd.form_template_prompt TO hasura;
<reponame>jdkoren/sqlite-parser -- lock.test -- -- execsql { DELETE FROM t4 } DELETE FROM t4
/* vNEXT: Implement params-list/output on @Action = N'TEST' - as down in the body of the sproc */ USE [admindb]; GO IF OBJECT_ID('dbo.create_sync_check_jobs','P') IS NOT NULL DROP PROC dbo.[create_sync_check_jobs]; GO CREATE PROC dbo.[create_sync_check_jobs] @Action sysname = N'TEST', -- 'TEST | CREATE' are the 2x options - i.e., test/output what we'd see... or ... create the jobs. @ServerAndJobsSyncCheckJobRunsEvery sysname = N'20 minutes', @DataSyncCheckJobRunsEvery sysname = N'20 minutes', @IgnoreSynchronizedDatabaseOwnership bit = 0, @IgnoredMasterDbObjects nvarchar(MAX) = NULL, @IgnoredLogins nvarchar(MAX) = NULL, @IgnoredAlerts nvarchar(MAX) = NULL, @IgnoredLinkedServers nvarchar(MAX) = NULL, @IgnorePrincipalNames bit = 1, @IgnoredJobs nvarchar(MAX) = NULL, @IgnoredDatabases nvarchar(MAX) = NULL, @RPOThreshold sysname = N'10 seconds', @RTOThreshold sysname = N'40 seconds', @AGSyncCheckIterationCount int = 8, @AGSyncCheckDelayBetweenChecks sysname = N'1800 milliseconds', @ExcludeAnomolousSyncDeviations bit = 0, -- Primarily for Ghosted Records Cleanup... @JobsNamePrefix sysname = N'Synchronization - ', @JobsCategoryName sysname = N'SynchronizationChecks', @JobOperatorToAlertOnErrors sysname = N'Alerts', @ProfileToUseForAlerts sysname = N'General', @OverWriteExistingJobs bit = 0 AS SET NOCOUNT ON; -- {copyright} -- TODO: validate inputs... DECLARE @serverAndJobsStart time = '00:01:00'; DECLARE @dataStart time = '00:02:00'; IF NULLIF(@Action, N'') IS NULL SET @Action = N'TEST'; IF UPPER(@Action) NOT IN (N'TEST', N'CREATE') BEGIN RAISERROR('Invalid option specified for parameter @Action. Valid options are ''TEST'' (test/show sync-check outputs without creating a job) and ''CREATE'' (create sync-check jobs).', 16, 1); RETURN -1; END; -- vNEXT: MAYBE look at extending the types of intervals allowed? -- Verify minutes-only sync-check intervals. IF @ServerAndJobsSyncCheckJobRunsEvery IS NULL BEGIN RAISERROR('Parameter @ServerAndJobsSyncCheckJobRunsEvery cannot be left empty - and specifies how frequently (in minutes) the server/job sync-check job runs - e.g., N''20 minutes''.', 16, 1); RETURN -2; END ELSE BEGIN IF @ServerAndJobsSyncCheckJobRunsEvery NOT LIKE '%minute%' BEGIN RAISERROR('@ServerAndJobsSyncCheckJobRunsEvery can only specify values defined in minutes - e.g., N''5 minutes'', or N''10 minutes'', etc.', 16, 1); RETURN -3; END; END; IF @DataSyncCheckJobRunsEvery IS NULL BEGIN RAISERROR('Parameter @DataSyncCheckJobRunsEvery cannot be left empty - and specifies how frequently (in minutes) the data sync-check job runs - e.g., N''20 minutes''.', 16, 1); RETURN -4; END ELSE BEGIN IF @DataSyncCheckJobRunsEvery NOT LIKE '%minute%' BEGIN RAISERROR('@DataSyncCheckJobRunsEvery can only specify values defined in minutes - e.g., N''5 minutes'', or N''10 minutes'', etc.', 16, 1); RETURN -5; END; END; --vNEXT: --IF UPPER(@Action) = N'TEST' BEGIN -- PRINT 'TODO: Output all parameters - to make config easier... '; -- -- SEE https://overachieverllc.atlassian.net/browse/S4-304 for more details. Otherwise, effecively: SELECT [name] FROM sys.parameters WHERE object_id = @@PROCID; --END; DECLARE @crlfTab nchar(3) = NCHAR(13) + NCHAR(10) + NCHAR(9); DECLARE @serverSyncTemplate nvarchar(MAX) = N'EXEC admindb.dbo.[verify_server_synchronization] @IgnoreSynchronizedDatabaseOwnership = {ingoreOwnership}, @IgnoredMasterDbObjects = {ignoredMasterObjects}, @IgnoredLogins = {ignoredLogins}, @IgnoredAlerts = {ignoredAlerts}, @IgnoredLinkedServers = {ignoredLinkedServers}, @IgnorePrincipalNames = {ignorePrincipals},{operator}{profile} @PrintOnly = {printOnly}; '; DECLARE @jobsSyncTemplate nvarchar(MAX) = N'EXEC admindb.dbo.[verify_job_synchronization] @IgnoredJobs = {ignoredJobs},{operator}{profile} @PrintOnly = {printOnly}; '; DECLARE @dataSyncTemplate nvarchar(MAX) = N'EXEC admindb.dbo.[verify_data_synchronization] @IgnoredDatabases = {ignoredDatabases},{rpo}{rto}{checkCount}{checkDelay}{excludeAnomalies}{operator}{profile} @PrintOnly = {printOnly}; '; ----------------------------------------------------------------------------- -- Process Server Sync Checks: DECLARE @serverBody nvarchar(MAX) = @serverSyncTemplate; IF @IgnoreSynchronizedDatabaseOwnership = 1 SET @serverBody = REPLACE(@serverBody, N'{ingoreOwnership}', N'1'); ELSE SET @serverBody = REPLACE(@serverBody, N'{ingoreOwnership}', N'0'); IF NULLIF(@IgnoredMasterDbObjects, N'') IS NULL SET @serverBody = REPLACE(@serverBody, N'{ignoredMasterObjects}', N'NULL'); ELSE SET @serverBody = REPLACE(@serverBody, N'{ignoredMasterObjects}', N'N''' + @IgnoredMasterDbObjects + N''''); IF NULLIF(@IgnoredLogins, N'') IS NULL SET @serverBody = REPLACE(@serverBody, N'{ignoredLogins}', N'NULL'); ELSE SET @serverBody = REPLACE(@serverBody, N'{ignoredLogins}', N'N''' + @IgnoredLogins + N''''); IF NULLIF(@IgnoredAlerts, N'') IS NULL SET @serverBody = REPLACE(@serverBody, N'{ignoredAlerts}', N'NULL'); ELSE SET @serverBody = REPLACE(@serverBody, N'{ignoredAlerts}', N'N''' + @IgnoredAlerts + N''''); IF NULLIF(@IgnoredLinkedServers, N'') IS NULL SET @serverBody = REPLACE(@serverBody, N'{ignoredLinkedServers}', N'NULL'); ELSE SET @serverBody = REPLACE(@serverBody, N'{ignoredLinkedServers}', N'N''' + @IgnoredLinkedServers + N''''); IF @IgnorePrincipalNames = 1 SET @serverBody = REPLACE(@serverBody, N'{ignorePrincipals}', N'1'); ELSE SET @serverBody = REPLACE(@serverBody, N'{ignorePrincipals}', N'0'); IF UPPER(@Action) = N'TEST' SET @serverBody = REPLACE(@serverBody, N'{printOnly}', N'1'); ELSE SET @serverBody = REPLACE(@serverBody, N'{printOnly}', N'0'); IF NULLIF(@JobOperatorToAlertOnErrors, N'') IS NULL SET @serverBody = REPLACE(@serverBody, N'{operator}', N''); ELSE SET @serverBody = REPLACE(@serverBody, N'{operator}', @crlfTab + N'@OperatorName = N''' + @JobOperatorToAlertOnErrors + N''', '); IF NULLIF(@ProfileToUseForAlerts, N'') IS NULL SET @serverBody = REPLACE(@serverBody, N'{profile}', N''); ELSE SET @serverBody = REPLACE(@serverBody, N'{profile}', @crlfTab + N'@MailProfileName = N''' + @ProfileToUseForAlerts + N''', '); ----------------------------------------------------------------------------- -- Process Job Sync Checks DECLARE @jobsBody nvarchar(MAX) = @jobsSyncTemplate; IF NULLIF(@IgnoredJobs, N'') IS NULL SET @jobsBody = REPLACE(@jobsBody, N'{ignoredJobs}', N'NULL'); ELSE SET @jobsBody = REPLACE(@jobsBody, N'{ignoredJobs}', N'''' + @IgnoredJobs + N''''); IF UPPER(@Action) = N'TEST' SET @jobsBody = REPLACE(@jobsBody, N'{printOnly}', N'1'); ELSE SET @jobsBody = REPLACE(@jobsBody, N'{printOnly}', N'0'); IF NULLIF(@JobOperatorToAlertOnErrors, N'') IS NULL SET @jobsBody = REPLACE(@jobsBody, N'{operator}', N''); ELSE SET @jobsBody = REPLACE(@jobsBody, N'{operator}', @crlfTab + N'@OperatorName = N''' + @JobOperatorToAlertOnErrors + N''', '); IF NULLIF(@ProfileToUseForAlerts, N'') IS NULL SET @jobsBody = REPLACE(@jobsBody, N'{profile}', N''); ELSE SET @jobsBody = REPLACE(@jobsBody, N'{profile}', @crlfTab + N'@MailProfileName = N''' + @ProfileToUseForAlerts + N''', '); ----------------------------------------------------------------------------- -- Process Data Sync Checks DECLARE @dataBody nvarchar(MAX) = @dataSyncTemplate; IF NULLIF(@IgnoredDatabases, N'') IS NULL SET @dataBody = REPLACE(@dataBody, N'{ignoredDatabases}', N'NULL'); ELSE SET @dataBody = REPLACE(@dataBody, N'{ignoredDatabases}', N'N''' + @IgnoredDatabases + N''''); IF NULLIF(@RPOThreshold, N'') IS NULL SET @dataBody = REPLACE(@dataBody, N'{rpo}', N''); ELSE SET @dataBody = REPLACE(@dataBody, N'{rpo}', @crlfTab + N'@RPOThreshold = N''' + @RPOThreshold + N''','); IF NULLIF(@RTOThreshold, N'') IS NULL SET @dataBody = REPLACE(@dataBody, N'{rto}', N''); ELSE SET @dataBody = REPLACE(@dataBody, N'{rto}', @crlfTab + N'@RTOThreshold = N''' + @RTOThreshold + N''','); IF @AGSyncCheckIterationCount IS NULL SET @dataBody = REPLACE(@dataBody, N'{checkCount}', N''); ELSE SET @dataBody = REPLACE(@dataBody, N'{checkCount}', @crlfTab + N'@AGSyncCheckIterationCount = ' + CAST(@AGSyncCheckIterationCount AS sysname) + N','); IF NULLIF(@AGSyncCheckDelayBetweenChecks, N'') IS NULL SET @dataBody = REPLACE(@dataBody, N'{checkDelay}', N''); ELSE SET @dataBody = REPLACE(@dataBody, N'{checkDelay}', @crlfTab + N'@AGSyncCheckDelayBetweenChecks = N''' + @AGSyncCheckDelayBetweenChecks + N''','); IF @ExcludeAnomolousSyncDeviations IS NULL SET @dataBody = REPLACE(@dataBody, N'{excludeAnomalies}', N''); ELSE SET @dataBody = REPLACE(@dataBody, N'{excludeAnomalies}', @crlfTab + N'@ExcludeAnomolousSyncDeviations = ' + CAST(@ExcludeAnomolousSyncDeviations AS sysname) + N','); IF UPPER(@Action) = N'TEST' SET @dataBody = REPLACE(@dataBody, N'{printOnly}', N'1'); ELSE SET @dataBody = REPLACE(@dataBody, N'{printOnly}', N'0'); IF NULLIF(@JobOperatorToAlertOnErrors, N'') IS NULL SET @dataBody = REPLACE(@dataBody, N'{operator}', N''); ELSE SET @dataBody = REPLACE(@dataBody, N'{operator}', @crlfTab + N'@OperatorName = N''' + @JobOperatorToAlertOnErrors + N''', '); IF NULLIF(@ProfileToUseForAlerts, N'') IS NULL SET @dataBody = REPLACE(@dataBody, N'{profile}', N''); ELSE SET @dataBody = REPLACE(@dataBody, N'{profile}', @crlfTab + N'@MailProfileName = N''' + @ProfileToUseForAlerts + N''', '); DECLARE @crlf nchar(2) = NCHAR(13) + NCHAR(10); IF UPPER(@Action) = N'TEST' BEGIN PRINT N'NOTE: Operating in Test Mode. '; PRINT N' SET @Action = N''CREATE'' when ready to create actual jobs... ' + @crlf + @crlf; PRINT N'EXECUTING synchronization-check calls as follows: ' + @crlf + @crlf; PRINT @serverBody + @crlf + @crlf; PRINT @jobsBody + @crlf + @crlf; PRINT @dataBody + @crlf + @crlf; PRINT N'OUTPUT FROM EXECUTION of the above operations FOLLOWS:'; PRINT N'--------------------------------------------------------------------------------------------------------'; EXEC sp_executesql @serverBody; EXEC sp_executesql @jobsBody; EXEC sp_executesql @dataBody; PRINT N'--------------------------------------------------------------------------------------------------------'; RETURN 0; END; ----------------------------------------------------------------------------- -- Create the Server and Jobs Sync-Check Job: DECLARE @jobID uniqueidentifier; DECLARE @currentJobName sysname = @JobsNamePrefix + N'Verify Server and Jobs'; EXEC dbo.[create_agent_job] @TargetJobName = @currentJobName, @JobCategoryName = @JobsCategoryName, @JobEnabled = 0, -- create jobs in disabled state - so that admins have to review and manually enable... @AddBlankInitialJobStep = 0, -- not for these jobs, they should be fairly short in execution... @OperatorToAlertOnErrorss = @JobOperatorToAlertOnErrors, @OverWriteExistingJobDetails = @OverWriteExistingJobs, @JobID = @jobID OUTPUT; -- Add a schedule: DECLARE @dateAsInt int = CAST(CONVERT(sysname, GETDATE(), 112) AS int); DECLARE @startTimeAsInt int = CAST((LEFT(REPLACE(CONVERT(sysname, @serverAndJobsStart, 108), N':', N''), 6)) AS int); DECLARE @scheduleName sysname = @currentJobName + ' Schedule'; DECLARE @frequencyMinutes int; DECLARE @outcome int; DECLARE @error nvarchar(MAX); EXEC @outcome = dbo.[translate_vector] @Vector = @ServerAndJobsSyncCheckJobRunsEvery, @ValidationParameterName = N'@ServerAndJobsSyncCheckJobRunsEvery', @ProhibitedIntervals = N'MILLISECOND,SECOND,HOUR,DAY,WEEK,MONTH,YEAR', @TranslationDatePart = 'MINUTE', @Output = @frequencyMinutes OUTPUT, @Error = @error OUTPUT; IF @outcome <> 0 BEGIN RAISERROR(@error, 16, 1); RETURN @outcome; END; -- TODO: scheduling logic here isn't as robust as it is in ...dbo.enable_disk_monitoring (and... i should expand the logic in THAT sproc, and move it out to it's own sub-sproc - i.e., pass in an @JobID and other params to a sproc called something like dbo.add_agent_job_schedule EXEC msdb.dbo.sp_add_jobschedule @job_id = @jobID, @name = @scheduleName, @enabled = 1, @freq_type = 4, -- daily @freq_interval = 1, -- every 1 days @freq_subday_type = 4, -- minutes @freq_subday_interval = @frequencyMinutes, @freq_relative_interval = 0, @freq_recurrence_factor = 0, @active_start_date = @dateAsInt, @active_start_time = @startTimeAsInt; DECLARE @compoundJobStep nvarchar(MAX) = N'-- Server Synchronization Checks: ' + @serverBody + N' -- Jobs Synchronization Checks: ' + @jobsBody; EXEC msdb..sp_add_jobstep @job_id = @jobID, @step_id = 1, @step_name = N'Synchronization Checks for Server Objects and Jobs Details', @subsystem = N'TSQL', @command = @compoundJobStep, @on_success_action = 1, @on_success_step_id = 0, @on_fail_action = 2, @on_fail_step_id = 0, @database_name = N'admindb', @retry_attempts = 1, @retry_interval = 1; ----------------------------------------------------------------------------- -- Create the Data Sync-Check Job: SET @currentJobName = @JobsNamePrefix + N'Verify Data-Sync'; SET @jobID = NULL; EXEC dbo.[create_agent_job] @TargetJobName = @currentJobName, @JobCategoryName = @JobsCategoryName, @JobEnabled = 0, -- create jobs in disabled state - so that admins have to review and manually enable... @AddBlankInitialJobStep = 0, -- not for these jobs, they should be fairly short in execution... @OperatorToAlertOnErrorss = @JobOperatorToAlertOnErrors, @OverWriteExistingJobDetails = @OverWriteExistingJobs, @JobID = @jobID OUTPUT; -- Add a schedule: SET @startTimeAsInt = CAST((LEFT(REPLACE(CONVERT(sysname, @dataStart, 108), N':', N''), 6)) AS int); SET @scheduleName = @currentJobName + ' Schedule'; EXEC @outcome = dbo.[translate_vector] @Vector = @DataSyncCheckJobRunsEvery, @ValidationParameterName = N'@DataSyncCheckJobRunsEvery', @ProhibitedIntervals = N'MILLISECOND,SECOND,HOUR,DAY,WEEK,MONTH,YEAR', @TranslationDatePart = 'MINUTE', @Output = @frequencyMinutes OUTPUT, @Error = @error OUTPUT; IF @outcome <> 0 BEGIN RAISERROR(@error, 16, 1); RETURN @outcome; END; -- TODO: scheduling logic here isn't as robust as it is in ...dbo.enable_disk_monitoring (and... i should expand the logic in THAT sproc, and move it out to it's own sub-sproc - i.e., pass in an @JobID and other params to a sproc called something like dbo.add_agent_job_schedule EXEC msdb.dbo.sp_add_jobschedule @job_id = @jobID, @name = @scheduleName, @enabled = 1, @freq_type = 4, -- daily @freq_interval = 1, -- every 1 days @freq_subday_type = 4, -- minutes @freq_subday_interval = @frequencyMinutes, @freq_relative_interval = 0, @freq_recurrence_factor = 0, @active_start_date = @dateAsInt, @active_start_time = @startTimeAsInt; -- Add job Body: DECLARE @singleBody nvarchar(MAX) = N'-- Data Synchronization Checks: ' + @dataBody; EXEC msdb..sp_add_jobstep @job_id = @jobID, @step_id = 1, @step_name = N'Data Synchronization + Topology Health Checks', @subsystem = N'TSQL', @command = @singleBody, @on_success_action = 1, @on_success_step_id = 0, @on_fail_action = 2, @on_fail_step_id = 0, @database_name = N'admindb', @retry_attempts = 1, @retry_interval = 1; RETURN 0; GO
-- 2021-06-29T08:46:43.151Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET AD_Reference_ID=30,Updated=TO_TIMESTAMP('2021-06-29 11:46:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=572226 ;
<filename>backend/de.metas.acct.base/src/main/sql/postgresql/system/43-de.metas.acct/5445870_sys_FRESH_326_Org_Condition_In_Fact_Acct_EndingBalance_RebuildAll_Partition.sql<gh_stars>1000+ drop function if exists de_metas_acct.Fact_Acct_EndingBalance_RebuildAll(); create or replace function de_metas_acct.Fact_Acct_EndingBalance_RebuildAll() returns text AS $BODY$ declare v_CountInserted integer; begin truncate table Fact_Acct_EndingBalance; INSERT INTO Fact_Acct_EndingBalance ( fact_acct_id , AmtAcctDr_DTD, AmtAcctCr_DTD , C_AcctSchema_ID, Account_ID, PostingType, DateAcct , ad_client_id, ad_org_id, created, createdby, isactive, updated, updatedby ) select fa.fact_acct_id , sum(AmtAcctDr) over facts_previous as AmtAcctDr_DTD , sum(AmtAcctCr) over facts_previous as AmtAcctCr_DTD , fa.C_AcctSchema_ID, fa.Account_ID, fa.PostingType, fa.DateAcct , fa.ad_client_id, fa.ad_org_id, fa.created, fa.createdby, fa.isactive, fa.updated, fa.updatedby from Fact_Acct fa window facts_previous as (partition by fa.AD_Client_ID, fa.AD_Org_ID, fa.C_AcctSchema_ID, fa.PostingType, fa.Account_ID, fa.DateAcct order by Fact_Acct_ID) ; GET DIAGNOSTICS v_CountInserted = ROW_COUNT; return ''||v_CountInserted||' rows inserted into Fact_Acct_EndingBalance'; end; $BODY$ LANGUAGE plpgsql; COMMENT ON FUNCTION de_metas_acct.Fact_Acct_EndingBalance_RebuildAll() IS 'Rebuilds Fact_Acct_EndingBalance.';
<filename>back/snake_chatuser.sql SET FOREIGN_KEY_CHECKS=0; DROP TABLE IF EXISTS `snake_chatuser`; CREATE TABLE `snake_chatuser` ( `id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(155) DEFAULT NULL, `pwd` varchar(155) DEFAULT NULL COMMENT '密码', `groupid` int(5) DEFAULT NULL COMMENT '所属的分组id', `status` varchar(55) DEFAULT NULL, `sign` varchar(255) DEFAULT NULL, `avatar` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=15 DEFAULT CHARSET=utf8; insert into `snake_chatuser`(`id`,`username`,`pwd`,`groupid`,`status`,`sign`,`avatar`) values('1','纸飞机','<PASSWORD>','2','outline','在深邃的编码世界,做一枚轻盈的纸飞机','http://cdn.firstlinkapp.com/upload/2016_6/1465575923433_33812.jpg'); insert into `snake_chatuser`(`id`,`username`,`pwd`,`groupid`,`status`,`sign`,`avatar`) values('2','马云','21232f297a57a5a743894a0e4a801fc3','2','outline','让天下没有难写的代码','http://tp4.sinaimg.cn/2145291155/180/5601307179/1'); insert into `snake_chatuser`(`id`,`username`,`pwd`,`groupid`,`status`,`sign`,`avatar`) values('3','罗玉凤','<PASSWORD>','3','online','在自己实力不济的时候,不要去相信什么媒体和记者。他们不是善良的人,有时候候他们的采访对当事人而言就是陷阱','http://tp1.sinaimg.cn/1241679004/180/5743814375/0'); insert into `snake_chatuser`(`id`,`username`,`pwd`,`groupid`,`status`,`sign`,`avatar`) values('13','前端大神','<PASSWORD>','1','outline','前端就是这么牛','http://tp1.sinaimg.cn/1241679004/180/5743814375/0');
<reponame>ptrick/hdfs-hive-sql-playground version https://git-lfs.github.com/spec/v1 oid sha256:a43a2a17a71856739693e07eae8cbef898154d670e04aa0815f2001e67108cf9 size 33251
<gh_stars>0 SELECT DISTINCT City FROM Station WHERE City LIKE '%[aeiou]';
<reponame>kainsk/kratos<filename>persistence/sql/migrations/sql/20220118104539000003_identity_fk_indexes.postgres.down.sql DROP INDEX "identity_credentials_nid_identity_id_idx";
CREATE DATABASE ACS; GO USE ACS; CREATE TABLE ACCOUNT( id int NOT NULL IDENTITY(1,1), name varchar(18) NOT NULL, pwd varchar(18) NOT NULL, PRIMARY KEY(id) ); CREATE TABLE PRIVILEGE( id int NOT NULL IDENTITY(1,1), name varchar(50) NOT NULL UNIQUE,/*[Class-Name]:[Class-Method], in fact they are all the methods of the business classes */ PRIMARY KEY(id) ); CREATE TABLE ROLE( id int NOT NULL IDENTITY(1,1), name varchar(18) NOT NULL UNIQUE, PRIMARY KEY(id) ); GO INSERT INTO ROLE(name) VALUES ('root'); CREATE TABLE ROLE_ROLE( id int NOT NULL IDENTITY(1,1), child_id int NOT NULL, parent_id int NOT NULL DEFAULT 1, PRIMARY KEY(id), FOREIGN KEY(child_id) REFERENCES ROLE(id) ON DELETE CASCADE, /* If you create some roles and build the parent-clild relationship, do not rebuild the relationship, otherwise it may cause an infinite loop. */ FOREIGN KEY(parent_id) REFERENCES ROLE(id) ON DELETE CASCADE ); CREATE TABLE ROLE_PRIVILEGE( id int NOT NULL IDENTITY(1,1), role_id int NOT NULL, privilege_id int NOT NULL, PRIMARY KEY(id), FOREIGN KEY (role_id) REFERENCES ROLE(id) ON DELETE CASCADE, FOREIGN KEY (privilege_id) REFERENCES PRIVILEGE(id) ON DELETE CASCADE/* Generately when the system is done privileges(functionalities) should be fixed(without adding or removing), so there is no restrictions: delete cascade. */ ); CREATE TABLE ACCOUNT_ROLE( id int NOT NULL IDENTITY(1,1), account_id int NOT NULL, role_id int NOT NULL, PRIMARY KEY(id), FOREIGN KEY (account_id) REFERENCES ACCOUNT(id) ON DELETE CASCADE, FOREIGN KEY (role_id) REFERENCES ROLE(id) ON DELETE CASCADE );
ALTER TABLE sec.organization ALTER COLUMN code TYPE text; ALTER TABLE sec.organization ALTER COLUMN short_name TYPE text; ALTER TABLE sec.organization ALTER COLUMN full_name TYPE text; ALTER TABLE sec.organization ALTER COLUMN legal_address TYPE text; ALTER TABLE sec.organization ALTER COLUMN email TYPE text;
IF OBJECT_ID('tSQLt.Private_CreateInstallationInfo') IS NOT NULL DROP PROCEDURE tSQLt.Private_CreateInstallationInfo; GO ---Build+ GO CREATE PROCEDURE tSQLt.Private_CreateInstallationInfo -- Created as a stored procedure to make it testable. AS BEGIN DECLARE @cmd NVARCHAR(MAX); SELECT @cmd = 'ALTER FUNCTION tSQLt.Private_InstallationInfo() RETURNS TABLE AS RETURN SELECT CAST('+ CAST(I.SqlVersion AS NVARCHAR(MAX))+ ' AS NUMERIC(10,2)) AS SqlVersion;' FROM tSQLt.Info() AS I; EXEC(@cmd); END; GO EXEC tSQLt.Private_CreateInstallationInfo; GO ---Build- GO