Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -334,3 +334,12 @@ begin
truncate table dbo.nrt_srte_Zipcnty_code_value;
insert into dbo.nrt_srte_Zipcnty_code_value select * from nbs_srte.dbo.Zipcnty_code_value;
end;


-- Ensure dbo.Condition table is populated
DECLARE @condition_cd_list VARCHAR(MAX)

SELECT @condition_cd_list = STRING_AGG(CAST(CONDITION_CD AS VARCHAR), ',')
FROM dbo.nrt_srte_Condition_code

EXEC dbo.sp_nrt_srte_condition_code_postprocessing @condition_cd_list = @condition_cd_list;
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
-- Create RDB_DATE reference table if it does not yet exist.

IF NOT EXISTS (SELECT 1 FROM sysobjects WHERE name = 'RDB_DATE' AND xtype = 'U')
Comment thread
hawley-skylight marked this conversation as resolved.
BEGIN
CREATE TABLE RDB_DATE (
DATE_MM_DD_YYYY datetime,
DAY_OF_WEEK varchar(10),
DAY_NBR_IN_CLNDR_MON numeric(4, 0),
DAY_NBR_IN_CLNDR_YR numeric(4, 0),
WK_NBR_IN_CLNDR_MON numeric(4, 0),
WK_NBR_IN_CLNDR_YR numeric(4, 0),
CLNDR_MON_NAME varchar(20),
CLNDR_MON_IN_YR numeric(4, 0),
CLNDR_QRTR numeric(4, 0),
CLNDR_YR numeric(18, 0),
DATE_KEY bigint NOT NULL PRIMARY KEY
)
END

-- Insert NULL row (key = 1) if it doesn't exist
IF NOT EXISTS (SELECT 1 FROM RDB_DATE WHERE DATE_KEY = 1)
BEGIN
INSERT INTO RDB_DATE (DATE_KEY) VALUES (1)
END

Original file line number Diff line number Diff line change
Expand Up @@ -3148,3 +3148,12 @@ databaseChangeLog:
path: 008-fn_get_value_to_pascal_case-001.sql
splitStatements: true
endDelimiter: GO
- changeSet:
id: 956
author: liquibase
runOnChange: true
changes:
- sqlFile:
path: 258-create_rdb_date-001.sql
splitStatements: true
endDelimiter: GO