Участник
Регистрация: 06.03.2003
Адрес: Украина, Киев
|
Вот такую ошибку выдает при создании конфигурации:
Программе не удалось установить хранимые процедуры интеграции.
Описание процедуры:
PHP код:
/*
* Exec only in Axapta for SKU Levels.
*
*/
CREATE proc dbo.DP_LOW_LEVELS
as
declare @erpCompany char(3)
SET @erpCompany = ''
SELECT @erpCompany = CON_ERP_COMPANY
from
MBS_CONFIGURATION
declare @skuUse char(1)
SET @skuUse = 'F'
select @skuUse = SKU_USE
from
MBS_SKU_HIERARCHY
if( @skuUse = 'F' )
begin
DELETE FROM [SLAVA].[AXDB].[dbo].[MBS_SKU_MAPPINGS]
INSERT INTO [SLAVA].[AXDB].[dbo].[MBS_SKU_MAPPINGS]
([DP_SKU], [ITEM_ID], [START_ITEM_ID], [COLOR_ID], [SIZE_ID], [CONFIG_ID], [CAT_CODE], [DATA_AREA_ID])
SELECT DISTINCT B_ENTITY_IDEN, B_ENTITY_IDEN, B_ENTITY_IDEN, '', '', '', CAT_CODE, @erpCompany
FROM BASE_ENTITIES, MBS_ITEM_DIMENSION_VIEW
WHERE B_ENTITY_IDEN = ITW_ITEM_ID
return
end
declare @SKU_IDEN varchar (80)
declare @ITEM_IDEN varchar (80)
declare @T_ITEM_IDEN varchar (80)
declare @ITEM_CODE int
declare @MAX_ENTITY_CODE int
declare @V_COLOR nvarchar(40)
declare @V_SIZE nvarchar(40)
declare @V_CONF nvarchar(40)
exec DP_MBS_LANG 'Color', @V_COLOR output
exec DP_MBS_LANG 'Size', @V_SIZE output
exec DP_MBS_LANG 'Conf', @V_CONF output
declare @V_SKU_UPPER nvarchar(40)
declare @V_SKU_MEDIUM nvarchar(40)
declare @V_SKU_LOWER nvarchar(40)
SET @V_SKU_UPPER=''
SET @V_SKU_MEDIUM=''
SET @V_SKU_LOWER=''
declare @V_SKU_CAT nvarchar(40)
declare @LEVEL_SKU_CAT int
declare @PLANNER varchar( 5 )
DELETE FROM MBS_SKU_DIMENSIONS
delete from [SLAVA].[AXDB].[dbo].MBS_SKU_MAPPINGS;
DELETE FROM CATEGORIES_HRCY WHERE CAT_F_CODE>=9000 or CAT_S_CODE>=9000
DELETE FROM APPLICATIONS_CATEGORIES WHERE CAT_CODE>=9000
DELETE FROM CATEGORIES_POSITIONS WHERE CAT_CODE>=9000
DELETE FROM INDICATORS_CATEGORIES WHERE
CAT_BE_CODE>=9000 OR CAT_MK_CODE>=9000
OR CAT_BK_CODE>=9000 OR CAT_ME_CODE>=9000
DELETE FROM CATEGORIES WHERE CAT_CODE>=9000
declare @lang_Item_value nvarchar( 80 )
declare @item_cat_code int
exec DP_MBS_LANG 'Item', @lang_Item_value output
declare @existsCOLORID INT
declare @existsSIZEID INT
declare @existsCONFIGID INT
declare @numSkuLevels INT
SET @existsCOLORID = 0
IF EXISTS( SELECT 1 FROM [SLAVA].[AXDB].[dbo].SYSCOLUMNS
WHERE ID = ( SELECT ID FROM [SLAVA].[AXDB].[dbo].SYSOBJECTS
WHERE NAME = 'INVENTDIMCOMBINATION' AND XTYPE = 'U')
AND NAME = 'INVENTCOLORID' )
SET @existsCOLORID = 1
SET @existsSIZEID = 0
IF EXISTS( SELECT 1 FROM [SLAVA].[AXDB].[dbo].SYSCOLUMNS
WHERE ID = ( SELECT ID FROM [SLAVA].[AXDB].[dbo].SYSOBJECTS
WHERE NAME = 'INVENTDIMCOMBINATION' AND XTYPE = 'U')
AND NAME = 'INVENTSIZEID' )
SET @existsSIZEID = 1
SET @existsCONFIGID = 0
IF EXISTS( SELECT 1 FROM [SLAVA].[AXDB].[dbo].SYSCOLUMNS
WHERE ID = ( SELECT ID FROM [SLAVA].[AXDB].[dbo].SYSOBJECTS
WHERE NAME = 'INVENTDIMCOMBINATION' AND XTYPE = 'U')
AND NAME = 'CONFIGID' )
SET @existsCONFIGID = 1
SET @numSkuLevels = @existsCOLORID + @existsSIZEID + @existsCONFIGID
SELECT @V_SKU_UPPER=
case
when [SKU_UPPER] = 'C' then @V_COLOR
when [SKU_UPPER] = 'S' then @V_SIZE
when [SKU_UPPER] = 'F' then @V_CONF
end
FROM [MBS_SKU_HIERARCHY]
if not (@V_SKU_UPPER is null)
begin
INSERT INTO [MBS_SKU_DIMENSIONS]([SKU_ORDER], [SKU_DIM_NAME])
VALUES(1, @V_SKU_UPPER)
end
SELECT @V_SKU_MEDIUM=
case
when [SKU_MEDIUM] = 'C' then @V_COLOR
when [SKU_MEDIUM] = 'S' then @V_SIZE
when [SKU_MEDIUM] = 'F' then @V_CONF
end
FROM [MBS_SKU_HIERARCHY]
if not (@V_SKU_MEDIUM is null)
begin
INSERT INTO [MBS_SKU_DIMENSIONS]([SKU_ORDER], [SKU_DIM_NAME])
VALUES(2, @V_SKU_MEDIUM)
end
SELECT @V_SKU_LOWER=
case
when [SKU_LOWER] = 'C' then @V_COLOR
when [SKU_LOWER] = 'S' then @V_SIZE
when [SKU_LOWER] = 'F' then @V_CONF
end
FROM [MBS_SKU_HIERARCHY]
if not (@V_SKU_LOWER is null)
begin
INSERT INTO [MBS_SKU_DIMENSIONS]([SKU_ORDER], [SKU_DIM_NAME])
VALUES(3, @V_SKU_LOWER)
end
declare SKU_CATEGORIES cursor for
select
L.SKU_DIM_NAME
from
MBS_SKU_DIMENSIONS L
where
L.SKU_DIM_NAME=@V_SKU_UPPER
UNION
select
L.SKU_DIM_NAME+'_'+M.SKU_DIM_NAME
from
MBS_SKU_DIMENSIONS L,MBS_SKU_DIMENSIONS M
WHERE
L.SKU_DIM_NAME<>M.SKU_DIM_NAME
AND L.SKU_DIM_NAME=@V_SKU_UPPER AND M.SKU_DIM_NAME=@V_SKU_MEDIUM
UNION
select
L.SKU_DIM_NAME+'_'+M.SKU_DIM_NAME+'_'+U.SKU_DIM_NAME
from
MBS_SKU_DIMENSIONS L,MBS_SKU_DIMENSIONS M,MBS_SKU_DIMENSIONS U
WHERE
L.SKU_DIM_NAME<>M.SKU_DIM_NAME
AND M.SKU_DIM_NAME<>U.SKU_DIM_NAME
AND L.SKU_DIM_NAME=@V_SKU_UPPER AND M.SKU_DIM_NAME=@V_SKU_MEDIUM AND U.SKU_DIM_NAME=@V_SKU_LOWER
open SKU_CATEGORIES
fetch next from SKU_CATEGORIES into @V_SKU_CAT
SET @LEVEL_SKU_CAT=0
while (@@FETCH_STATUS=0)
begin
if @LEVEL_SKU_CAT=2 AND @V_SKU_LOWER<>'' AND @numSkuLevels = 3
begin
INSERT INTO CATEGORIES (CAT_CODE, CAT_IDEN, CAT_DESC,CAT_SEVERITY,HRCY_FLAG,FLAG)
VALUES(9002,@V_SKU_CAT,@V_SKU_CAT,0,0,0)
INSERT INTO [CATEGORIES_HRCY]([CAT_F_CODE], [CAT_S_CODE])
VALUES(9001, 9002)
PRINT @V_SKU_LOWER
DECLARE @lowerLevelSQLString NVARCHAR(4000)
SET @lowerLevelSQLString = dbo.GET_LOWER_SKU_LEVEL_SQL_STRING( @existsCOLORID, @existsSIZEID, @existsCONFIGID,
@erpCompany, @V_SKU_UPPER, @V_SKU_MEDIUM, @V_SKU_LOWER, @V_COLOR, @V_SIZE, @V_CONF, @lang_Item_value )
EXEC sp_executesql @lowerLevelSQLString
declare @ITEM_DESC char(255)
declare SKU_C_ENTITY_LOWER cursor for
SELECT
DP_SKU,START_ITEM_ID,ITEM_ID
FROM
[SLAVA].[AXDB].[dbo].MBS_SKU_MAPPINGS
WHERE CAT_CODE=9002
UNION
SELECT DISTINCT
ITW_ITEM_ID+'_UNDEF_UNDEF_UNDEF' AS NEWSKU,ITW_ITEM_ID+'_UNDEF_UNDEF',ITW_ITEM_ID
FROM
MBS_ITEM_DIMENSION_VIEW IV
WHERE IV.ITW_ITEM_ID NOT IN
(
SELECT DISTINCT ITW_ITEM_ID
FROM
MBS_ITEM_DIMENSION_VIEW V,
[SLAVA].[AXDB].[dbo].INVENTDIMCOMBINATION idc
WHERE
V.ITW_ITEM_ID=ITEMID
)
AND ITW_ATT_VALUE IN ( select ITM_DP_IDEN from MBS_ITEMS )
open SKU_C_ENTITY_LOWER
fetch next from SKU_C_ENTITY_LOWER into @SKU_IDEN,@T_ITEM_IDEN,@ITEM_IDEN
while( @@FETCH_STATUS = 0 )
begin
SET @ITEM_DESC=''
SELECT
@ITEM_DESC=IDW_ATT_VALUE
FROM
MBS_ITEM_DESC_VIEW
WHERE IDW_ITEM_ID=@ITEM_IDEN
SET @ITEM_CODE=-1
SELECT @ITEM_CODE=B_ENTITY_CODE
FROM BASE_ENTITIES
WHERE B_ENTITY_IDEN=@T_ITEM_IDEN
exec DP_ASSOCIATE_ITEMS_GET_PLANNER @ITEM_IDEN, @PLANNER output
if (@ITEM_CODE=-1)
begin
SELECT
@MAX_ENTITY_CODE = isnull( max( B_ENTITY_CODE ) + 1, 1 )
FROM
BASE_ENTITIES
INSERT INTO
BASE_ENTITIES ( [B_ENTITY_CODE], [B_ENTITY_IDEN], [B_ENTITY_CLASS], [B_ENTITY_DESC], [CAT_CODE], [PLANNER] )
VALUES ( @MAX_ENTITY_CODE, @T_ITEM_IDEN, '-', @ITEM_DESC, 9002, @PLANNER )
SET @ITEM_CODE=@MAX_ENTITY_CODE
end
if (@ITEM_CODE<>-1)
begin
SELECT
@MAX_ENTITY_CODE = isnull( max( B_ENTITY_CODE ) + 1, 1 )
FROM
BASE_ENTITIES
INSERT INTO
BASE_ENTITIES ( [B_ENTITY_CODE], [B_ENTITY_IDEN], [B_ENTITY_CLASS], [B_ENTITY_DESC], [CAT_CODE], [PLANNER] )
VALUES ( @MAX_ENTITY_CODE, @SKU_IDEN, '-', @ITEM_DESC, 9002, @PLANNER )
INSERT INTO B_ENTITIES_HRCY ([B_ENTITY_F_CODE], [B_ENTITY_CODE])
VALUES (@ITEM_CODE, @MAX_ENTITY_CODE)
end
fetch next from SKU_C_ENTITY_LOWER into @SKU_IDEN,@T_ITEM_IDEN,@ITEM_IDEN
end
close SKU_C_ENTITY_LOWER
deallocate SKU_C_ENTITY_LOWER
end
if @LEVEL_SKU_CAT=1 AND @V_SKU_MEDIUM<>'' AND @numSkuLevels >= 2
begin
INSERT INTO CATEGORIES (CAT_CODE, CAT_IDEN, CAT_DESC,CAT_SEVERITY,HRCY_FLAG,FLAG)
VALUES(9001,@V_SKU_CAT,@V_SKU_CAT,0,0,0)
INSERT INTO [CATEGORIES_HRCY]([CAT_F_CODE], [CAT_S_CODE])
VALUES(9000,9001)
PRINT @V_SKU_MEDIUM
DECLARE @mediumLevelSQLString NVARCHAR(4000)
SET @mediumLevelSQLString = dbo.GET_MEDIUM_SKU_LEVEL_SQL_STRING( @existsCOLORID, @existsSIZEID, @existsCONFIGID,
@erpCompany, @V_SKU_UPPER, @V_SKU_MEDIUM, @V_COLOR, @V_SIZE, @V_CONF )
EXEC sp_executesql @mediumLevelSQLString
insert into [SLAVA].[AXDB].[dbo].MBS_SKU_MAPPINGS
(DP_SKU,START_ITEM_ID,ITEM_ID,CAT_CODE,COLOR_ID,SIZE_ID,CONFIG_ID,DATA_AREA_ID)
SELECT DISTINCT
S.DP_SKU + '_UNDEF' AS NEWSKU, S.DP_SKU, S.ITEM_ID, 9001, '', '', '', @erpCompany
FROM
[SLAVA].[AXDB].[dbo].MBS_SKU_MAPPINGS S
WHERE
S.CAT_CODE = 9000
AND S.START_ITEM_ID IN
(
SELECT DISTINCT
START_ITEM_ID
FROM
[SLAVA].[AXDB].[dbo].MBS_SKU_MAPPINGS S
WHERE
S.CAT_CODE = 9000
AND COLOR_ID = ''
AND SIZE_ID = ''
AND CONFIG_ID = ''
)
AND S.ITEM_ID NOT IN
(
SELECT DISTINCT
ITEM_ID
FROM
[SLAVA].[AXDB].[dbo].MBS_SKU_MAPPINGS S
WHERE
S.CAT_CODE = 9001
)
declare @SSQL NVARCHAR( 4000 );
SET @SSQL = ' DELETE FROM [SLAVA].[AXDB].[dbo].[MBS_SKU_MAPPINGS]
WHERE CAT_CODE=9001
AND [PROG] NOT IN (
SELECT [PROG] FROM [SLAVA].[AXDB].[dbo].[MBS_SKU_MAPPINGS] S,[SLAVA].[AXDB].[dbo].[INVENTDIMCOMBINATION] idc
WHERE CAT_CODE=9001
AND idc.ITEMID=S.ITEM_ID '
if ((@V_SKU_UPPER=@V_CONF) or (@V_SKU_MEDIUM=@V_CONF) )
begin
SET @SSQL= @SSQL + ' AND idc.CONFIGID=S.CONFIG_ID '
end
if ((@V_SKU_UPPER=@V_SIZE) or (@V_SKU_MEDIUM=@V_SIZE) )
begin
SET @SSQL= @SSQL + ' AND idc.INVENTSIZEID=S.SIZE_ID '
end
if ((@V_SKU_UPPER=@V_COLOR) or (@V_SKU_MEDIUM=@V_COLOR) )
begin
SET @SSQL= @SSQL + ' AND idc.INVENTCOLORID=S.COLOR_ID '
end
SET @SSQL= @SSQL + ')'
declare SKU_C_ENTITY_MEDIUM cursor for
SELECT
DP_SKU,START_ITEM_ID,ITEM_ID
FROM
[SLAVA].[AXDB].[dbo].MBS_SKU_MAPPINGS
WHERE CAT_CODE=9001
open SKU_C_ENTITY_MEDIUM
fetch next from SKU_C_ENTITY_MEDIUM into @SKU_IDEN,@T_ITEM_IDEN,@ITEM_IDEN
while( @@FETCH_STATUS = 0 )
begin
SET @ITEM_DESC=''
SELECT
@ITEM_DESC=IDW_ATT_VALUE
FROM
MBS_ITEM_DESC_VIEW
WHERE IDW_ITEM_ID=@ITEM_IDEN
SET @ITEM_CODE=-1
SELECT
@ITEM_CODE=B_ENTITY_CODE
FROM
BASE_ENTITIES
WHERE B_ENTITY_IDEN=@T_ITEM_IDEN
exec DP_ASSOCIATE_ITEMS_GET_PLANNER @ITEM_IDEN, @PLANNER output
if (@ITEM_CODE=-1)
begin
SELECT
@MAX_ENTITY_CODE = isnull( max( B_ENTITY_CODE ) + 1, 1 )
FROM
BASE_ENTITIES
INSERT INTO
BASE_ENTITIES ( [B_ENTITY_CODE], [B_ENTITY_IDEN], [B_ENTITY_CLASS], [B_ENTITY_DESC], [CAT_CODE], [PLANNER] )
VALUES ( @MAX_ENTITY_CODE, @T_ITEM_IDEN, '-', @ITEM_DESC, 9001, @PLANNER )
SET @ITEM_CODE=@MAX_ENTITY_CODE
end
if (@ITEM_CODE<>-1)
begin
SELECT
@MAX_ENTITY_CODE = isnull( max( B_ENTITY_CODE ) + 1, 1 )
FROM
BASE_ENTITIES
INSERT INTO
BASE_ENTITIES ( [B_ENTITY_CODE], [B_ENTITY_IDEN], [B_ENTITY_CLASS], [B_ENTITY_DESC], [CAT_CODE], [PLANNER] )
VALUES ( @MAX_ENTITY_CODE, @SKU_IDEN, '-', @ITEM_DESC, 9001, @PLANNER )
INSERT INTO B_ENTITIES_HRCY ([B_ENTITY_F_CODE], [B_ENTITY_CODE])
VALUES (@ITEM_CODE, @MAX_ENTITY_CODE)
end
fetch next from SKU_C_ENTITY_MEDIUM into @SKU_IDEN,@T_ITEM_IDEN,@ITEM_IDEN
end
close SKU_C_ENTITY_MEDIUM
deallocate SKU_C_ENTITY_MEDIUM
end
if @LEVEL_SKU_CAT=0 AND @V_SKU_UPPER<>'' AND @numSkuLevels >= 1
begin
INSERT INTO CATEGORIES (CAT_CODE, CAT_IDEN, CAT_DESC,CAT_SEVERITY,HRCY_FLAG,FLAG)
VALUES(9000,@V_SKU_CAT,@V_SKU_CAT,0,0,0)
SELECT @item_cat_code=CAT_CODE FROM CATEGORIES WHERE rtrim(@lang_Item_value)=CAT_IDEN
INSERT INTO [CATEGORIES_HRCY]([CAT_F_CODE], [CAT_S_CODE])
VALUES(@item_cat_code,9000)
PRINT @V_SKU_UPPER
DECLARE @upperLevelSQLString NVARCHAR(4000)
SET @upperLevelSQLString = dbo.GET_UPPER_SKU_LEVEL_SQL_STRING( @existsCOLORID, @existsSIZEID, @existsCONFIGID,
@erpCompany, @V_SKU_UPPER, @V_COLOR, @V_SIZE, @V_CONF, @lang_Item_value )
EXEC sp_executesql @upperLevelSQLString
declare SKU_C_ENTITY_UPPER cursor for
SELECT
DP_SKU,START_ITEM_ID,ITEM_ID
FROM
[SLAVA].[AXDB].[dbo].MBS_SKU_MAPPINGS
WHERE CAT_CODE=9000
UNION
SELECT ITW_ITEM_ID+'_UNDEF' AS NEWSKU,ITW_ITEM_ID,ITW_ITEM_ID
FROM
MBS_ITEM_DIMENSION_VIEW IV
WHERE IV.ITW_ITEM_ID NOT IN
(
select DISTINCT ITW_ITEM_ID
from
MBS_ITEM_DIMENSION_VIEW V,
[SLAVA].[AXDB].[dbo].INVENTDIMCOMBINATION idc
WHERE
V.ITW_ITEM_ID=ITEMID
)
open SKU_C_ENTITY_UPPER
fetch next from SKU_C_ENTITY_UPPER into @SKU_IDEN,@T_ITEM_IDEN,@ITEM_IDEN
while( @@FETCH_STATUS = 0 )
begin
SET @ITEM_DESC=''
SELECT
@ITEM_DESC=IDW_ATT_VALUE
FROM
MBS_ITEM_DESC_VIEW
WHERE IDW_ITEM_ID=@ITEM_IDEN
SET @ITEM_CODE=-1
SELECT
@ITEM_CODE=B_ENTITY_CODE
FROM
BASE_ENTITIES
WHERE B_ENTITY_IDEN=@T_ITEM_IDEN
if (@ITEM_CODE<>-1)
begin
SELECT
@MAX_ENTITY_CODE = isnull( max( B_ENTITY_CODE ) + 1, 1 )
FROM
BASE_ENTITIES
exec DP_ASSOCIATE_ITEMS_GET_PLANNER @ITEM_IDEN, @PLANNER output
INSERT INTO
BASE_ENTITIES ( [B_ENTITY_CODE], [B_ENTITY_IDEN], [B_ENTITY_CLASS], [B_ENTITY_DESC], [CAT_CODE], [PLANNER] )
VALUES ( @MAX_ENTITY_CODE, @SKU_IDEN, '-', @ITEM_DESC, 9000, @PLANNER )
INSERT INTO B_ENTITIES_HRCY ([B_ENTITY_F_CODE], [B_ENTITY_CODE])
VALUES (@ITEM_CODE, @MAX_ENTITY_CODE)
end
fetch next from SKU_C_ENTITY_UPPER into @SKU_IDEN,@T_ITEM_IDEN,@ITEM_IDEN
end
close SKU_C_ENTITY_UPPER
deallocate SKU_C_ENTITY_UPPER
end
SET @LEVEL_SKU_CAT=@LEVEL_SKU_CAT+1
fetch next from SKU_CATEGORIES into @V_SKU_CAT
end
CLOSE SKU_CATEGORIES
DEALLOCATE SKU_CATEGORIES
declare @num int
SELECT @num = count(*) FROM MBS_SKU_DIMENSIONS
if (@num=3)
begin
INSERT INTO [SLAVA].[AXDB].[dbo].MBS_SKU_MAPPINGS([DP_SKU], [ITEM_ID], [START_ITEM_ID], [COLOR_ID], [SIZE_ID], [CONFIG_ID], [CAT_CODE], [DATA_AREA_ID])
SELECT DISTINCT ITW_ITEM_ID+'_UNDEF_UNDEF_UNDEF',ITW_ITEM_ID,ITW_ITEM_ID,'','','',0,@erpCompany
FROM MBS_ITEM_DIMENSION_VIEW DV
WHERE ITW_ITEM_ID NOT IN ( SELECT ITEM_ID FROM [SLAVA].[AXDB].[dbo].MBS_SKU_MAPPINGS )
end
if (@num=2)
begin
INSERT INTO [SLAVA].[AXDB].[dbo].MBS_SKU_MAPPINGS([DP_SKU], [ITEM_ID], [START_ITEM_ID], [COLOR_ID], [SIZE_ID], [CONFIG_ID], [CAT_CODE], [DATA_AREA_ID])
SELECT DISTINCT ITW_ITEM_ID+'_UNDEF_UNDEF',ITW_ITEM_ID,ITW_ITEM_ID,'','','',0,@erpCompany
FROM MBS_ITEM_DIMENSION_VIEW DV
WHERE ITW_ITEM_ID NOT IN ( SELECT ITEM_ID FROM [SLAVA].[AXDB].[dbo].MBS_SKU_MAPPINGS )
end
if (@num=1)
begin
INSERT INTO [SLAVA].[AXDB].[dbo].MBS_SKU_MAPPINGS([DP_SKU], [ITEM_ID], [START_ITEM_ID], [COLOR_ID], [SIZE_ID], [CONFIG_ID], [CAT_CODE], [DATA_AREA_ID])
SELECT DISTINCT ITW_ITEM_ID+'_UNDEF',ITW_ITEM_ID,ITW_ITEM_ID,'','','',0,@erpCompany
FROM MBS_ITEM_DIMENSION_VIEW DV
WHERE ITW_ITEM_ID NOT IN ( SELECT ITEM_ID FROM [SLAVA].[AXDB].[dbo].MBS_SKU_MAPPINGS )
end
if (@num=0)
begin
INSERT INTO [SLAVA].[AXDB].[dbo].MBS_SKU_MAPPINGS ([DP_SKU], [ITEM_ID], [START_ITEM_ID], [COLOR_ID], [SIZE_ID], [CONFIG_ID], [CAT_CODE], [DATA_AREA_ID])
SELECT DISTINCT ITW_ITEM_ID,ITW_ITEM_ID,ITW_ITEM_ID,'','','',0,@erpCompany
FROM MBS_ITEM_DIMENSION_VIEW DV
WHERE ITW_ITEM_ID NOT IN ( SELECT ITEM_ID FROM [SLAVA].[AXDB].[dbo].MBS_SKU_MAPPINGS)
end
Удостоверьтесь, что файл main_script.sql в каталоге приложения не поврежден.
|