我想知道是否有可能用另一個字符串加位置替換特定字符串而不使用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/