init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,41 @@
|
|||
DROP PROCEDURE IF EXISTS dev.uspDropSchemaAndOthers
|
||||
GO
|
||||
|
||||
CREATE PROCEDURE dev.uspDropSchemaAndOthers
|
||||
@pIntezmenyAzonositok nvarchar(500)
|
||||
AS
|
||||
BEGIN
|
||||
DECLARE @schemaName nvarchar(100)
|
||||
,@message nvarchar(200)
|
||||
|
||||
DECLARE intCursor CURSOR FAST_FORWARD READ_ONLY FOR
|
||||
SELECT 'KR_' + LTRIM(RTRIM(ss.value)) + '_Schema'
|
||||
FROM STRING_SPLIT(@pIntezmenyAzonositok, ',') ss
|
||||
|
||||
OPEN intCursor
|
||||
|
||||
FETCH NEXT FROM intCursor
|
||||
INTO @schemaName
|
||||
|
||||
WHILE @@FETCH_STATUS = 0 BEGIN
|
||||
SET @message = 'Drop spfn - ' + @schemaName
|
||||
RAISERROR (@message, 10, 1) WITH NOWAIT
|
||||
EXEC dev.uspDropSchemaSPFN NULL, @schemaName
|
||||
|
||||
SET @message = 'Drop view - ' + @schemaName
|
||||
RAISERROR (@message, 10, 1) WITH NOWAIT
|
||||
EXEC dev.uspDropSchemaViews NULL, @schemaName
|
||||
|
||||
SET @message = 'Drop schema - ' + @schemaName
|
||||
RAISERROR (@message, 10, 1) WITH NOWAIT
|
||||
EXEC dev.uspDropSchema @schemaName
|
||||
|
||||
FETCH NEXT FROM intCursor
|
||||
INTO @schemaName
|
||||
END
|
||||
|
||||
CLOSE intCursor
|
||||
DEALLOCATE intCursor
|
||||
|
||||
END
|
||||
GO
|
Loading…
Add table
Add a link
Reference in a new issue