sqlserver转oracle
谁能帮我转化为oracle的ALTER FUNCTION [dbo].[wageDataInputGetSelColumns] (@str NVARCHAR(3000))
RETURNS @result_table TABLE(
idx INT IDENTITY,
code NVARCHAR(100)
)
AS
BEGIN
IF LEN(@str)=0
RETURN
SET @str=SUBSTRING(@str,2,LEN(@str)-2)
DECLARE @p INT
SET @p=CHARINDEX(''',''',@str)
IF @p>0
BEGIN
WHILE @p>0
BEGIN
INSERT INTO @result_table(code)
VALUES(LEFT(@str,@p-1))
SET @str=RIGHT(@str,LEN(@str)-@p-2)
SET @p=CHARINDEX(''',''',@str)
END
IF LEN(@str)>0
INSERT INTO @result_table(code)
VALUES(@str)
END
ELSE
BEGIN
INSERT INTO @result_table(code)
VALUES(@str)
END
RETURN
END
------解决方案--------------------
你先把你的过程解释,因为我也看不懂sqlserver.....所以转不了oracle