拆分'$'分隔的字符串并插入到表中

问题描述 投票:0回答:1

我有一个员工表,具有emp_id,emp_first_name,emp_last_name,emp_salary字段。

我想在雇员表中创建一个带有插入记录的过程,但是在'1 $ shubham $ tathe $ 5000#2 $ vijaj $ bakse&10000#3 $ ram $ sharma $ 200'的过程IN参数中,我想在员工中插入此字符串行用“#”分隔,列字段用“ $”分隔的表格。

emp_id   |  emp_first_name |  emp_last_name  |  emp_salary

1           shubham           tathe             5000
2           vijaj             bakse             10000
3           ram               sharma            200

create or replace procedure procedure_split
(
 In_string IN varchar
)

IS

Begin
...
...
...
END;

In_string ='1 $ shubham $ tathe $ 5000#2 $ vijaj $ bakse&10000#3 $ ram $ sharma $ 200'

In_string是过程中的输入参数。

sql oracle oracle11g oracle10g
1个回答
2
投票
© www.soinside.com 2019 - 2024. All rights reserved.