text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
-- 2017-07-05T11:35:04.812
-- 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,CacheInvalidateParent,ColumnName,Created,CreatedBy,DDL_NoForeignKey,Description
,EntityType,FieldLength,Help
,... | the_stack |
INSERT INTO CHANNELVIEW VALUES ('EB_readout_tower', 644, 69, NULL, 'EB_readout_tower', 1236440069);
INSERT INTO CHANNELVIEW VALUES ('EB_readout_tower', 625, 69, NULL, 'EB_readout_tower', 1236250069);
INSERT INTO CHANNELVIEW VALUES ('EB_readout_tower', 636, 69, NULL, 'EB_readout_tower', 1236360069);
INSERT INTO CHANNELV... | the_stack |
BEGIN;
DROP MATERIALIZED VIEW IF EXISTS zeroex.view_fills;
CREATE MATERIALIZED VIEW zeroex.view_fills AS (
WITH
v3_fills AS (
SELECT
evt_block_time AS timestamp
, 'v3' AS protocol_version
, fills.evt_tx_hash AS transaction_hash
, fills.evt_index
, ... | the_stack |
-- 4022 Distribution of greater than 0 US$ cost per subject by period_id, by drug_concept_id, by drug_type_concept_id, by cost_concept_id, by cost_type_concept_id in the 365d prior to first cohort start date
{@rollupUtilizationDrug} ? {
with drug_records as
(
select c1.cohort_definition_id,
c1.subject_id,
... | the_stack |
/* Todos os códigos das views serão adicionados aqui */
/**
* View para selecionar a quantidade de usuários cadastrados por mês
* @author Daniel Moreira Cardoso
*/
CREATE VIEW `quantidade_de_usuarios_por_mes` AS
(SELECT
DATE_FORMAT(`usuarios`.`data_cadastro`, '%M') AS `Mês`,
DATE_FORMAT(`usu... | the_stack |
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for echonest_information
-- ----------------------------
DROP TABLE IF EXISTS `echonest_information`;
CREATE TABLE `echonest_information` (
`echonest_id` varchar(255) NOT NULL,
`song_name` varchar(255) NOT NULL,
`artist_name` varchar(25... | the_stack |
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for APP_INFO
-- ----------------------------
DROP TABLE IF EXISTS `APP_INFO`;
CREATE TABLE `APP_INFO` (
`ID` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`HOST_NAME` char(30) CHARACTER SET utf8 COLLA... | the_stack |
-- 04.02.2016 18:26
-- 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,542961,0,'Salesgroup_UOM',TO_TIMESTAMP('2016-02-04 18:26:59','YYYY-MM-DD HH24:MI... | the_stack |
-- 2021-06-17T20:34:04.445Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Table SET AD_Window_ID=540901,Updated=TO_TIMESTAMP('2021-06-17 22:34:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=541486
;
-- 2021-06-17T20:35:00.765Z
-- I forgot to set the DICTIONARY_ID_COMMENTS Sy... | the_stack |
CREATE DATABASE frostmourne DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_0900_ai_ci;
/* if your mysql not support utf8mb4_0900_ai_ci, use collate utf8mb4_general_ci instead */
-- CREATE DATABASE frostmourne DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_general_ci;
use frostmourne;
/*----------------... | the_stack |
-- 2017-07-19T17:48:44.646
-- 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,543382,0,'C_BP_BankAccount_Acct_ID',TO_TIMESTAMP('2017-07-19 17:48:44','Y... | the_stack |
-- 09.10.2015 11:32
-- 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,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,542900,0,'AccountValueFrom',TO_TIMESTAMP('2015-10-09 11:32:43','YYYY... | the_stack |
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.5.5
-- 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 |
--
-- Copyright 2009 Inspire-Software.com
--
-- 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 b... | the_stack |
-- Queries on Policy Configurations
-- Most of these should be working, but some may still be a work in progress.
-- These are formatted for readability, just fyi.
-- ##################################################
-- Basic Queries
-- Get Policies that Execute @ Ongoing
select policy_id
from policies
where
exec... | the_stack |
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for act_evt_log
-- ----------------------------
DROP TABLE IF EXISTS `act_evt_log`;
CREATE TABLE `act_evt_log` (
`LOG_NR_` bigint(20) NOT NULL AUTO_INCREMENT,
`TYPE_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin N... | the_stack |
SET ANSI_NULLS ON;
SET ANSI_PADDING ON;
SET ANSI_WARNINGS ON;
SET CONCAT_NULL_YIELDS_NULL ON;
SET NUMERIC_ROUNDABORT OFF;
SET QUOTED_IDENTIFIER ON;
IF OBJECT_ID('[dbo].[FN_SPLIT_INT]') IS NOT NULL
DROP FUNCTION [dbo].[FN_SPLIT_INT]
GO
IF OBJECT_ID('[dbo].[FN_SPLIT]') IS NOT NULL
DROP FUNCTION [dbo].[FN_SPLIT]
GO
C... | the_stack |
-- 2018-05-14T18:12:15.770
-- 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,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,544078,0,'Memo1',TO_TIMESTAMP('2018-05-14 18:12:15','YYYY-MM-... | the_stack |
create or replace package body oos_util_lob
as
/**
* Convers clob to blob
*
* @issue #12
*
* declare
* l_blob blob;
* l_clob clob;
* begin
* l_blob := oos_util_lob.clob2blob(l_clob);
* end;
*
* @author Moritz Klein (https://github.com/commi235)
* @created 07-Sep-2015
*... | the_stack |
-- original: misc5.test
-- credit: http://www.sqlite.org/src/tree?ci=trunk&name=test
create table t2(x unique);
insert into t2 values(1);
insert or ignore into t2 select x*2 from t2;
insert or ignore into t2 select x*4 from t2;
insert or ignore into t2 select x*16 from t2;
insert or ign... | the_stack |
CREATE EXTENSION dblink;
-- want context for notices
\set SHOW_CONTEXT always
CREATE TABLE foo(f1 int, f2 text, f3 text[], primary key (f1,f2));
INSERT INTO foo VALUES (0,'a','{"a0","b0","c0"}');
INSERT INTO foo VALUES (1,'b','{"a1","b1","c1"}');
INSERT INTO foo VALUES (2,'c','{"a2","b2","c2"}');
INSERT INTO foo VALU... | the_stack |
-- 2021-02-10T14:58:31.828Z
-- 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,ColumnName,Created,CreatedBy,DDL_NoForeignKey,EntityType,FacetFilterSeqNo,FieldLength,IsActive,IsAdvancedText,IsAllowLogging,... | the_stack |
-- 3D City Database - The Open Source CityGML Database
-- https://www.3dcitydb.org/
--
-- Copyright 2013 - 2021
-- Chair of Geoinformatics
-- Technical University of Munich, Germany
-- https://www.lrg.tum.de/gis/
--
-- The 3D City Database is jointly developed with the following
-- cooperation partners:
--
-- Virtual C... | the_stack |
--
-- Copyright 2009 Inspire-Software.com
--
-- 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 b... | the_stack |
FUNCTION render_dropzone(p_region IN apex_plugin.t_region,
p_plugin IN apex_plugin.t_plugin,
p_is_printer_friendly IN BOOLEAN)
RETURN apex_plugin.t_region_render_result IS
--
l_result apex_plugin.t_region_render_result;
-- region attrib... | the_stack |
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for Base_AppSecret
-- ----------------------------
DROP TABLE IF EXISTS `Base_AppSecret`;
CREATE TABLE `Base_AppSecret` (
`Id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '代理主键' ,
`AppId` varchar(50) CHARACTER SE... | 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 |
-- 2017-06-18T10:08:03.016
-- 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,UIStyle,Updated,UpdatedBy) VALUES (0,0,540077,540744,TO_TIMESTAMP('2017-06-18 10:08:02','YYYY-MM... | the_stack |
-- Generated with mysqldump -u root -p --no-data chainquery > schema.sql
-- MySQL dump 10.13 Distrib 5.7.25, for osx10.14 (x86_64)
--
-- Host: localhost Database: chainquery_e2e_test
-- ------------------------------------------------------
-- Server version 5.7.25
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTE... | 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 ... | the_stack |
-- Aug 17, 2016 8:06 AM
-- URL zum Konzept
UPDATE AD_Reference SET Name='RelType C_Order -> C_OLCand',Updated=TO_TIMESTAMP('2016-08-17 08:06:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540618
;
-- Aug 17, 2016 8:06 AM
-- URL zum Konzept
UPDATE AD_Reference_Trl SET IsTranslated='N' WHERE AD_Refere... | the_stack |
CREATE DATABASE /*!32312 IF NOT EXISTS*/`mssystemwx` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `mssystemwx`;
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for wx_account
-- ----------------------------
DROP TABLE IF EXISTS `wx_account`;
CREATE TABLE `wx_account... | the_stack |
--
-- XDBPM_SBIMPORT_UTILITIES should be created under XDBPM
--
alter session set current_schema = XDBPM
/
create or replace package XDBPM_SBIMPORT_UTILITIES
authid CURRENT_USER
as
procedure prepareSBExport(P_USER VARCHAR2 default USER);
procedure exportSBResources(P_OWNER VARCHAR2, P_TABLE_NAME VARCHAR2);
proced... | 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 |
/* chinese traditional (Taiwan/HongKong) charsets: */
/* BIG5, MS950, APPLE_CHINTRAD */
/* ======================================================================= */
static ImplDBCSToUniLeadTab const aBIG5UniLeadTab[256] =
{
{ 0x0000, 0, 0, NULL }, /* 0x00 */
{ 0x0001, 0... | the_stack |
CREATE DATABASE /*!32312 IF NOT EXISTS*/`sepp` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
USE `sepp`;
set @@global.foreign_key_checks = 0;
/*Table structure for table `sepp_attachment` */
DROP TABLE IF EXISTS `sepp_attachment`;
CREATE TABLE `sepp_attachment` (
`id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'ID',
... | the_stack |
DROP FUNCTION IF EXISTS de_metas_acct.balanceToDate(p_AD_Org_ID numeric(10, 0), p_Account_ID numeric,
p_DateAcct date,
p_C_Vat_Code_ID numeric);
CREATE OR REPLACE FUNCTION de_metas_acct.balanceToDate(p_AD_Org_ID numeric(10, 0),
p_Account_ID numeric,
... | the_stack |
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
SET NOCOUNT ON
-----------------------------------------------------------------------------------------------------------------------------
-- Error Trapping: Check If Procedure Already Exists And Create Shell If Applicable
--------------------------------------------... | the_stack |
--
-- Name: addresses_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres81; Tablespace:
--
ALTER TABLE ONLY addresses
ADD CONSTRAINT addresses_id_key UNIQUE (id);
--
-- Name: affiliation_phases_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres81; Tablespace:
--
ALTER TABLE ONLY affiliation_phas... | the_stack |
CREATE DATABASE [GHTDB] ON (NAME = N'GHTDB_dat', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\GHTDB.mdf' , SIZE = 6, FILEGROWTH = 10%) LOG ON (NAME = N'GHTDB_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\GHTDB.ldf' , SIZE = 2, FILEGROWTH = 10%)
COLLATE SQL_Latin... | the_stack |
--vaccines, antibodies, microorganism preparations
DROP TABLE IF EXISTS vaccines_1;
CREATE TEMP TABLE vaccines_1
AS (
WITH inclusion AS (
SELECT
--general
'vaccine|virus|Microb|Micr(o|)org|Bacter|Booster|antigen|serum|sera|antiserum|globin|globul... | the_stack |
-- 2019-08-14T18:17:15.690Z
-- URL zum Konzept
INSERT INTO AD_Menu (AD_Client_ID,AD_Element_ID,AD_Menu_ID,AD_Org_ID,Created,CreatedBy,EntityType,InternalName,IsActive,IsCreateNew,IsReadOnly,IsSOTrx,IsSummary,Name,Updated,UpdatedBy) VALUES (0,574814,541329,0,TO_TIMESTAMP('2019-08-14 20:17:15','YYYY-MM-DD HH24:MI:SS'),10... | the_stack |
-- Start transaction and plan the tests.
BEGIN;
-- insert seed data for basic user/platform/project/reward
\i /specs/sql-support/insert_platform_user_project.sql
SELECT plan(35);
SELECT function_returns('payment_service', 'refuse_expired_slip_payments', '{}'::text[], 'json');
CREATE OR REPLACE FU... | the_stack |
--Excluded days
'2010-11-04' TR --Unknown
'2011-03-10' TR --Unknown
'2012-10-29' M --Sandy
'2012-10-30' T --Sandy
'2013-03-06' W --Snowstorm
-- Overall ridership
SELECT DATE_TRUNC('month',t.start_time) AS month,
COUNT(*) AS all_rides,
COUNT(CASE WHEN t.type != 'Casual' THEN t.id ELSE NULL END) AS sub... | the_stack |
-- 2017-08-18T12:46:23.069
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_UI_ElementGroup SET UIStyle='primary',Updated=TO_TIMESTAMP('2017-08-18 12:46:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_ElementGroup_ID=540204
;
-- 2017-08-18T12:47:03.510
-- I forgot to set the DICTIONAR... | the_stack |
-- 2018-04-27T12:04:09.665
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET AD_Reference_ID=12,Updated=TO_TIMESTAMP('2018-04-27 12:04:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=559786
;
/* DDL */ SELECT public.db_alter_table('I_DiscountSchema','ALTER TABLE publi... | the_stack |
-- 11.03.2016 16:54
-- URL zum Konzept
UPDATE AD_Field SET IsCentrallyMaintained='N', Name='Lager für Bestellung',Updated=TO_TIMESTAMP('2016-03-11 16:54:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556769
;
-- 11.03.2016 16:54
-- URL zum Konzept
UPDATE AD_Field_Trl SET IsTranslated='N' WHERE AD_Field_I... | the_stack |
var window = import "core/window/0";
var time = import "core/time/0";
var array = import "std/array/0";
var math = import "std/math/0";
var random = import "std/random/0";
var string = import "std/string/0";
var width = 400;
var height = 300;
var fps_target = 30;
var rng = random.newRNG(time.get_time_millis());
// W... | the_stack |
SET sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
-- ut_dolphin_T_t_ds_access_token
drop PROCEDURE if EXISTS ut_dolphin_T_t_ds_access_token;
delimiter d//
CREATE PROCEDURE ut_dolphin_T_t_ds_access_token()
BEGIN
IF EXISTS (SELECT 1 FROM information_schema.TABLES
WHERE TABLE_NAME='t_escheduler_acce... | the_stack |
DROP FUNCTION IF EXISTS report.fresh_statistics_kg_week (
IN C_Year_ID numeric, IN week integer,IN issotrx character varying,IN C_Activity_ID numeric,IN M_Product_ID numeric, IN M_Product_Category_ID numeric, IN M_AttributeSetInstance_ID numeric, IN convert_to_kg character varying, IN ad_org_id numeric
);
DROP FU... | the_stack |
TRUNCATE TABLE #HERACLES_cohort_subject;
DROP TABLE #HERACLES_cohort_subject;
TRUNCATE TABLE #HERACLES_cohort;
DROP TABLE #HERACLES_cohort;
TRUNCATE TABLE #cohort_first;
DROP TABLE #cohort_first;
TRUNCATE TABLE #periods_baseline;
DROP TABLE #periods_baseline;
TRUNCATE TABLE #periods_atrisk;
DROP TABLE #periods_atri... | the_stack |
-- SQL
create materialized view ppi_mag_cohort AS
-- Get the first ICU stay of each adult
WITH first_admissions AS
(SELECT icud.subject_id,
icud.hadm_id AS first_hadm_id,
icud.icustay_id AS first_icustay_id
icud.hospital_admit_dt AS first_hadm_admit_dt
icud.hospital_disch_dt ... | 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 ... | the_stack |
-- phpMyAdmin SQL Dump
-- version 4.2.12deb2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Aug 11, 2015 at 10:44 AM
-- Server version: 5.6.25-0ubuntu0.15.04.1
-- PHP Version: 5.6.4-4ubuntu6.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CL... | the_stack |
-- 2019-12-17T09:33:12.542Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Field SET DisplayLogic='@Processed/''X''@=''Y''',Updated=TO_TIMESTAMP('2019-12-17 11:33:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3663
;
-- 2019-12-17T09:33:42.086Z
-- I forgot to set the DICTIONA... | the_stack |
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for image_space_info
-- ----------------------------
DROP TABLE IF EXISTS `image_space_info`;
CREATE TABLE `image_space_info` (
`createTime` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
`updateTime` datetime(6) ... | the_stack |
-- 2017-07-04T16:58:42.581
-- 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_Reference_Value_ID,AD_Table_ID,AllowZoomTo,ColumnName,Created,CreatedBy,DDL_NoForeignKey,EntityType,FieldLength,IsActive,IsAdvancedText... | the_stack |
-- 2020-01-08T08:43:13.013Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Element_Trl SET IsTranslated='Y',Updated=TO_TIMESTAMP('2020-01-08 10:43:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=574479 AND AD_Language='de_CH'
;
-- 2020-01-08T08:43:13.070Z
-- I forgot to set ... | 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 licensed, not... | the_stack |
-- 2018-03-13T18:46:11.693
-- 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,543927,0,'VATType',TO_TIMESTAMP('2018-03-13 18:46:11','YYYY-MM-DD HH24:MI... | the_stack |
--Create a heap table with partitions ( having diff storage parameters)
Create table pt_heap_tab(a int, b text, c int , d int, e numeric,success bool) with ( appendonly=false )
distributed by (a)
partition by list(b)
(
partition abc values ('abc','abc1','abc2') with (appendonly=false), -- HEAP
... | the_stack |
-----------------------------------------------------------------------
-- Oracle Machine Learning for SQL (OML4SQL) 20c
--
-- OML R Extensible - Principal Components Algorithm - dmrpcademo.sql
--
-- Copyright (c) 2020 Oracle Corporation and/or its affilitiates.
--
-- The Universal Permissive License (UPL), ... | the_stack |
--
-- SUBSELECT
--
set optimizer_enable_master_only_queries = on;
set optimizer_segments = 3;
set optimizer_nestloop_factor = 1.0;
SELECT 1 AS one WHERE 1 IN (SELECT 1);
SELECT 1 AS zero WHERE 1 NOT IN (SELECT 1);
SELECT 1 AS zero WHERE 1 IN (SELECT 2);
-- Set up some simple test tables
CREATE TABLE SUBSELECT_TBL (... | 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": true,
* "$notnull": true,
* "$type": "number"}}
* Valid cons... | the_stack |
create or replace package body oos_util_transform as
/**
* converts a ref cursor to a canonical oracle xml
* Notes:
* - This is just a wrapper for dbms_xmlgen so refer to the [Oracle documentation](http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_xmlgen.htm)
*
*
* @example
* declare
*... | the_stack |
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for mall_goods
-- ----------------------------
DROP TABLE IF EXISTS `mall_goods`;
CREATE TABLE `mall_goods` (
`id` bigint(20) NOT NULL,
`goods_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT... | the_stack |
--
-- PostgreSQL database dump
--
-- Dumped from database version 11.12 (Ubuntu 11.12-1.pgdg16.04+1)
-- Dumped by pg_dump version 12.7 (Ubuntu 12.7-0ubuntu0.20.04.1)
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_stri... | the_stack |
--
-- This script deletes the spammers from the accounts table using the
-- "selected_clean_sorted.csv" file generated by the ml_research/project work
--
-- The behavior of this script is as follows:
-- 1) Start transaction
-- 2) Drop the constraints (to improve the speed of account deletion)
-- 3) For each constraint,... | the_stack |
--
-- Copyright 2009 Inspire-Software.com
--
-- 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 b... | the_stack |
Table: DAEServerInfo
Contains one row and stores server-wide settings, as well as the Version of the DAE that
created this store.
*/
create table DAEServerInfo
(
ID nchar(2) not null default 'ID', --check (ID = 'ID'),
Name nvarchar(200) not null,
Version nvarchar(20) not null,
MaxConcurrentProcesse... | the_stack |
-- MySQL dump 10.13 Distrib 5.7.9, for osx10.9 (x86_64)
-- Server version 5.7.10
/*!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 ... | the_stack |
--
-- XDBPM_OUTPUT should be created under XDBPM
--
alter session set current_schema = XDBPM
/
create or replace package XDBPM_OUTPUT
authid CURRENT_USER
as
procedure writeOutputFileEntry(P_CONTENT VARCHAR2,P_FLUSH BOOLEAN DEFAULT FALSE);
procedure writeOutputFileEntry(P_CONTENT CLOB,P_FLUSH BOOLEAN DEFAULT FALSE)... | the_stack |
DROP SCHEMA IF EXISTS "express-admin-examples" ;
CREATE SCHEMA IF NOT EXISTS "express-admin-examples";
ALTER TABLE "purchase" DROP CONSTRAINT "item_id";
ALTER TABLE "purchase" DROP CONSTRAINT "user_id";
ALTER TABLE "recipe_has_recipe_types" DROP CONSTRAINT "recipe_id";
ALTER TABLE "recipe_has_recipe_types" DROP CONST... | the_stack |
IF OBJECT_ID('dbo.usp_bcpTableUnload', 'P') IS NULL EXECUTE ('CREATE PROCEDURE dbo.usp_bcpTableUnload AS SELECT 1');
GO
ALTER PROCEDURE [dbo].[usp_bcpTableUnload](
@path NVARCHAR(900)
, @serverName SYSNAME = @@SERVERNAME
, @databaseName SYSNAME
, @schemaName ... | the_stack |
UPDATE configuration SET version = '0.14';
REVOKE UPDATE ON configuration FROM {username};
UPDATE packages SET skip = '' WHERE skip IS NULL;
ALTER TABLE packages
ALTER COLUMN skip SET NOT NULL,
ALTER COLUMN skip SET DEFAULT '';
REVOKE INSERT,UPDATE ON packages FROM {username};
UPDATE versions SET skip = '' W... | the_stack |
;
/*!40101 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' */;
CREATE DATABASE IF NOT EXISTS `fxhermesmetadb` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `fxhermesmetadb`;
CREATE TABLE IF... | the_stack |
ALTER TABLE awa_message ADD COLUMN `count` INTEGER NOT NULL;
ALTER TABLE awa_message ADD COLUMN `entity_id` BIGINT NOT NULL;
ALTER TABLE awa_message ADD COLUMN `entity_type` INTEGER NOT NULL;
ALTER TABLE awa_message ADD COLUMN `message_type_id` BIGINT NOT NULL;
ALTER TABLE awa_message CHANGE `user_id` `user_id` BIGINT... | the_stack |
-- Migrate PullRequestComment to ReviewComment and CommentThread
ALTER TABLE comment_thread ADD COLUMN tmp_pull_request_comment_id bigint;
ALTER TABLE comment_thread ADD COLUMN tmp_commit_comment_id bigint;
ALTER TABLE review_comment ADD COLUMN tmp_pull_request_comment_id bigint;
ALTER TABLE review_comment ADD COLUMN ... | the_stack |
-- ----------------------------------------------------------------------------------------------
--
-- Utility: MyStats
--
-- Script: mystats.sql
--
-- Version: 3.0
--
-- Author: Adrian Billington
-- www.oracle-dev... | the_stack |
set define off
set verify off
set serveroutput on size 1000000
set feedback off
WHENEVER SQLERROR EXIT SQL.SQLCODE ROLLBACK
begin wwv_flow.g_import_in_progress := true; end;
/
--application/set_environment
prompt APPLICATION 102 - XFILES 1.0
--
-- Application Export:
-- Application: 102
-- Name: ... | the_stack |
------------------
-- FIXEDDECIMAL --
------------------
CREATE TYPE sys.FIXEDDECIMAL;
CREATE FUNCTION sys.fixeddecimalin(cstring, oid, int4)
RETURNS FIXEDDECIMAL
AS 'babelfishpg_money', 'fixeddecimalin'
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
CREATE FUNCTION sys.fixeddecimalout(fixeddecimal)
RETURNS cstring
AS '... | the_stack |
-- 2020-02-17T09:35:31.957Z
-- 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,Description,EntityType,IsActive,IsApplySecuritySettings,IsBetaFunctionality,IsDirectPrint,I... | the_stack |
-- 2019-01-15T11:51:50.911
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsDisplayed,IsDisplayedGrid,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSam... | the_stack |
IF OBJECT_ID('dbo.PerformanceGraph', 'P') IS NULL
BEGIN
EXEC ('CREATE PROCEDURE dbo.PerformanceGraph AS BEGIN SELECT 1 END');
END;
GO
ALTER PROCEDURE PerformanceGraph
@ShowCPUAsLines BIT = 1,
@ShowDeadlock BIT = 1,
@DeadlockBlobRadius TINYINT = 1,
@OutputDeadlockTable BIT ... | the_stack |
-- from datetimeevents
WITH
"datetimeevents" AS (SELECT subject_id, hadm_id, itemid, cgid, mimic_id as observation_id, coalesce(value,charttime)::date as observation_date, value as observation_datetime FROM datetimeevents where error is null or error = 0),
"gcpt_datetimeevents_to_concept" AS (SELECT label as value_as_... | the_stack |
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.SetLatestUpdate(
pVocabularyName => 'LPD_Belgium',
pVocabularyDate => TO_DATE ('20190501', 'yyyymmdd'),
pVocabularyVersion => 'LPD_Belgium 2019-MAY-31',
pVocabularyDevSchema => 'dev_belg'
);
END $_$
;
drop table if exists belg_source_full
;
create table belg_source_full as... | the_stack |
--11--------------------------------------------------------------------
--create a before/after update trigger on partitioned table , trigger insert a values to target table ,and cause a interval
--partition been created ,
--the real update action will cause a row movement to created partition in the trigger .
crea... | the_stack |
-- 2017-06-03T13:28:59.766
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_UI_ElementGroup SET UIStyle='',Updated=TO_TIMESTAMP('2017-06-03 13:28:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_ElementGroup_ID=1000015
;
-- 2017-06-03T13:29:12.385
-- I forgot to set the DICTIONARY_ID_C... | the_stack |
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for t_order
-- ----------------------------
DROP TABLE IF EXISTS `t_order`;
CREATE TABLE `t_order` (
`id` bigint NOT NULL COMMENT '订单id',
`tenant_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '租户ID',
`s... | the_stack |
--
-- Copyright 2019 The Android Open Source Project
--
-- 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
--
-- https://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applica... | the_stack |
CREATE OR REPLACE FUNCTION M_DiscountSchemaLine_TransformPrices
(
dsl M_DiscountSchemaLine
, p_PriceList numeric
, p_PriceStd numeric
, p_PriceLimit numeric
, p_Source_Currency_ID numeric
, p_Target_Currency_ID numeric
, p_Conv_Client_ID numeric
, p_Conv_Org_ID numeric
, p_ApplyDiscountSchema boolean = true
,... | the_stack |
SET NAMES utf8mb4;
CREATE DATABASE IF NOT EXISTS `job_crontab` DEFAULT CHARACTER SET utf8mb4;
USE job_crontab;
/**
业务定时任务信息存储表
用于存储用户创建的定时任务信息
*/
CREATE TABLE IF NOT EXISTS `cron_job`
(
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`row_create_time` datetime NOT NULL D... | the_stack |
--
-- One purpose of these tests is to make sure that ORCA can handle all these
-- queries, and not fall back to the Postgres planner. To detect that,
-- turn optimizer_trace_fallback on, and watch for "falling back to planner"
-- messages.
--
set optimizer_trace_fallback='on';
-- Query 1
SELECT GROUPING(product.pname... | the_stack |
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for sys_log
-- ----------------------------
DROP TABLE IF EXISTS `sys_log`;
CREATE TABLE `sys_log` (
`LOG_ID` int(11) NOT NULL AUTO_INCREMENT,
`ACTION` varchar(500) DEFAULT NULL,
`PARAMETERS` varchar(500) DEFAULT NULL,
`RES` varchar(5... | the_stack |
-- 2018-06-20T19:04:05.664
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM AD_Field_Trl WHERE AD_Field_ID=564776
;
-- 2018-06-20T19:04:05.673
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM AD_Field WHERE AD_Field_ID=564776
;
-- 2018-06-20T19:04:05.844
-- I... | the_stack |
BEGIN;
-- insert seed data for basic user/platform/project/reward
\i /specs/sql-support/insert_platform_user_project.sql
\i /specs/sql-support/payment_json_build_helpers.sql
select plan(28);
select function_returns(
'payment_service_api', 'upgrade_subscription', ARRAY['json'], 'json'
)... | the_stack |
SELECT id INTO @op_owner FROM users WHERE slug='adefaultuser';
INSERT INTO operations(`slug`, `name`, `description`, active, `status`) VALUES
('gantt-test', 'Gantt Test', 'An operation viewing overview', 1, 0);
SELECT id INTO @op_id FROM operations WHERE slug='gantt-test';
INSERT INTO user_operation_permissi... | the_stack |
USE [DBA]
GO
/****** Object: Table [dbo].[UnusedIndexes] Script Date: 3/3/2021 2:33:13 PM ******/
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[UnusedIndexes]') AND type in (N'U'))
DROP TABLE [dbo].[UnusedIndexes]
GO
/****** Object: Table [dbo].[UnusedIndexes] Script Date: 3/3/202... | the_stack |
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[DatabaseBackup]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'CREATE PROCEDURE [dbo].[DatabaseBackup] AS'
END
GO
ALTER PROCEDURE [dbo].[DatabaseBackup]
@... | the_stack |
;
/*!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 ... | the_stack |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.