Print ''
Print '-------------------------------------------------------------------------'
Print ' using Database: #DB_N#'
Print ' Table         : Execute: ...\Resources\JobMgrSQL\_JFTSql_20_ExecuteImportTest.sql]'
Print ' Creation Date : 22.03.2006'
Print ' Last Update   : 05.07.2021'
Print ' Autor         : J.Feuerstein'
Print '-------------------------------------------------------------------------'

use [#DB_N#]
GO

-- declare @ObjectClass nvarchar(10)
-- set @ObjectClass = 1234567890
-- print '[' + substring(@ObjectClass,15,20) + ']'

-- Create Procedure Objects_tbl_Object_GetDS  @Id               uniqueidentifier = null,  -- #New: 05.04.2013
--                                            @ObjectCliName    nvarchar(255),
--                                            @ObjectName       nvarchar(255),  -- new 28.01.2011 09:48 J.Fes
--                                            @ObjectPuid       nvarchar(64),   -- change A.Becker 22.08.2012: Puid Feld von 15 auf 32 Zeichen erweitert
--                                            @ObjectFromSiteID nvarchar(32),
--                                            @ObjectClass      nvarchar(10)

-- EXECUTE Objects_tbl_Object_GetDS NULL, '', 'ug0002644291/0', '', 'mxgb', 'IR'
EXECUTE zzzzzDebugTbl_Empty
Declare @MyActionMsg1 nvarchar (128),
        @RowsUpdated int

set @MyActionMsg1='XXX'
set @RowsUpdated = -1

EXECUTE Objects_tbl_DS_AssignToIR @ObjectFromSiteId='mxgb',
                                  @DSPuid='ug0002644292',
                                  @IRPuid='ug0002644291/0',
                                  @RowsUpdatedN_r=@RowsUpdated Output,
                                  @ResultMsg_r=@MyActionMsg1 Output

-- EXECUTE Objects_tbl_DS_AssignToIR  'mxgb', 'ug0002644291', 'ug0002644291/0', @MyActionMsg1 Output
-- EXECUTE Objects_tbl_DS_AssignToIR  'mxgb', 'ug0002644293', 'ug0002644293/0', @MyActionMsg1 Output
-- EXECUTE Objects_tbl_DS_AssignToIR  'mxgb', 'ug0002644292', 'ug0002644291/0', @MyActionMsg1 Output

Print ('DONE Objects_tbl_DS_AssignToIR Result:' + @MyActionMsg1 + '-//- Updated:' + CAST(@RowsUpdated AS VARCHAR(10)) + '(n)')

Print '------------------------------------------------------------------------'
GO

-- Declare @MyActionMsg1 nvarchar (max)
--
--
-- ------------------------------------------------------------------------------
-- EndeExit:
--  Print '------------------------------------------------------------------------'
--  Print (@MyActionMsg1)
--  Print ('   |-> Done on Database: #DB_N#')
--  Print '------------------------------------------------------------------------'
--
-- GO
