Yes, I tried:
Here is the SQL Anywhere version:
CREATE FUNCTION f_get_name_address_list
(name_address_id varchar(26))
RETURNS id_table
TABLE (name_and_address_id varchar(26),
full_name varchar(200),
parent_record_id varchar(26)...
OK, here is the SQL Server version:
CREATE FUNCTION f_get_name_address_list
(@name_address_id varchar(26))
RETURNS @id_table
TABLE (name_and_address_id varchar(26),
full_name varchar(200),
parent_record_id varchar(26),
pass...
I have created an Oracle Function using a reference cursor.
Here is the Oracle version:
CREATE OR REPLACE FUNCTION f_get_name_address_list
(p_name_and_address_id IN varchar2)
RETURN SYS_REFCURSOR
IS
v_ret SYS_REFCURSOR;
BEGIN
OPEN v_ret FOR
SELECT...
I tried you suggestion but got this error:
F_GET_NAME_ADDRESS_L
--------------------
CURSOR STATEMENT : 1
CURSOR STATEMENT : 1
ERROR:
ORA-01436: CONNECT BY loop in user data
no rows selected
1 row selected.
I dont know how to resolve the above error.
Fot anyone that is following this thread, I am trying to convert an SQL Server Function to an Oracle Function (or Procedure).
Here is the SQL Server Function:
CREATE FUNCTION f_get_name_address_list
(@name_address_id varchar(26))
RETURNS @id_table
TABLE (name_and_address_id...
I made the changes as you suggested and have progress to a new error.
Here is the SQL:
CREATE OR REPLACE FUNCTION f_get_name_address_list
(name_and_address_id IN varchar2,
full_name IN varchar2,
parent_record_id IN varchar2,
pass...
Here is my SQL:
CREATE OR REPLACE TYPE t_col
AS
object
(name_and_address_id varchar2(26),
full_name varchar2(200),
parent_record_id varchar2(26),
pass number
)
;
/
CREATE OR REPLACE TYPE id_table
AS
TABLE OF...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.