Я хочу запустить этот SQL-скрипт в Oracle. Я пытался использовать конвертер сценариев MSSQL. И это были результаты, но не работает.
Update c
SET `c.SOURCE BLOCK LEVEL` = CONCAT('B',SUBSTR(g.HIERARCHY, GREATEST(-LENGTH(g.HIERARCHY),-LENGTH(RTRIM(g.HIERARCHY)) - 12)))
FROM mshist>dbo<CYCLE AS c
INNER JOIN `msmodel.dbo.GRADEBLOCK` AS g
ON `c.SOURCE BLOCK` IS NOT NULL AND
`c.SOURCE BLOCK LEVEL` IS NULL AND
g.HIERARCHY LIKE 'root:Blocks:%' AND
`c.SOURCE BLOCK` = g.GRADEBLOCK_OID;
UPDATE C
SET `c.SOURCE BLOCK LEVEL` = CONCAT('S',SUBSTR(g.HIERARCHY, GREATEST(-LENGTH(g.HIERARCHY),-LENGTH(RTRIM(g.HIERARCHY)) - 16)))
FROM mshist.dbo AS c
INNER JOIN msmodel.dbo.GRADEBLOCK AS g
ON `c.SOURCE BLOCK` IS NOT NULL AND
`c.SOURCE BLOCK LEVEL` IS NULL AND
g.HIERARCHY LIKE 'root:Stockpiles:%' AND
`c.SOURCE BLOCK` = g.GRADEBLOCK_OID;