https://drive.google.com/file/d/14bXG1fyxZCbehwAVJIHvBv6TdTwKPz0s/view
I get this error every time I try to import an application, whats going wrong?
Like
Hello,
Please use the following script:
CREATE OR REPLACE FUNCTION "GetInstallPkgInfo"()
RETURNS TABLE (
"Product" VARCHAR(250),
"ConfigurationVersion" VARCHAR(250),
"PrimaryCulture" VARCHAR(250)
)
AS $$
DECLARE
Product VARCHAR(250);
AppName VARCHAR(250) = 'creatio';
UseAppName BOOL = FALSE;
ConfigurationVersion VARCHAR(250);
PrimaryCulture VARCHAR(250);
SysAdminUnit_AllUsers UUID = 'A29A3BA5-4B0D-DE11-9A51-005056C00008';
HasBankSales BOOL;
HasBankCustomerJourney BOOL;
HasLending BOOL;
HasMarketing BOOL;
HasSalesEnterprise BOOL;
HasSalesCommerce BOOL;
HasSalesTeam BOOL;
HasServiceEnterprise BOOL;
HasCustomerCenter BOOL;
HasStudio BOOL;
HasAlmPortal BOOL;
HasAlmProxy BOOL;
BEGIN
SELECT
ssv."TextValue"
INTO ConfigurationVersion
FROM "SysSettingsValue" ssv
INNER JOIN "SysSettings" ss ON ss."Id" = ssv."SysSettingsId"
WHERE ss."Code" = 'ConfigurationVersion'
AND ssv."SysAdminUnitId" = SysAdminUnit_AllUsers;
SELECT
c."Name"
INTO PrimaryCulture
FROM "SysSettingsValue" ssv
INNER JOIN "SysSettings" ss ON ss."Id" = ssv."SysSettingsId"
INNER JOIN "SysCulture" c ON c."Id" = ssv."GuidValue"
WHERE ss."Code" = 'PrimaryCulture'
AND ssv."SysAdminUnitId" = SysAdminUnit_AllUsers;
--region check root packages
IF EXISTS (SELECT 1 FROM "SysPackage" WHERE "Name" LIKE 'BankSalesSoftkey%') THEN
HasBankSales = TRUE;
END IF;
IF EXISTS (SELECT 1 FROM "SysPackage" WHERE "Name" LIKE 'BankOnboardingSoftkey%') THEN
HasBankCustomerJourney = TRUE;
END IF;
IF EXISTS (SELECT 1 FROM "SysPackage" WHERE "Name" LIKE 'Lending%') THEN
HasLending = TRUE;
END IF;
IF EXISTS (SELECT 1 FROM "SysPackage" WHERE "Name" LIKE 'MarketingSoftkey%') THEN
HasMarketing = TRUE;
END IF;
IF EXISTS (SELECT 1 FROM "SysPackage" WHERE "Name" = 'SalesEnterprise') THEN
HasSalesEnterprise = TRUE;
END IF;
IF EXISTS (SELECT 1 FROM "SysPackage" WHERE "Name" = 'SalesCommerce') THEN
HasSalesCommerce = TRUE;
END IF;
IF EXISTS (SELECT 1 FROM "SysPackage" WHERE "Name" = 'SalesTeam') THEN
HasSalesTeam = TRUE;
END IF;
IF EXISTS (SELECT 1 FROM "SysPackage" WHERE "Name" = 'ServiceEnterpriseSoftkey') THEN
HasServiceEnterprise = TRUE;
END IF;
IF EXISTS (SELECT 1 FROM "SysPackage" WHERE "Name" = 'CustomerCenterSoftkey') THEN
HasCustomerCenter = TRUE;
END IF;
IF EXISTS (SELECT 1 FROM "SysPackage" WHERE "Name" LIKE 'Studio%') THEN
HasStudio = TRUE;
END IF;
IF EXISTS (SELECT 1 FROM "SysPackage" WHERE "Name" = 'Environments') THEN
HasAlmPortal = TRUE;
END IF;
IF EXISTS (SELECT 1 FROM "SysPackage" WHERE "Name" = 'TeamCityIntegration') THEN
HasAlmProxy = TRUE;
END IF;
--endregion
SELECT
CASE
WHEN HasBankSales AND HasBankCustomerJourney AND HasLending AND HasMarketing
THEN 'bank sales & bank customer journey & lending & marketing'
WHEN HasBankSales AND HasBankCustomerJourney
THEN 'bank sales & bank customer journey'
WHEN HasSalesEnterprise AND HasMarketing AND HasCustomerCenter
THEN 'sales enterprise & marketing & customer center'
WHEN HasSalesEnterprise AND HasMarketing AND HasServiceEnterprise
THEN 'sales enterprise & marketing & service enterprise'
WHEN HasSalesCommerce AND HasMarketing AND HasCustomerCenter
THEN 'sales commerce & marketing & customer center'
WHEN HasSalesTeam AND HasMarketing AND HasCustomerCenter
THEN 'sales team & marketing & customer center'
WHEN HasSalesTeam AND HasMarketing
THEN 'sales team & marketing'
WHEN HasSalesEnterprise
THEN 'sales enterprise'
WHEN HasSalesCommerce
THEN 'sales commerce'
WHEN HasSalesTeam
THEN 'sales team'
WHEN HasMarketing
THEN 'marketing'
WHEN HasServiceEnterprise
THEN 'service enterprise'
WHEN HasCustomerCenter
THEN 'customer center'
WHEN HasAlmPortal
THEN 'alm studio'
WHEN HasAlmProxy
THEN 'alm studio proxy'
WHEN HasStudio
THEN 'studio'
WHEN HasLending
THEN 'lending'
WHEN HasBankSales
THEN 'bank sales'
WHEN HasBankCustomerJourney
THEN 'bank customer journey'
ELSE '?'
END
INTO Product;
IF (UseAppName = TRUE) THEN
Product = CONCAT(AppName, ' ', Product);
END IF;
RETURN QUERY (
SELECT
Product AS "Product",
ConfigurationVersion AS "Version",
PrimaryCulture AS "Culture"
);
END;
$$ LANGUAGE plpgsql;
SELECT
"Product",
"ConfigurationVersion",
"PrimaryCulture"
FROM "GetInstallPkgInfo"()
Im running the following on the machine im exporting from: Version 8.0.3.2908 Sales enterprise
importing into: Version 8.0.6.3429
Does the version need to be the exact same?
Bogdan,
Yeah, Im not sure 100% if the one im exporting from is, but im pretty sure its Sales Enterprise too
Is there any way to confirm what version youre running?
Oliver Crowe,
The below SQL script will give the product version.
Note: This is MSSQL and if you use other DBs please update the syntax wherever applicable.
DECLARE @ConfigurationVersion nvarchar(250) DECLARE @PrimaryCulture nvarchar(250) DECLARE @Product nvarchar(250) DECLARE @SysAdminUnit_AllUsers uniqueidentifier = 'A29A3BA5-4B0D-DE11-9A51-005056C00008' BEGIN SELECT @ConfigurationVersion = TextValue FROM SysSettingsValue ssv INNER JOIN SysSettings ss on ss.Id = ssv.SysSettingsId WHERE ss.Code = 'ConfigurationVersion' AND SysAdminUnitId = @SysAdminUnit_AllUsers SELECT @PrimaryCulture = c.Name FROM SysSettingsValue ssv INNER JOIN SysSettings ss on ss.Id = ssv.SysSettingsId INNER JOIN SysCulture c on c.Id = ssv.GuidValue WHERE ss.Code = 'PrimaryCulture' AND SysAdminUnitId = @SysAdminUnit_AllUsers SELECT @Product = CASE WHEN EXISTS(SELECT Id FROM SysPackage WHERE Name LIKE 'MarketingSoftkey%') AND EXISTS(SELECT Id FROM SysPackage WHERE Name LIKE 'BankOnboardingSoftkey%') AND EXISTS(SELECT Id FROM SysPackage WHERE Name LIKE 'BankSalesSoftkey%') AND EXISTS(SELECT Id FROM SysPackage WHERE Name LIKE 'Lending%') THEN 'bpmonline bank sales & bank customer journey & lending & marketing' WHEN EXISTS(SELECT Id FROM SysPackage WHERE Name LIKE 'BankOnboardingSoftkey%') AND EXISTS(SELECT Id FROM SysPackage WHERE Name LIKE 'BankSalesSoftkey%') THEN 'bpmonline bank sales & bank customer journey' WHEN EXISTS(SELECT Id FROM SysPackage WHERE Name LIKE 'MarketingSoftkey%') AND EXISTS(SELECT Id FROM SysPackage WHERE Name = 'SalesEnterprise') AND EXISTS(SELECT Id FROM SysPackage WHERE Name = 'ServiceEnterpriseSoftkey') THEN 'bpmonline sales enterprise & marketing & service enterprise' WHEN EXISTS(SELECT Id FROM SysPackage WHERE Name LIKE 'MarketingSoftkey%') AND EXISTS(SELECT Id FROM SysPackage WHERE Name = 'SalesEnterprise') AND EXISTS(SELECT Id FROM SysPackage WHERE Name = 'CustomerCenterSoftkey') THEN 'bpmonline sales enterprise & marketing & customer center' WHEN EXISTS(SELECT Id FROM SysPackage WHERE Name LIKE 'MarketingSoftkey%') AND EXISTS(SELECT Id FROM SysPackage WHERE Name = 'SalesCommerce') AND EXISTS(SELECT Id FROM SysPackage WHERE Name = 'CustomerCenterSoftkey') THEN 'bpmonline sales commerce & marketing & customer center' WHEN EXISTS(SELECT Id FROM SysPackage WHERE Name LIKE 'MarketingSoftkey%') AND EXISTS(SELECT Id FROM SysPackage WHERE Name = 'SalesTeam') AND EXISTS(SELECT Id FROM SysPackage WHERE Name = 'CustomerCenterSoftkey') THEN 'bpmonline sales team & marketing & customer center' WHEN EXISTS(SELECT Id FROM SysPackage WHERE Name LIKE 'MarketingSoftkey%') AND EXISTS(SELECT Id FROM SysPackage WHERE Name = 'SalesTeam') THEN 'bpmonline sales team & marketing' WHEN EXISTS(SELECT Id FROM SysPackage WHERE Name = 'SalesTeam') THEN 'bpmonline sales team' WHEN EXISTS(SELECT Id FROM SysPackage WHERE Name = 'SalesCommerce') THEN 'bpmonline sales commerce' WHEN EXISTS(SELECT Id FROM SysPackage WHERE Name = 'SalesEnterprise') THEN 'bpmonline sales enterprise' WHEN EXISTS(SELECT Id FROM SysPackage WHERE Name Like 'MarketingSoftkey%') THEN 'bpmonline marketing' WHEN EXISTS(SELECT Id FROM SysPackage WHERE Name = 'CustomerCenterSoftkey') THEN 'bpmonline customer center' WHEN EXISTS(SELECT Id FROM SysPackage WHERE Name = 'ServiceEnterpriseSoftkey') THEN 'bpmonline service enterprise' WHEN EXISTS(SELECT Id FROM SysPackage WHERE Name LIKE 'Studio%') THEN 'bpmonline studio' WHEN EXISTS(SELECT Id FROM SysPackage WHERE Name LIKE 'Lending%') THEN 'bpmonline lending' WHEN EXISTS(SELECT Id FROM SysPackage WHERE Name LIKE 'BankSalesSoftkey%') THEN 'bpmonline bank sales' WHEN EXISTS(SELECT Id FROM SysPackage WHERE Name LIKE 'BankOnboardingSoftkey%') THEN 'bpmonline bank customer journey' ELSE '?' END SELECT @Product Product, @ConfigurationVersion Version, @PrimaryCulture Localization END
BR,
Bhoobalan Palanivelu.
Bhoobalan Palanivelu,
Im using PostgreSQL - All MSSQL syntax checkers ive tried also says this syntax is wrong and I cant seem to get anything that will run from this, I cant find any conversions that work manually and ive tried using online converters too
None of the syntax works, could you please be more specific in what I can do to get it working
If you scrolled slightly further down the page you got that code from you'd have seen me commenting that it doesnt seem to work.
Hello,
Please use the following script:
CREATE OR REPLACE FUNCTION "GetInstallPkgInfo"()
RETURNS TABLE (
"Product" VARCHAR(250),
"ConfigurationVersion" VARCHAR(250),
"PrimaryCulture" VARCHAR(250)
)
AS $$
DECLARE
Product VARCHAR(250);
AppName VARCHAR(250) = 'creatio';
UseAppName BOOL = FALSE;
ConfigurationVersion VARCHAR(250);
PrimaryCulture VARCHAR(250);
SysAdminUnit_AllUsers UUID = 'A29A3BA5-4B0D-DE11-9A51-005056C00008';
HasBankSales BOOL;
HasBankCustomerJourney BOOL;
HasLending BOOL;
HasMarketing BOOL;
HasSalesEnterprise BOOL;
HasSalesCommerce BOOL;
HasSalesTeam BOOL;
HasServiceEnterprise BOOL;
HasCustomerCenter BOOL;
HasStudio BOOL;
HasAlmPortal BOOL;
HasAlmProxy BOOL;
BEGIN
SELECT
ssv."TextValue"
INTO ConfigurationVersion
FROM "SysSettingsValue" ssv
INNER JOIN "SysSettings" ss ON ss."Id" = ssv."SysSettingsId"
WHERE ss."Code" = 'ConfigurationVersion'
AND ssv."SysAdminUnitId" = SysAdminUnit_AllUsers;
SELECT
c."Name"
INTO PrimaryCulture
FROM "SysSettingsValue" ssv
INNER JOIN "SysSettings" ss ON ss."Id" = ssv."SysSettingsId"
INNER JOIN "SysCulture" c ON c."Id" = ssv."GuidValue"
WHERE ss."Code" = 'PrimaryCulture'
AND ssv."SysAdminUnitId" = SysAdminUnit_AllUsers;
--region check root packages
IF EXISTS (SELECT 1 FROM "SysPackage" WHERE "Name" LIKE 'BankSalesSoftkey%') THEN
HasBankSales = TRUE;
END IF;
IF EXISTS (SELECT 1 FROM "SysPackage" WHERE "Name" LIKE 'BankOnboardingSoftkey%') THEN
HasBankCustomerJourney = TRUE;
END IF;
IF EXISTS (SELECT 1 FROM "SysPackage" WHERE "Name" LIKE 'Lending%') THEN
HasLending = TRUE;
END IF;
IF EXISTS (SELECT 1 FROM "SysPackage" WHERE "Name" LIKE 'MarketingSoftkey%') THEN
HasMarketing = TRUE;
END IF;
IF EXISTS (SELECT 1 FROM "SysPackage" WHERE "Name" = 'SalesEnterprise') THEN
HasSalesEnterprise = TRUE;
END IF;
IF EXISTS (SELECT 1 FROM "SysPackage" WHERE "Name" = 'SalesCommerce') THEN
HasSalesCommerce = TRUE;
END IF;
IF EXISTS (SELECT 1 FROM "SysPackage" WHERE "Name" = 'SalesTeam') THEN
HasSalesTeam = TRUE;
END IF;
IF EXISTS (SELECT 1 FROM "SysPackage" WHERE "Name" = 'ServiceEnterpriseSoftkey') THEN
HasServiceEnterprise = TRUE;
END IF;
IF EXISTS (SELECT 1 FROM "SysPackage" WHERE "Name" = 'CustomerCenterSoftkey') THEN
HasCustomerCenter = TRUE;
END IF;
IF EXISTS (SELECT 1 FROM "SysPackage" WHERE "Name" LIKE 'Studio%') THEN
HasStudio = TRUE;
END IF;
IF EXISTS (SELECT 1 FROM "SysPackage" WHERE "Name" = 'Environments') THEN
HasAlmPortal = TRUE;
END IF;
IF EXISTS (SELECT 1 FROM "SysPackage" WHERE "Name" = 'TeamCityIntegration') THEN
HasAlmProxy = TRUE;
END IF;
--endregion
SELECT
CASE
WHEN HasBankSales AND HasBankCustomerJourney AND HasLending AND HasMarketing
THEN 'bank sales & bank customer journey & lending & marketing'
WHEN HasBankSales AND HasBankCustomerJourney
THEN 'bank sales & bank customer journey'
WHEN HasSalesEnterprise AND HasMarketing AND HasCustomerCenter
THEN 'sales enterprise & marketing & customer center'
WHEN HasSalesEnterprise AND HasMarketing AND HasServiceEnterprise
THEN 'sales enterprise & marketing & service enterprise'
WHEN HasSalesCommerce AND HasMarketing AND HasCustomerCenter
THEN 'sales commerce & marketing & customer center'
WHEN HasSalesTeam AND HasMarketing AND HasCustomerCenter
THEN 'sales team & marketing & customer center'
WHEN HasSalesTeam AND HasMarketing
THEN 'sales team & marketing'
WHEN HasSalesEnterprise
THEN 'sales enterprise'
WHEN HasSalesCommerce
THEN 'sales commerce'
WHEN HasSalesTeam
THEN 'sales team'
WHEN HasMarketing
THEN 'marketing'
WHEN HasServiceEnterprise
THEN 'service enterprise'
WHEN HasCustomerCenter
THEN 'customer center'
WHEN HasAlmPortal
THEN 'alm studio'
WHEN HasAlmProxy
THEN 'alm studio proxy'
WHEN HasStudio
THEN 'studio'
WHEN HasLending
THEN 'lending'
WHEN HasBankSales
THEN 'bank sales'
WHEN HasBankCustomerJourney
THEN 'bank customer journey'
ELSE '?'
END
INTO Product;
IF (UseAppName = TRUE) THEN
Product = CONCAT(AppName, ' ', Product);
END IF;
RETURN QUERY (
SELECT
Product AS "Product",
ConfigurationVersion AS "Version",
PrimaryCulture AS "Culture"
);
END;
$$ LANGUAGE plpgsql;
SELECT
"Product",
"ConfigurationVersion",
"PrimaryCulture"
FROM "GetInstallPkgInfo"()
Cherednichenko Nikita,
This is the best solution for PostgreSQL, thanks!