text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
-- ---------------------------- -- Table structure for Base_Company -- ---------------------------- IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[Base_Company]') AND type IN ('U')) DROP TABLE [dbo].[Base_Company] GO CREATE TABLE [dbo].[Base_Company] ( [ID] nvarchar(36) COLLATE Chines...
the_stack
CREATE TABLE `tags` ( `id` BIGINT(20) NOT NULL AUTO_INCREMENT, `created` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), `updated` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), `entity_version` INT(11) NOT NULL DEFAULT '0', `tag` VARCHAR(25...
the_stack
--insert relationship_to_concept_manual into r_t_c which contains mappings of relationship_to_concept_to_map table created in a first part --insert all manual work into r_t_c insert into relationship_to_concept ( concept_code_1, vocabulary_id_1, concept_id_2, precedence, conversion_factor ) select dcs.concept_code, dc...
the_stack
SET SESSION FOREIGN_KEY_CHECKS=0; /* Create Tables */ -- 文章表 CREATE TABLE ${_prefix}cms_article ( id varchar(64) NOT NULL COMMENT '编号', category_code varchar(64) NOT NULL COMMENT '栏目编码', module_type varchar(50) COMMENT '模块类型', title varchar(255) NOT NULL COMMENT '内容标题', href varchar(1000) COMMENT '外...
the_stack
-- Definitions of Rucio database scheduler jobs -- Authors: Rucio team and Gancho Dimitrov /* Note: the Rucio jobs have to run on the Rucio services defined on the DB cluster (in order to take advantage of the already cached data/index blocks on the relevant DB nodes). RUCIO_JOB_CLASS and RUCIO_JOB_CLASS_2 have to b...
the_stack
\set ON_ERROR_STOP 1 BEGIN; SET LOCAL statement_timeout TO '15min'; -- I) Artists \echo MBS-10921 (1/12): Unlist “Add relationship” edits from artists’ history... DELETE FROM edit_artist WHERE (edit, artist) IN ( SELECT ea.edit, ea.artist FROM edit_artist ea JOIN edit e ON ea.edit = e.id JOIN edit_da...
the_stack
-- 2019-03-02T14:35:46.475 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Window SET InternalName='DataEntry_Field ',Updated=TO_TIMESTAMP('2019-03-02 14:35:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Window_ID=540572 ; -- 2019-03-02T14:37:44.501 -- I forgot to set the DICTIONARY_ID...
the_stack
----------------------------------------------------------------------- -- Dangerous Function CREATE PROCEDURE dangerous_function IS BEGIN DBMS_UTILITY.EXEC_DDL_STATEMENT@remote_db('create table t1 (id number)'); END; ----------------------------------------------------------------------- -- SQL Bad Practices: Un...
the_stack
DROP FUNCTION IF EXISTS de_metas_endcustomer_fresh_reports.Docs_Sales_Custom_Invoice_Root ( IN Record_ID numeric, IN AD_Language Character Varying (6) ); CREATE OR REPLACE FUNCTION de_metas_endcustomer_fresh_reports.Docs_Sales_Custom_Invoice_Root ( IN Record_ID numeric, IN AD_Language Character Varying (6) ) RETURNS TA...
the_stack
\set ON_ERROR_STOP 1 BEGIN; -- Tables CREATE TABLE artist_release ( is_track_artist BOOLEAN NOT NULL, artist INTEGER NOT NULL, first_release_date INTEGER, catalog_numbers TEXT[], country_code ...
the_stack
SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for order_detail -- ---------------------------- DROP TABLE IF EXISTS `order_detail`; CREATE TABLE `order_detail` ( `detail_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `order_id` varchar(32) ...
the_stack
 -- 2017-09-26T15:53:16.322 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Process_ID,AllowProcessReRun,Classname,Created,CreatedBy,EntityType,IsActive,IsApplySecuritySettings,IsBetaFunctionality,IsDirectPrint,IsOneInstanceOnly,IsReport,I...
the_stack
-- 2017-04-01T15:36:40.606 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Window_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-04-01 15:36:40','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Material Receipt Candidates' WHERE AD_Window_ID=540196 AND AD_Language='en_US' ; -- 2017-04-01T1...
the_stack
-- 2017-09-11T14:26:17.286 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AllowZoomTo,ColumnName,Created,CreatedBy,DDL_NoForeignKey,DefaultValue,EntityType,FieldLength,IsActive,IsAdvancedText,IsAllowL...
the_stack
-- # -- # -- # -- # -- # -- Constraints -- # -- # -- # -- # -- # /* Add a set of constraints to the collection. * The supplied json document should be in the form {field: constraint_spec}, * for example: * {"age": {"$required": 1, * "$notnull": 1, * "$type": "number"}} * Valid constraint...
the_stack
* Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * * Software distributed under the Li...
the_stack
\set ON_ERROR_STOP 1 BEGIN; ----------------------- -- CREATE NEW TABLES -- ----------------------- CREATE TABLE series ( id SERIAL, gid UUID NOT NULL, name VARCHAR NOT NULL, comment VARCHAR(255) NOT NULL DEFAULT '', type I...
the_stack
-------------------------------------------------------------------------------- -- Synapse serverless SQL pool - Query Performance Insights -- Author: Jovan Popovic -------------------------------------------------------------------------------- SET QUOTED_IDENTIFIER OFF; -- Because I use "" as a string literal GO I...
the_stack
-- create or replace package XFILES_REST_SUPPORT as function transformCacheToHTML(P_GUID RAW,P_XSL_PATH VARCHAR2) return CLOB; procedure writeLogRecord(P_SERVLET_URL VARCHAR2, P_MODULE_NAME VARCHAR2, P_INIT_TIME TIMESTAMP WITH TIME ZONE, P_PARAMETERS XMLType); procedure writeErrorRecord(P_SERVLET_URL VARCHAR2, ...
the_stack
-- -- PostgreSQL database dump -- -- Dumped from database version 12.2 -- Dumped by pg_dump version 12.3 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', fal...
the_stack
-- 2017-05-01T13:04:06.543 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Section (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Section_ID,Created,CreatedBy,IsActive,Name,SeqNo,Updated,UpdatedBy) VALUES (0,0,242,540146,TO_TIMESTAMP('2017-05-01 13:04:06','YYYY-MM-DD HH24:MI:SS'),100,'Y','m...
the_stack
-- MKTG_ContactPerson TRL -- 2021-10-15T09:13:17.858Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET Name='Marketing Contact', PrintName='Marketing Contact',Updated=TO_TIMESTAMP('2021-10-15 11:13:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=544035 AND AD_La...
the_stack
create or replace PACKAGE BODY teplsql AS /** A TYPE used to define a request for a template */ type t_include_parameters is record ( template_name TE_TEMPLATES.NAME%TYPE , object_name varchar2(64) , object_type varchar2(64) ...
the_stack
-- Update table user_extend ALTER TABLE user_extend MODIFY `description` VARCHAR(200) COMMENT '扩展属性描述'; ALTER TABLE user_extend ADD category VARCHAR(30) COMMENT '扩展属性类型' after code; ALTER TABLE user_extend ADD subcategory VARCHAR(30) COMMENT '扩展属性子类型' after category; ALTER TABLE user_extend ADD INDEX idx_user_extend_co...
the_stack
SET DEFINE OFF; CREATE OR REPLACE PACKAGE json_util_pkg AUTHID CURRENT_USER AS /* Purpose: JSON utilities for PL/SQL see http://ora-00001.blogspot.com/ Remarks: Who Date Description ------ ---------- ------------------------------------- MBR 30.01.2010 Created JKR ...
the_stack
\set ON_ERROR_STOP 1 BEGIN; -- Generate new tables ------------------------ -- artist CREATE TABLE artist2013 AS SELECT artist.id, artist.gid, name.name AS name, sort_name.name AS sort_name, begin_date_year, begin_date_month, begin_date_day, end_date_year, end_date_month, end_date_day, typ...
the_stack
SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for message_01 -- ---------------------------- DROP TABLE IF EXISTS `message_01`; CREATE TABLE `message_01` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `biz_id` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '业务id...
the_stack
SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for m_authority -- ---------------------------- DROP TABLE IF EXISTS `m_authority`; CREATE TABLE `m_authority` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `group_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_gener...
the_stack
create schema hashfilter; set current_schema = hashfilter; START TRANSACTION; --create row table create table hashfilter_t1(a int not null, b varchar(10), c regproc); create table hashfilter_t2(a int not null, b varchar(10), c regproc); create table hashfilter_t3(a int not null, b varchar(10), c regproc); --create col...
the_stack
-- 2019-07-08T13:15:48.757 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET Name='Vertrag autom. verlängern',Updated=TO_TIMESTAMP('2019-07-08 13:15:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=543934 AND AD_Language='de_CH' ; -- 2019-07-08T13:15:48.802 -- I ...
the_stack
CREATE EXTENSION IF NOT EXISTS "babelfishpg_tsql" CASCADE; -- The default scale is 2 in PG. select CAST('$100,123.4567' AS money); -- Currency symbol followed by number without being quoted is not recognized -- as Money in postgres dialect. select CAST($100123.4567 AS money); -- Scale changes to the sql server defaul...
the_stack
-- 2017-05-17T19:14:37.166 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,Seq...
the_stack
EXEC tSQLt.NewTestClass '_ExploratoryTests'; GO CREATE PROCEDURE [_ExploratoryTests].[test NULL can be CAST into any datatype] AS BEGIN DECLARE @cmd NVARCHAR(MAX) = ( SELECT ',CAST(NULL AS '+QUOTENAME(SCHEMA_NAME(schema_id))+'.'+QUOTENAME(name)+')['+CAST(user_type_id AS NVARCHAR(MAX))+']' FROM sys....
the_stack
-- September 4, 2015 -- Change the database structure to remove the RawData, PreprocessedData and -- ProcessedData division to unify it into the Artifact object CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; -- Rename the id columns from the parameters tables ALTER TABLE qiita.processed_params_sortmerna RENAME COLUMN pr...
the_stack
--**************************************************************************** -- (c) Copyright IBM Corp. 2017 All rights reserved. -- -- The following sample of source code ("Sample") is owned by International -- Business Machines Corporation or one of its subsidiaries ("IBM") and is -- copyrighted and licensed, not s...
the_stack
-- SETTINGS SET @iTypeOrder = (SELECT MAX(`order`) FROM `sys_options_types` WHERE `group` = 'modules'); INSERT INTO `sys_options_types`(`group`, `name`, `caption`, `icon`, `order`) VALUES ('modules', 'bx_organizations', '_bx_orgs', 'bx_organizations@modules/boonex/organizations/|std-mi.png', IF(ISNULL(@iTypeOrder), 1...
the_stack
-- -------------------------------------------------------- -- big-whale: v1.3 -- Copyright (c): © Meetyou. Big data group technical support. -- -------------------------------------------------------- /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET ...
the_stack
-- /*************************************************************************** -- (c) Copyright IBM Corp. 2011 All rights reserved. -- -- The following sample of source code ("Sample") is owned by International -- Business Machines Corporation or one of its subsidiaries ("IBM") and is -- copyrighted and licensed, not ...
the_stack
SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for `coin` -- ---------------------------- DROP TABLE IF EXISTS `coin`; CREATE TABLE `coin` ( `name` varchar(255) NOT NULL, `can_auto_withdraw` int(11) DEFAULT NULL, `can_recharge` int(11) DEFAULT NULL, `can_transfer` int(11) DEFAULT ...
the_stack
-- /************************************************************************* -- (c) Copyright IBM Corp. 2007 All rights reserved. -- -- The following sample of source code ("Sample") is owned by International -- Business Machines Corporation or one of its subsidiaries ("IBM") and is -- copyrighted and lic...
the_stack
* Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * * Software distributed under the Li...
the_stack
AUTOCOMMIT OFF; -- MODULE DML134 -- SQL Test Suite, V6.0, Interactive SQL, dml134.sql -- 59-byte ID -- TEd Version # -- AUTHORIZATION FLATER set schema FLATER; --O SELECT USER FROM HU.ECCO; VALUES USER; -- RERUN if USER value does not match preceding AUTHORIZATION comment --O ROLLBACK WORK; -- date_tim...
the_stack
* REVERT ROW EVENT * * Revert a specific row level event * Parameters: entity_history.id (primary key) * operation_id **************************************************************/ CREATE OR REPLACE FUNCTION revert_entity_event(entity_history_id INTEGER, operation_id INTEGER) RETURNS VOID AS $$ DECLARE...
the_stack
-- Generated by CompileSchemaScripts.pl from: -- 20180503-mbs-9708-drop-area-containment-view.sql -- 20190317-mbs-9941-mbs-10062.sql -- 20190422-mbs-7480.sql -- 20190422-mbs-9973-collection-added-date.sql -- 20190422-mbs-9428-collection-collaborators.sql -- 20190422-mbs-5818-collection-position.sql -- 20190422-mbs-1658...
the_stack
-- 2019-09-30T11:04:42.840Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET AD_Element_ID=603, ColumnName='UPC', Description='Produktidentifikation (Barcode) durch Universal Product Code oder European Article Number)', Help='Tragen Sie hier den Barcode für das Produkt in einer der...
the_stack
-- 2020-03-04T14:58:14.953Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET AD_Element_ID=577422, AD_Reference_Value_ID=540272, ColumnName='Parameter_M_Product_ID', DefaultValue='@M_Product_ID/-1@',Updated=TO_TIMESTAMP('2020-03-04 16:58:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy...
the_stack
-- 2017-07-25T13:47:57.944 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_ElementGroup (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,IsActive,Name,SeqNo,Updated,UpdatedBy) VALUES (0,0,540130,540947,TO_TIMESTAMP('2017-07-25 13:47:57','YYYY-MM-DD HH24...
the_stack
create or replace package body logger_test as -- CONTANTS gc_line_feed constant varchar2(1) := chr(10); gc_unknown_err constant varchar2(50) := 'Unknown error'; gc_client_id constant varchar2(30) := 'test_client_id'; -- Consistent client id to use -- GLOBAL VARIABLES g_proc_name varchar2(30); -- current ...
the_stack
DROP TABLE IF EXISTS PERSON_EVENT; DROP TABLE IF EXISTS staging_PERSON_EVENT; CREATE EXTERNAL TABLE IF NOT EXISTS staging_PERSON_EVENT USING com.databricks.spark.csv OPTIONS (path ':dataFilesLocationCol/PERSON_EVENT.dat', header 'true', inferSchema 'true', nullValue 'NULL', maxCharsPerColumn '4096'); CREATE TABLE ...
the_stack
create schema test_case; set search_path=test_case; -- no index create table a(a int ,b text, c timestamptz); insert into a values(1,'test','1999-01-08 04:05:06'); insert into a values(2,'test','1999-01-08 04:05:06'); insert into a values(3,'test','1999-01-08 04:05:06'); update a set b = 'test1'; update a set b = 't...
the_stack
DROP FUNCTION IF EXISTS report.fresh_Direct_Costing_Activity_10_50 (IN Date date, IN showBudget character varying, IN showRemaining character varying, IN ad_org_id numeric(10,0)) ; CREATE OR REPLACE FUNCTION report.fresh_Direct_Costing_Activity_10_50 (IN Date date, IN showBudget character varying, -- only used in r...
the_stack
-- Licensed to the Apache Software Foundation (ASF) under one or more -- contributor license agreements. See the NOTICE file distributed with -- this work for additional information regarding copyright ownership. -- The ASF licenses this file to You under the Apache License, Version 2.0 -- (the "License"); you may not...
the_stack
-- The design criteria for this table are: -- -- 1. It can contain arbitrary content serialized as binary, XML or JSON. These formats -- are supported to allow one to take advantage of in-storage processing capabilities for -- these types if required. This should not incur extra cost on storage. -- -- 2. The table desi...
the_stack
-- Copyright (c) 2013-2021 Snowplow Analytics Ltd. All rights reserved. -- -- This program is licensed to you under the Apache License Version 2.0, -- and you may not use this file except in compliance with the Apache License Version 2.0. -- You may obtain a copy of the Apache License Version 2.0 at http://www.apache.o...
the_stack
SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for calendar -- ---------------------------- DROP TABLE IF EXISTS `calendar`; CREATE TABLE `calendar` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL, `title` varchar(255) DEFAULT NULL, `start_time` datetime NOT NUL...
the_stack
-- 2020-08-10T08:23:57.018Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element SET Name='Netto (Mit Freigabe)', PrintName='Netto (Mit Freigabe)',Updated=TO_TIMESTAMP('2020-08-10 11:23:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=578019 ; -- 2020-08-10T08:23:57.023Z --...
the_stack
-- -- SQL functions for NIPAP -- -- -- calc_indent is an internal function that calculates the correct indentation -- for a prefix. It is called from a trigger function on the ip_net_plan table. -- CREATE OR REPLACE FUNCTION calc_indent(arg_vrf integer, arg_prefix inet, delta integer) RETURNS bool AS $_$ DECLARE r re...
the_stack
--------------------------------------------------- -- Table _background_tasks SELECT DISTINCT T1.args AS "Args (_BG Tasks)", T1.backgrounder_id AS "Backgrounder_ID (_BG Tasks)", T1.completed_at AS "Completed_At (_BG Tasks)", T1.created_at AS "Created_At (_BG Tasks)", T1.finish_code AS "Finish_Code (_BG Tasks)", T1.id ...
the_stack
-- -- PostgreSQL database dump -- -- Dumped from database version 9.5.4 -- Dumped by pg_dump version 9.5.5 SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; SET row_security = off; ...
the_stack
SET search_path = public, pg_catalog; -- -- Name: ofec_candidate_history_mv; Type: MATERIALIZED VIEW; Schema: public; Owner: fec -- CREATE MATERIALIZED VIEW ofec_candidate_history_mv AS WITH fec_yr AS ( SELECT DISTINCT ON (cand.cand_valid_yr_id) cand.cand_valid_yr_id, cand.cand_id, c...
the_stack
SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', false); SET check_function_bodies = false; SET xmloption = content; SET client_min_messages = warning; -- -- Name: plpgsql; Type: EXTENSION; Schema: -; Ow...
the_stack
drop table if exists monster_collection_session_rewards; drop table if exists monster_collection_group_rewards; drop table if exists monster_collection; create table monster_collection_session_rewards ( region int, session int, rewardid int, quantity int, primary key (region, session) ); create table mo...
the_stack
-- MySQL dump 10.15 Distrib 10.0.29-MariaDB, for debian-linux-gnu (i686) -- -- Host: localhost Database: localhost -- ------------------------------------------------------ -- Server version 10.0.29-MariaDB-1~trusty /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_R...
the_stack
---------------------------------------------------------- -- Starting new sql scripts for release 15.0 with this one ---------------------------------------------------------- CREATE TABLE "organizationtocountry" ( "tkey" BIGINT NOT NULL, "version" INTEGER NOT NULL, "organization_tkey" BIGINT, "supportedcount...
the_stack
-- Copyright 2004-2019 H2 Group. Multiple-Licensed under the MPL 2.0, -- and the EPL 1.0 (http://h2database.com/html/license.html). -- Initial Developer: H2 Group -- -- -- Test time unit in 'MICROSECONDS' -- SELECT DATE_TRUNC('MICROSECONDS', time '00:00:00.000'); >> 1970-01-01 00:00:00 SELECT DATE_TRUNC('microseconds...
the_stack
USE infrastructure; -- Stored procedures for the API DB -- DEPRECATED: -- Since these proved to be awkward to work with and -- prone to errors, we will write any further queries -- in the API service using knex. DELIMITER $$ CREATE OR REPLACE PROCEDURE CreateProject ( IN id int, ...
the_stack
-- 2017-09-19T17:42:54.497 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=10,Updated=TO_TIMESTAMP('2017-09-19 17:42:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546744 ; -- 2017-09-19T17:42:54.508 -- I forgot to set the DIC...
the_stack
/********************************************************************************* # Copyright 2016 Observational Health Data Sciences and Informatics # # # 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...
the_stack
-- Creating an index on a partitioned table makes the partitions -- automatically get the index CREATE TABLE idxpart ( a int, b int, c text ) PARTITION BY RANGE (a); -- relhassubclass of a partitioned index is false before creating any partition. -- It will be set after the first partition is created. CREA...
the_stack
SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for account -- ---------------------------- DROP TABLE IF EXISTS `account`; CREATE TABLE `account` ( `accountid` int(11) NOT NULL AUTO_INCREMENT, `balance` float DEFAULT NULL, PRIMARY KEY (`accountid`) ) ENGINE=InnoDB AUTO_INCREMENT=2 D...
the_stack
CREATE OR REPLACE FUNCTION nft.insert_superrare(start_ts timestamptz, end_ts timestamptz=now(), start_block numeric=0, end_block numeric=9e18) RETURNS integer LANGUAGE plpgsql AS $function$ DECLARE r integer; BEGIN WITH superrare_trades AS ( SELECT 'SuperRare' AS platform, tx_hash, block_time, ...
the_stack
; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!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' ...
the_stack
SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for course -- ---------------------------- DROP TABLE IF EXISTS `course`; CREATE TABLE `course` ( `id` int(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '课程ID', `major_id` int(20) unsigned NOT NULL COMMENT '专业ID', `name` varchar(50) NOT ...
the_stack
IF NOT EXISTS (SELECT * FROM sys.objects WHERE type = 'P' AND object_id = object_id('dbo.Check_Blocking')) EXEC ('CREATE PROCEDURE dbo.Check_Blocking AS SELECT ''This is a stub''') GO ALTER PROCEDURE dbo.Check_Blocking @BlockingDurationThreshold smallint = 60, @BlockedSessionThreshold smallint = NUL...
the_stack
-- 2020-01-23T08:34:19.497Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET IsTranslated='Y', Name='Rechnung 1', PrintName='Rechnung 1',Updated=TO_TIMESTAMP('2020-01-23 10:34:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=577482 AND AD_Language='de_CH' ; -- 2...
the_stack
-- -- Helper table -- DROP TABLE IF EXISTS Dual; CREATE TABLE Dual (Dummy VARCHAR(10)); INSERT INTO Dual (Dummy) VALUES ('X'); DROP TABLE IF EXISTS InheritanceParent; CREATE TABLE InheritanceParent ( InheritanceParentId integer NOT NULL CONSTRAINT PK_InheritanceParent, TypeDiscriminator integer NU...
the_stack
CREATE DATABASE IF NOT EXISTS bkdata_meta; USE bkdata_meta; SET NAMES utf8; CREATE TABLE IF NOT EXISTS alembic_version ( version_num VARCHAR(32) NOT NULL, CONSTRAINT alembic_version_pkc PRIMARY KEY (version_num) ); -- Running upgrade -> 0b1f35d99379 CREATE TABLE IF NOT EXISTS belongs_to_config ( belon...
the_stack
-- complain if script is sourced in psql, rather than via ALTER EXTENSION \echo Use "ALTER EXTENSION ""babelfishpg_common"" UPDATE TO '1.1.0'" to load this file. \quit DROP OPERATOR FAMILY IF EXISTS sys.fixeddecimal_ops USING btree; DROP OPERATOR FAMILY IF EXISTS sys.fixeddecimal_ops USING hash; CREATE OPERATOR FAMIL...
the_stack
Deployment script for HadoopMetrics */ delimiter ; # CREATE DATABASE `ambarimetrics` /*!40100 DEFAULT CHARACTER SET utf8 */; # # CREATE USER 'ambari' IDENTIFIED BY 'bigdata'; # USE @schema; CREATE TABLE CompletedJob (ClusterNodeID INTEGER NOT NULL, TagSetID INTEGER NOT NULL, MapProgressPercent INTEGER NOT NULL, Cle...
the_stack
-- 2020-03-20T14:34:43.049Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Table SET IsChangeLog='Y',Updated=TO_TIMESTAMP('2020-03-20 16:34:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=312 ; -- 2020-03-23T13:28:34.837Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Co...
the_stack
CREATE OR REPLACE PACKAGE BODY crossbar AS FUNCTION dopublish(p_topic NVARCHAR2, p_payload_type INTEGER, p_payload_str NVARCHAR2, p_payload_lob NCLOB, p_exclude crossbar_sessionids, p_elig...
the_stack
-- 2020-06-25T06:43:44.558Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET IsSelectionColumn='Y', SelectionColumnSeqNo=20,Updated=TO_TIMESTAMP('2020-06-25 08:43:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=548299 ; -- 2020-06-25T06:43:44.564Z -- I forgot to set ...
the_stack
-- A test suite for set-operations in parent side, subquery, and both predicate subquery -- It includes correlated cases. create temporary view t1 as select * from values ("val1a", 6S, 8, 10L, float(15.0), 20D, 20E2, timestamp '2014-04-04 01:00:00.000', date '2014-04-04'), ("val1b", 8S, 16, 19L, float(17.0), 25D, ...
the_stack
-- 2019-12-04T06:34:08.910Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET IsTranslated='Y',Updated=TO_TIMESTAMP('2019-12-04 08:34:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Language='de_CH' AND AD_Element_ID=576112 ; -- 2019-12-04T06:34:08.954Z -- I forgot to set ...
the_stack
-- -- Licensed to the Apache Software Foundation (ASF) under one or more -- contributor license agreements. See the NOTICE file distributed with -- this work for additional information regarding copyright ownership. -- The ASF licenses this file to You under the Apache License, Version 2.0 -- (the "License")...
the_stack
-- 2017-05-16T18:30:42.370 -- URL zum Konzept INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,ColumnDisplayLength,Created,CreatedBy,DisplayLength,EntityType,IncludedTabHeight,IsActive,IsCentrallyMaintained,IsDisplayed,IsDisplayedGrid,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLin...
the_stack
-- 12.11.2015 10:10 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,542921,0,'Parent_Activity_ID',TO_TIMESTAMP('2015-11-12 10:10:20...
the_stack
/* korean charsets: */ /* CP949, JOHAB */ /* ======================================================================= */ static ImplDBCSToUniLeadTab const aKSC5601UniLeadTab[256] = { { 0x0000, 0, 0, NULL }, /* 0x00 */ { 0x0001, 0, 0, NULL }, ...
the_stack
-- #################################################################################################################################################################################################################################### -- Clean up -> Array Type DROP TABLE IF EXISTS ST.Student; DROP VIEW IF EXISTS StudentMa...
the_stack
/* <documentation> <summary>Get SQL Server memory detailed information.</summary> <returns>3 row sets: 1 - countes info; 2 - min, max, target memory info; 3 - detailed tree memory info.</returns> <created>?</created> <modified>2020-02-04 by Konstantin Taranov</modified> <version>1.0</version> <sourc...
the_stack
-- 2019-11-19T11:23:25.238Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET AD_Element_ID=2589, ColumnName='QtyEntered', Description='Die Eingegebene Menge basiert auf der gewählten Mengeneinheit', FieldLength=10, Help='Die Eingegebene Menge wird in die Basismenge zur Produkt-Meng...
the_stack
CREATE PROCEDURE [dbo].[createAnalysisView] @baselineSchema AS nvarchar(max), @replaySchema AS nvarchar(max) AS BEGIN SET NOCOUNT ON; DECLARE @sql nvarchar(max); -- DROP PowerBI_WaitStats IF OBJECT_ID( QUOTENAME(@baselineSchema) +'.'+ QUOTENAME('PowerBI_WaitStats') ) IS NOT NULL BEGIN SET @sql = 'DROP VIEW '...
the_stack
-- 2021-02-26T10:11:42.063Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET AD_Reference_ID=19, FieldLength=22,Updated=TO_TIMESTAMP('2021-02-26 12:11:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=572974 ; -- 2021-02-26T10:22:27.045Z -- I forgot to set the DICTIONA...
the_stack
-- -- PostgreSQL database dump -- -- Dumped from database version 11.5 -- Dumped by pg_dump version 11.5 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', fal...
the_stack
SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for store_express_company -- ---------------------------- DROP TABLE IF EXISTS `store_express_company`; CREATE TABLE `store_express_company` ( `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, `express_title` varchar...
the_stack
* This script post-processes the result of Build_RxE.sql run against Rxfix * * (instead of a real drug database. It needs to be run before * * generic_update.sql. It replaces all newly generated RxNorm Extension codes * * with the existing ones. It then new_rxes the few truly new RxNorm * *...
the_stack
-- 14.11.2016 17:48 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Process_ID,AllowProcessReRun,Classname,CopyFromProcess,Created,CreatedBy,EntityType,IsActive,IsApplySecuritySettings,IsBetaFunctionality,IsDirectPrint,IsOneInstanceOnly,IsR...
the_stack
CREATE OR REPLACE PACKAGE ala as procedure show_sql; procedure show_stats; procedure reset_ala_status; PROCEDURE set_ala_status; procedure set_folder_type; procedure set_sheet_type; procedure ala_to_bulk; procedure set_exist_location; procedure set_loaded_location; PROCEDURE run_all; END; / sho err CREATE OR ...
the_stack
-- 2019-07-26T11:12:33.130Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,576944,0,TO_TIMESTAMP('2019-07-26 14:12:32','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','M...
the_stack
-- ###################################################################### -- # File : cmdb.sql -- # Desc : Pigsty CMDB baseline (pg-meta.meta) -- # Ctime : 2021-04-21 -- # Mtime : 2021-07-13 -- # Copyright (C) 2018-2021 Ruohang Feng -- ##########################################################...
the_stack