我想知道是否有可能用另一个字符串加位置替换特定字符串而不使用PL/SQL块(循环,用户定义函数/存储过程,带函数构造...)。 这里:st - >pos_num 输入: "aa bbb st cccc dddd st eeeeeeeeeee ffff g st g h i st j k l m st"
输出: "aa bbb pos_1 cccc dddd pos_2 eeeeeeeeeee
请帮助SQL查询。我有一个表: CREATE TABLE PCDEVUSER.tabletest
(
id INT PRIMARY KEY NOT NULL,
name VARCHAR2(64),
pattern INT DEFAULT 1 NOT NULL,
tempval INT
);
让我们假设它充满了值: INSERT INTO TABLETE
我的要求是从字符串中获取第二个和第三个'/'之间的数据(/从右到左考虑)和下面是示例示例。 1.My string is RAM/ESH/BA/BU/MOR/SA and output to be derived is BU
2.My string is RAM/ESH/BA/MOR/SA and output to be derived is BA
3.My String is TR/IV/