text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
-- 2018-11-27T07:57:51.664 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Table SET IsEnableRemoteCacheInvalidation='Y',Updated=TO_TIMESTAMP('2018-11-27 07:57:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=540980 ; UPDATE AD_Ref_List SET ValueName='Tiered' WHERE (AD_Ref_List_...
the_stack
UPDATE gemscript_reference SET gemscriptcode = LPAD(gemscriptcode,8,'0') WHERE gemscriptcode != LPAD(gemscriptcode,8,'0'); --new prodcode CREATE OR REPLACE VIEW gsr AS (-- select * from gemscript_reference2 -- where gemscriptcode not like '!%' -- union SELECT * FROM gemscript_reference WHERE gemscriptcode NOT ...
the_stack
SET NOEXEC OFF SET ANSI_WARNINGS ON SET XACT_ABORT ON SET IMPLICIT_TRANSACTIONS OFF SET ARITHABORT ON SET QUOTED_IDENTIFIER ON SET NUMERIC_ROUNDABORT OFF SET CONCAT_NULL_YIELDS_NULL ON SET ANSI_NULLS ON SET ANSI_PADDING ON GO BEGIN TRAN GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[BugNet...
the_stack
Resource change data table **************************************************************/ IF NOT EXISTS (SELECT 1 FROM sys.tables WHERE name = 'ResourceChangeData') BEGIN CREATE TABLE dbo.ResourceChangeData ( Id bigint IDENTITY(1,1) NOT NULL, Timestamp datetime2(7) NOT NULL CONSTRAINT DF_R...
the_stack
-- -- WINDOW FUNCTIONS -- CREATE TEMPORARY TABLE empsalary ( depname varchar, empno bigint, salary int, enroll_date date ); INSERT INTO empsalary VALUES ('develop', 10, 5200, '2007-08-01'), ('sales', 1, 5000, '2006-10-01'), ('personnel', 5, 3500, '2007-12-10'), ('sales', 4, 4800, '2007-08-08'), ('pers...
the_stack
-- -- The contents of this file are subject to the license and copyright -- detailed in the LICENSE and NOTICE files at the root of the source -- tree and available online at -- -- http://www.dspace.org/license/ -- -- =============================================================== -- WARNING WARNING WARNING WARNING WA...
the_stack
-- Deploy get_changes BEGIN; DROP FUNCTION get_changes(text,text,text,text,cd_patchset_status,uuid,boolean,integer); CREATE OR REPLACE FUNCTION get_changes( -- The project changes pertain to (cannot be NULL) p_enterprise_name enterprises.name%TYPE, p_organization_name organizations.name%TYPE, p_project_name pr...
the_stack
set names utf8; -- ----------------------------------------------------- -- Schema bkdata_meta -- ----------------------------------------------------- CREATE SCHEMA IF NOT EXISTS `bkdata_meta` DEFAULT CHARACTER SET utf8 ; -- ----------------------------------------------------- -- Schema bkdata_meta -- --------------...
the_stack
 CREATE PROCEDURE [DataLoadSimulation].[DailyProcessToCreateHistory] @StartDate date , @EndDate date , @AverageNumberOfCustomerOrdersPerDay int = 60 , @SaturdayPercentageOfNormalWorkDay int , @SundayPercentageOfNormalWorkDay int , @UpdateCustomF...
the_stack
--Run inserts_into_crm.sql right before the ProcessManualRelationships step --+ UKB_source_of_admission --Answers mapped to visits INSERT INTO concept_relationship_manual(concept_code_1, concept_code_2, vocabulary_id_1, ...
the_stack
Problem 1. Create Database *********************************************/ CREATE DATABASE Minions; GO USE Minions; /* ****************************************** Problem 2. Create Tables *********************************************/ CREATE TABLE Minions ( Id INT NOT NULL PRIMARY KEY, Na...
the_stack
SET timezone = 'Europe/Moscow'; -- Need to proper output of datetime variables --CHECK SAVEPOINT RELEASE BEGIN; -- Declare variables SELECT pgv_set('vars', 'any1', 'some value'::text, true); SELECT pgv_set('vars', 'any2', 'some value'::text); SELECT pgv_set_int('vars', 'int1', 101, true); SELECT pgv_set_int('vars', 'in...
the_stack
SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for assets_borrow -- ---------------------------- DROP TABLE IF EXISTS `assets_borrow`; CREATE TABLE `assets_borrow` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id', `uuid` char(36) NOT NULL COMMENT 'uuid', `user_id` bigint(20) N...
the_stack
-------------------------------------------------------- -- DDL for Table AOP_AUTOMATED_TEST -------------------------------------------------------- CREATE TABLE "AOP_AUTOMATED_TEST" ( "ID" NUMBER, "DESCRIPTION" VARCHAR2(4000), "DATA_TYPE" VARCHAR2(20), "TEMPLATE_TYPE" VARCHAR2(20), "OUTPUT_TYPE" VARCH...
the_stack
use mall_pms; SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for pms_attribute -- ---------------------------- DROP TABLE IF EXISTS `pms_attribute`; CREATE TABLE `pms_attribute` ( `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', `category_id` bigint NOT NULL CO...
the_stack
SET search_path = 'musicbrainz'; DELETE FROM medium; DELETE FROM track_gid_redirect; DELETE FROM track; DELETE FROM recording_gid_redirect; DELETE FROM recording; DELETE FROM track_name; DELETE FROM release_gid_redirect; DELETE FROM release; DELETE FROM release_group_gid_redirect; DELETE FROM release_group; DELETE FRO...
the_stack
-- 2020-03-20T12:18:21.451Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_Element_Link WHERE AD_Field_ID=61550 ; -- 2020-03-20T12:18:21.489Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_Field_Trl WHERE AD_Field_ID=61550 ; -- 2020-03-20T12:18:21.5...
the_stack
-- DROP PROCEDURE sp_sync_merge_changes(TIMESTAMP,VARCHAR,VARCHAR,VARCHAR,VARCHAR,BIGINT); CREATE OR REPLACE PROCEDURE sp_sync_merge_changes ( batch_time IN TIMESTAMP , source_tbl IN VARCHAR(256) --Schema qualified with external schema , target_tbl IN VARCHAR(256) --Schema qualified or `public` is a...
the_stack
; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- CREATE DATABASE /*!32312 IF ...
the_stack
-- 29.10.2015 17:21 -- URL zum Konzept INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,542911,0,'PP_Order_Issue_ID',TO_TIMESTAMP('2015-10-29 17:21:25','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.materialtracking','Y','Z...
the_stack
set enable_global_stats = true; /* * This file is used to test the function of ExecCstoreIndexAnd()/ExecCstoreIndexOr() */ ---- --- Create Table and Insert Data ---- create schema vector_bitmap_engine; set current_schema=vector_bitmap_engine; set enable_indexscan=off; set enable_seqscan=off; create table vector_bitm...
the_stack
-- -- ************************************************ -- * View Creation * -- * * -- * Views of the XFILES_LOG_TABLE * -- * Make it easier to find specifc log records * -- * * -- **...
the_stack
-- -- PostgreSQL database dump -- -- Dumped from database version 9.5beta1 -- Dumped by pg_dump version 9.5beta1 SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; SET search_path =...
the_stack
-- 2018-07-26T10:06:43.157 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2018-07-26 10:06:43','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Wareneingang erst.' WHERE AD_Process_ID=540750 AND AD_Language='de_CH' ; -- 2018-07-26T10:06:46...
the_stack
\! gs_ktool -d all \! gs_ktool -g \! gs_ktool -g \! gs_ktool -g DROP CLIENT MASTER KEY IF EXISTS ImgCMK1 CASCADE; DROP CLIENT MASTER KEY IF EXISTS ImgCMK CASCADE; CREATE CLIENT MASTER KEY ImgCMK1 WITH ( KEY_STORE = gs_ktool , KEY_PATH = "gs_ktool/1" , ALGORITHM = AES_256_CBC); CREATE CLIENT MASTER KEY ImgCMK WITH ( K...
the_stack
DROP SCHEMA javatest CASCADE; CREATE SCHEMA javatest; set search_path=javatest,public; set pljava.classpath='examples.jar'; set log_min_messages=info; -- XXX CREATE TABLE javatest.test AS SELECT 1 as i distributed by (i); CREATE FUNCTION javatest.java_getTimestamp() RETURNS timestamp AS 'org.postgresql.example....
the_stack
-- -- PostgreSQL database dump -- SET statement_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; -- -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -- CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catal...
the_stack
-------------------------------------------------------------------------------- -- Step 1, create the temporary matview of recipients from transactions -------------------------------------------------------------------------------- SELECT now() AS script_started_at; DROP MATERIALIZED VIEW IF EXISTS public.temporary_...
the_stack
create schema if not exists graphql; create or replace function graphql.jsonb_coalesce(val jsonb, default_ jsonb) returns jsonb strict immutable language sql as $$ select case when jsonb_typeof(val) = 'null' then default_ else val end; $$; create or replace function graphql.jsonb...
the_stack
-- 2017-04-12T17:06:36.257 -- URL zum Konzept UPDATE AD_Column SET AD_Reference_ID=14, FieldLength=2000,Updated=TO_TIMESTAMP('2017-04-12 17:06:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=2853 ; -- 2017-04-12T17:06:39.593 -- URL zum Konzept INSERT INTO t_alter_column values('ad_process_trl','Descripti...
the_stack
-- 20.10.2015 06:04 -- URL zum Konzept UPDATE AD_Table SET EntityType='de.metas.fresh', Help='See http://dewiki908/mediawiki/index.php/08287_%C3%9Cbergangsl%C3%B6sung_Z%C3%A4hlbestand_MRP_Product_Info_%28108538193697%29', Name='Manual QtyOnHand (fresh)', TableName='Fresh_QtyOnHand',Updated=TO_TIMESTAMP('2015-10-20 06:0...
the_stack
SELECT "financial_accounts_by_awards"."reporting_period_end" AS "submission_period", "treasury_appropriation_account"."allocation_transfer_agency_id" AS "allocation_transfer_agency_identifier", "treasury_appropriation_account"."agency_id" AS "agency_identifier", "treasury_appropriation_account"."beginni...
the_stack
-- 2017-05-25T15:09:19.545 -- 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
SET NAMES 'utf8'; /* ##################################### */ /* STRUCTURE */ /* ##################################### */ CREATE TABLE `PREFIX_pack` ( `id_product_pack` int(10) unsigned NOT NULL, `id_product_item` int(10) unsigned NOT NULL, `quantity` int(10) unsigned NOT NULL DEFAULT 1, PRIMARY KEY...
the_stack
-- -- ALTER TABLE ADD COLUMN DEFAULT test -- SET search_path = fast_default; CREATE SCHEMA fast_default; drop table if exists has_volatile; CREATE TABLE has_volatile(id int); insert into has_volatile SELECT * FROM generate_series(1,10) id; ALTER TABLE has_volatile ADD col1 int; ALTER TABLE has_volatile ADD col2 int ...
the_stack
INSERT INTO `app` (`app_id`, `name`, `description`, `create_time`, `update_time`, `emails`) VALUES (2, 'disconf_demo', 'disconf demo', '99991231235959', '99991231235959', ''); INSERT INTO `config` (`config_id`, `type`, `name`, `value`, `app_id`, `version`, `env_id`, `create_time`, `update_time`) VALUES (4, 0, ...
the_stack
USE tempdb GO SET NOCOUNT ON SET QUOTED_IDENTIFIER ON SET ANSI_NULLS ON SET ANSI_PADDING ON SET ANSI_WARNINGS ON SET ARITHABORT ON SET CONCAT_NULL_YIELDS_NULL ON SET QUOTED_IDENTIFIER ON SET NUMERIC_ROUNDABORT OFF GO /******************************************************************* perf stats snapshot ************...
the_stack
PRINT 'Populate CarModelMapping table...' DECLARE @tMask TABLE (Mask NVARCHAR(100), CarBrand NVARCHAR(100), NotMask NVARCHAR(100)) ; DECLARE @tCarModelMapping TABLE (ModelMask NVARCHAR(100), ModelNotMask NVARCHAR(100), CarBrandId INT, CarModelId INT) ; INSERT INTO @tMask --Audi SELECT N'A4%',N'Audi',N'%Allroa...
the_stack
SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; DROP DATABASE IF EXISTS kvf_admin; CREATE DATABASE kvf_admin DEFAULT CHARSET utf8mb4; USE kvf_admin; -- ---------------------------- -- Table structure for sys_user -- ---------------------------- DROP TABLE IF EXISTS `sys_user`; CREATE TABLE `sys_user` ( `id` bigint(2...
the_stack
SELECT toDecimal32('1.1', 1), toDecimal32('1.1', 2), toDecimal32('1.1', 8); SELECT toDecimal32('1.1', 0); SELECT toDecimal32(1.1, 0), toDecimal32(1.1, 1), toDecimal32(1.1, 2), toDecimal32(1.1, 8); SELECT '1000000000' AS x, toDecimal32(x, 0); -- { serverError 69 } SELECT '-1000000000' AS x, toDecimal32(x, 0); -- { serv...
the_stack
*/ CREATE OR REPLACE PACKAGE sp_pkg AS -- output record type TYPE rst_refcur IS REF CURSOR; TYPE err_refcur IS REF CURSOR; ---------- Global variables ----------------------------------------------- g_pkg VARCHAR2(100) := 'sp_pkg'; -- package name g_cr CHAR(1) := CHR(10); -...
the_stack
-- 数据计算相关表 CREATE DATABASE IF NOT EXISTS bkdata_flow; USE bkdata_flow; SET NAMES utf8; CREATE TABLE `dataflow_control_list` ( `id` int(11) NOT NULL AUTO_INCREMENT, `case` varchar(255) NOT NULL COMMENT '当前功能控制场景', `value` varchar(255) NOT NULL COMMENT '列入当前功能控制名单的值', `description` text NOT NULL COMMENT '备注信息...
the_stack
DROP FUNCTION IF EXISTS update_trl_tables_on_ad_element_trl_update(numeric, character varying); CREATE OR REPLACE FUNCTION update_trl_tables_on_ad_element_trl_update ( p_AD_Element_ID numeric, p_AD_Language character varying = null ) RETURNS void AS $BODY$ DECLARE update_count integer; BEGIN -- ...
the_stack
-- test1: test gp_toolkit.gp_resgroup_status and pg_stat_activity -- create a resource group when gp_resource_manager is queue DROP ROLE IF EXISTS role_concurrency_test; -- start_ignore DROP RESOURCE GROUP rg_concurrency_test; -- end_ignore CREATE RESOURCE GROUP rg_concurrency_test WITH (concurrency=2, cpu_rate_limit=2...
the_stack
-- -- Table structure for table `[db_prefix]entries` -- CREATE TABLE IF NOT EXISTS `[db_prefix]entries` ( `id` int(11) unsigned NOT NULL auto_increment, `author_id` int(11) unsigned NOT NULL default '0', `caption` varchar(100) NOT NULL default '', `snippet` text NOT NULL, `content` mediumtext NOT ...
the_stack
SELECT SourceServer , SourceDB , [Status] , Beta , SSISInstanceID AS SSISIID , LoadStageDBStartDate , LoadStageDBEndDate , CONVERT(VARCHAR(12), DATEADD(ms, DATEDIFF(ms, LoadStageDBStartDate, LoadStageDBEndDate), 0), 114) AS StageLoadTime , LoadReportDBStartDate , Lo...
the_stack
-- -- Test foreign-data wrapper and server management. -- -- Clean up in case a prior regression run failed -- Suppress NOTICE messages when roles don't exist SET client_min_messages TO 'warning'; DROP ROLE IF EXISTS regress_foreign_data_user, regress_test_role, regress_test_role2, regress_test_role_super, regress_tes...
the_stack
-- 2017-06-26T20:47:11.017 -- 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,SeqNo,Updated,UpdatedBy,Value) VALUES (0,0,53032,540327,TO_TIMESTAMP('2017-06-26 20:47:10','YYYY-MM-DD HH24:MI:SS'),100,'Y'...
the_stack
To do list: - Possible excipient, - mEq to mmol, - other funny units, - use dfg_id for best pattern search - don't use quantifieds for r_uds, use the equivalent non-quantified one, otherwise rounding error possible ***************************************************************************/ /**************************...
the_stack
DECLARE ---------------------------------- -- @FileTargetPath ---------------------------------- -- Specify the file path qualifier for the XEL files to read. You can use asterisk * as a wildcard. -- You can specify a specific path, for example: 'C:\MyLogs\SERVER1_SQLDIAG_*.xel' -- Or, you can ommit the folder pa...
the_stack
create or replace function graphql.build_connection_query( ast jsonb, variable_definitions jsonb = '[]', variables jsonb = '{}', parent_type text = null, parent_block_name text = null ) returns text language plpgsql as $$ declare block_name text = graphql.slug(); entity regclass = t....
the_stack
-- ------------------------------------------------------------------ -- Title: Simplified Acute Physiology Score II (SAPS II) -- This query extracts the simplified acute physiology score II. -- This score is a measure of patient severity of illness. -- The score is calculated on the first day of each ICU patients' sta...
the_stack
-- 2018-08-29T16:26:10.087 -- 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,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,544225,0,'IncludeInAssignedQuantitySum',TO_TIMESTAMP('2018-08-29 16:26:09...
the_stack
-- 2017-05-23T17:46:10.973 -- 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,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,543348,0,'WidgetSize',TO_TIMESTAMP('2017-05-23 17:46:10','YYYY-MM-DD HH24...
the_stack
-- 2019-09-03T11:52:46.452Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET IsTranslated='Y', Name='Externe Datensatz-Kopf-ID', PrintName='Externe Datensatz-Kopf-ID',Updated=TO_TIMESTAMP('2019-09-03 13:52:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=575915 A...
the_stack
-- 10.12.2015 13:54 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_RelationType (AD_Client_ID,AD_Org_ID,AD_RelationType_ID,Created,CreatedBy,Description,EntityType,IsActive,IsDirected,IsExplicit,Name,Updated,UpdatedBy) VALUES (0,0,540146,TO_TIMESTAMP('2015-12-10 13:54:47','YYYY-MM-DD H...
the_stack
-- This file contains some raw DDL generated from the Oracle Data Modeller tool -- it is not quite ready for use without some edits and tweeks. -- Keep the tables here until we are ready to think about them --- CREATE TABLE CAMPAIGN_DIM ( CAMPAIGN_ID INTEGER NOT NULL , CANDIDATE_FIRST_NAME ...
the_stack
---- --- Create Table and Insert Data ---- drop schema if exists llvm_vecsort_engine cascade; create schema llvm_vecsort_engine; set current_schema = llvm_vecsort_engine; set codegen_cost_threshold=0; CREATE TABLE llvm_vecsort_engine.LLVM_VECSORT_TABLE_01( col_int1 int, col_int2 int, col_bint bigint, c...
the_stack
-- =================================================================== -- create FDW objects -- =================================================================== \set QUIET on SET client_min_messages TO error; \set VERBOSITY terse CREATE EXTENSION postgres_fdw; CREATE ROLE cdb_fs_tester LOGIN PASSWORD 'cdb_fs_passwd...
the_stack
--Dynamic SQL Anonymous Block TEST --CREATE schema and table ,INSERT data CREATE SCHEMA test_schema; create table test_schema.test_table( ID INTEGER PRIMARY KEY , NAME varchar2(20) UNIQUE, AGE INTEGER CHECK(AGE>0), ADDRESS varchar2(20) NOT NULL, TELE varchar2(20) ...
the_stack
SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for `action` -- ---------------------------- DROP TABLE IF EXISTS `action`; CREATE TABLE `action` ( `actionId` int(11) NOT NULL AUTO_INCREMENT, `action` varchar(45) NOT NULL, PRIMARY KEY (`actionId`) ) ENGINE=InnoDB AUTO_INCREME...
the_stack
-- -- Test for ALTER some_object {RENAME TO, OWNER TO, SET SCHEMA} -- -- Clean up in case a prior regression run failed SET client_min_messages TO 'warning'; DROP ROLE IF EXISTS regtest_alter_user1; DROP ROLE IF EXISTS regtest_alter_user2; DROP ROLE IF EXISTS regtest_alter_user3; RESET client_min_messages; CREATE U...
the_stack
-- =================================================================== -- create FDW objects -- =================================================================== \set QUIET on SET client_min_messages TO error; \set VERBOSITY terse CREATE EXTENSION postgres_fdw; -- We create a username following the same steps as or...
the_stack
Expression Type: T_Var, T_Const, T_Param, T_Aggref, T_WindowFunc, T_ArrayRef, T_FuncExpr, T_NamedArgExpr, T_OpExpr, T_DistinctExpr, T_NullIfExpr, T_ScalarArrayOpExpr, T_BoolExpr, T_SubLink, T_SubPlan, T_AlternativeSubPlan, T_FieldSelect, T_FieldStore, T_RelabelType, T_CoerceViaIO, T_ArrayCoerceExpr...
the_stack
-- 1 init environment set DateStyle = 'Postgres'; prepare pg_partition_sql(char) as select relname, parttype, rangenum, intervalnum, partstrategy, interval, to_char(to_date(boundaries[1], 'Dy Mon DD hh24:mi:ss YYYY'), 'YYYY-MM-DD') boundary from ...
the_stack
-- 2018-01-29T07:41:54.176 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2018-01-29 07:41:54','YYYY-MM-DD HH24:MI:SS'),Name='Client ' WHERE AD_Field_ID=561285 AND AD_Language='en_US' ; -- 2018-01-29T07:41:57.368 -- I forgot to set the DICT...
the_stack
-- 2017-09-23T17:13:32.316 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Window SET Name='Produkt Kategorie',Updated=TO_TIMESTAMP('2017-09-23 17:13:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Window_ID=144 ; -- 2017-09-23T17:13:32.328 -- I forgot to set the DICTIONARY_ID_COMMENTS ...
the_stack
-- Style guide: please see: https://github.com/ktaranov/sqlserver-kit/blob/master/SQL%20Server%20Name%20Convention%20and%20T-SQL%20Programming%20Style.md /************************************************************* Full text catalog creation **************************************************************/ IF NOT EXIS...
the_stack
-- -- Copyright 2021 Red Hat Inc. -- SPDX-License-Identifier: Apache-2.0 -- DROP FUNCTION IF EXISTS public.clone_schema(text, text, boolean, boolean); CREATE OR REPLACE FUNCTION public.clone_schema( source_schema text, dest_schema text, copy_data boolean DEFAULT false, _verbose boolean DEFAULT false ) ...
the_stack
-- Script: pesterdb.sql -- Description: This script can be used to configure a new SQL Server 2014 instance for PowerUpSQL Pester tests. ------------------------------------------------------------ -- Create Logins, Database Users, and Grant Assembly Privs ------------------------------------------------------------ ...
the_stack
-- complain if script is sourced in psql, rather than via CREATE EXTENSION \echo Use "CREATE EXTENSION pggraphblas" to load this file. \quit CREATE TYPE vector; CREATE FUNCTION vector_in(cstring) RETURNS vector AS '$libdir/pggraphblas', 'vector_in' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION vector_out(A vector) RE...
the_stack
-- This analysis calculates false positive rate, false negative rate, recall, and precision for functions whose -- names appear across more than one specimen (but not more than once per specimen) and which pass all tests. -------------------------------------------------------------------------------------------------...
the_stack
-- 25.03.2016 18:54 -- 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,EntityType,FieldLength,IsActive,IsAdvancedText,IsAllowLogging,IsAlwaysUpdat...
the_stack
-- 21.01.2016 16:30:59 OEZ -- 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,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,542947,0,'OutputType',TO_TIMESTAMP('2016-01-21 16:30:59','YYYY-MM-DD HH24...
the_stack
-- Copyright 2019 Cargill Incorporated -- -- 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 agre...
the_stack
------------------- -- Init mirror node db, defining table schema -- Supports mirror nodes migrated from v1.0 ------------------- -- Create enums for tables create type entity_type as enum ('ACCOUNT', 'CONTRACT', 'FILE', 'TOPIC', 'TOKEN', 'SCHEDULE'); create type token_pause_status as enum ('NOT_APPLICABLE', 'PAUSED',...
the_stack
SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for sys_auditlog -- ---------------------------- DROP TABLE IF EXISTS `sys_auditlog`; CREATE TABLE `sys_auditlog` ( `Id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键Id', `Key` varchar(100) CHARACTER SET utf8 COLLAT...
the_stack
-- -- WITH-clause tests -- -- These test queries are run twice in the test suite, with CTE inlining or -- sharing, and without those options. This file is included by two launcher -- scripts, qp_with_functional_noinlining.sql, and -- qp_with_functional_inlining.sql, which set the desired options before -- including thi...
the_stack
-- --FOR BLACKLIST FEATURE: CREATE AGGERGATE、INHERITS is not supported. -- -- -- AGGREGATES -- SELECT avg(four) AS avg_1 FROM onek; SELECT avg(a) AS avg_32 FROM aggtest WHERE a < 100; -- In 7.1, avg(float4) is computed using float8 arithmetic. -- Round the result to 3 digits to avoid platform-specific results. SELE...
the_stack
-- 2020-03-04T15:27:44.177Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000064, SeqNo=0, Updated=now(), UpdatedBy=100 WHERE Node_ID=541440 AND AD_Tree_ID=10 ; -- 2020-03-04T15:27:44.181Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE ...
the_stack
----------------------------------------------------------------------------- -- (c) Copyright IBM Corp. 2008 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
-- 16.06.2016 12:32 -- 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,Description,EntityType,FieldLength,Help,IsActive,IsAdvancedTex...
the_stack
-- 2021-05-20T17:03:16.801Z -- URL zum Konzept INSERT INTO AD_Process_Para (AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAutocomplete,IsCentrallyMaintained,IsEncrypted,IsMandatory,IsRange,Name,SeqNo,...
the_stack
-- 2018-06-04T10:18:02.739 -- 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,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,544105,0,'Pharma_Fax',TO_TIMESTAMP('2018-06-04 10:18:02','YYYY-MM-DD HH24...
the_stack
clear screen PROMPT PROMPT PROMPT ********************************************************* PROMPT * Script to gather information about an Oracle instance * PROMPT ********************************************************* PROMPT PROMPT sho user PROMPT PROMPT PROMPT This script needs to be executed as the SYS or SY...
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
-- -- XDB_ANALYZE_XMLSCHEMA should be created under XDBPM -- alter session set current_schema = XDBPM / set define on -- create or replace package XDBPM_ANALYZE_XMLSCHEMA authid CURRENT_USER as function analyzeTypeHierarchy(P_GLOBAL_OBJECT_NAME VARCHAR2) return XMLTYPE; function analyzeTypeHierarchy(P_GLOBAL_OBJE...
the_stack
CREATE FUNCTION global_test_one() returns text AS 'if not SD.has_key("global_test"): SD["global_test"] = "set by global_test_one" if not GD.has_key("global_test"): GD["global_test"] = "set by global_test_one" return "SD: " + SD["global_test"] + ", GD: " + GD["global_test"]' LANGUAGE plpythonu; CREATE FUNCTIO...
the_stack
select module('Chaos.Server.TurnSequence'); /* use this to simulate multiple updates: for a constraint which refers to multiple tables which get updated during an action_next_phase call, this will be set to true, false at all other times, so using this can defer constraint checking till the end of the action_next_phas...
the_stack
CREATE TABLE IF NOT EXISTS Bas_Client( ClientId int PRIMARY KEY NOT NULL, ClientCode varchar(200) NOT NULL, ClientName varchar(200) NULL, CloudServerId int NOT NULL DEFAULT 0, ActiveDate DATETIME(6) NULL, Qty int not null default 0, State SMALLINT NOT NULL, Remark varchar(250) NULL DEFAULT '默认值' ); CREATE TABLE...
the_stack
CREATE OR REPLACE PACKAGE BODY te_templates_api AS -- This cursor processes an XML Document into columns for the TE_TEMPLATES table. CURSOR extractTemplates( p_xml in XMLType ) IS SELECT xt.* FROM XMLTABLE( '/teplsql/templates/template' PASSING p_xml COLUMNS ...
the_stack
-- -- XDBPM_XMLINDEX_SEARCH should be created under XDBPM -- alter session set current_schema = XDBPM / set define off -- create or replace package XDBPM_XML_CONVERSIONS as /* ** ** Process Attributes ** For Each Attribute ** Case ** CollectonType ** Add Cast/Multiset ** ProcessObjectType ** ...
the_stack
-- 2017-06-18T13:25:48.374 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Menu SET EntityType='D', InternalName='_LeergutRückname_1', Name='Leergut Rücknahme', WEBUI_NameBrowse='Leergut Rücknahme',Updated=TO_TIMESTAMP('2017-06-18 13:25:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Men...
the_stack
-- -- XDBPM_OPTIMIZE_XMLSCHEMA should be created under XDBPM -- alter session set current_schema = XDBPM / -- set define on -- @@XDBPM_SQLTYPE_VIEWS.sql -- create or replace TYPE XMLTYPE_REF_TABLE_T IS TABLE of REF XMLTYPE / show errors -- grant execute on XMLTYPE_REF_TABLE_T to public / create glob...
the_stack
-- should fail, return type mismatch CREATE EVENT TRIGGER regress_event_trigger ON ddl_command_start EXECUTE PROCEDURE pg_backend_pid(); -- OK CREATE FUNCTION test_event_trigger () RETURNS event_trigger AS $$ BEGIN RAISE NOTICE 'test_event_trigger: % %', tg_event, tg_tag; END $$ LANGUAGE plpgsql; -- s...
the_stack
-- Tests for multirange data types. -- -- test input parser -- -- negative tests; should fail select ''::textmultirange; select '{,}'::textmultirange; select '{(,)}.'::textmultirange; select '{[a,c),}'::textmultirange; select '{,[a,c)}'::textmultirange; select '{-[a,z)}'::textmultirange; select '{[a,z) - }'::textmult...
the_stack
SET ANSI_NULLS ON; GO SET QUOTED_IDENTIFIER ON; GO IF EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'Description' , N'SCHEMA',N'dbo', N'PROCEDURE',N'sp_sizeoptimiser', NULL,NULL)) BEGIN; EXEC sys.sp_dropextendedproperty @name=N'Description' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'PR...
the_stack
-- 1. Update latest_update field to new date DO $_$ BEGIN PERFORM VOCABULARY_PACK.SetLatestUpdate( pVocabularyName => 'RxNorm', pVocabularyDate => (SELECT vocabulary_date FROM sources.rxnatomarchive LIMIT 1), pVocabularyVersion => (SELECT vocabulary_version FROM sources.rxnatomarchive LIMIT 1), pVocabularyDe...
the_stack
* Prepare the tablespace, assume that there are local and hdfs filespaces. */ SET client_min_messages = warning; DROP DATABASE IF EXISTS goh_tablespace_local; DROP DATABASE IF EXISTS goh_tablespace_shared; RESET client_min_messages; CREATE DATABASE goh_tablespace_local TABLESPACE local; CREATE DATABASE goh_tablespace...
the_stack
-- Copyright (C) from 2009 to Present EPAM Systems. -- -- This file is part of Indigo toolkit. -- -- 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/LICE...
the_stack