Click here to Skip to main content
15,905,785 members
Home / Discussions / Database
   

Database

 
AnswerRe: Odd problem (conversion or openquery?) only appearing in a stored procedure but not when running it adhoc Pin
ElectricLlama17-Sep-09 23:38
ElectricLlama17-Sep-09 23:38 
GeneralRe: Odd problem (conversion or openquery?) only appearing in a stored procedure but not when running it adhoc Pin
alex3_1418-Sep-09 0:05
alex3_1418-Sep-09 0:05 
GeneralRe: Odd problem (conversion or openquery?) only appearing in a stored procedure but not when running it adhoc Pin
ElectricLlama18-Sep-09 15:00
ElectricLlama18-Sep-09 15:00 
Questionhow to connect triggerwithout main server Pin
rupal217-Sep-09 21:38
rupal217-Sep-09 21:38 
AnswerRepost Pin
Richard MacCutchan17-Sep-09 23:17
mveRichard MacCutchan17-Sep-09 23:17 
AnswerRe: how to connect triggerwithout main server Pin
Eddy Vluggen17-Sep-09 23:50
professionalEddy Vluggen17-Sep-09 23:50 
Questionhow to connect trigger Pin
rupal217-Sep-09 21:29
rupal217-Sep-09 21:29 
QuestionOracle Query Pin
sandhya1417-Sep-09 19:51
sandhya1417-Sep-09 19:51 
Hi all,

I have a problem with executing function in Oracle 10g.

Below mentioned is the function :-

FUNCTION UnpackArray
(
Source IN VARCHAR2 DEFAULT NULL,
Delimiter IN CHAR DEFAULT ','
)
RETURN reSourceArray0 PIPELINED
IS
SourceArray00 SourceArray0:=SourceArray0(NULL);
TYPE REFCURSOR IS REF CURSOR;
CURSOR0 REFCURSOR;

DelLen int;
Pos int;
Cnt int;
str int;
LEN int;
Holder VARCHAR2(255);
BEGIN
IF Source is null or Delimiter is null THEN
Return;
END IF;
IF RTRIM(LTRIM(Source)) = ' ' THEN
Return;
END IF;

SELECT LENGTH(RTRIM(Delimiter)) INTO DelLen FROM DUAL;

SELECT INSTR(UPPER(Source), UPPER(Delimiter)) INTO Pos FROM DUAL;
IF Pos = 0 THEN
BEGIN

INSERT INTO UnpackArray_TBL
( Data )
VALUES ( Source );
return;
OPEN CURSOR0 FOR SELECT * FROM UnpackArray_TBL;

END;
END IF;

SELECT 1 INTO str FROM DUAL;
<< LABEL4 >>

WHILE Pos > 0
LOOP
BEGIN

SELECT Pos - str INTO len FROM DUAL;

SELECT SUBSTR(Source, str, len) INTO Holder FROM DUAL;

INSERT INTO UnpackArray_TBL
VALUES ( Holder );

SELECT Pos + DelLen INTO str FROM DUAL;

SELECT INSTR(UPPER(Source), UPPER(Delimiter), str) INTO Pos FROM DUAL;
OPEN CURSOR0 FOR SELECT * FROM UnpackArray_TBL;

END;

END LOOP;

SELECT SUBSTR(Source, str, length(RTRIM(Source))) INTO Holder FROM DUAL;
IF length(RTRIM(Holder)) > 0 THEN

INSERT INTO UnpackArray_TBL
VALUES ( Holder );
OPEN CURSOR0 FOR SELECT * FROM UnpackArray_TBL;

END IF;
Return; LOOP
FETCH CURSOR0 INTO
SourceArray00.Data;
EXIT WHEN CURSOR0%NOTFOUND;
PIPE ROW(SourceArray00);
END LOOP;
CLOSE CURSOR0;

RETURN;
END;

While executing this am getting the error like:

Running "EDOCS"."UNPACKARRAY" ( SOURCE = admin, DELIMITER = ).

Parameter 'RETURN_VALUE': No size set for variable length data type: String.

can anybody help me to solve this...?

Thanks in advance.
AnswerRe: Oracle Query Pin
sumithz22-Sep-09 1:33
sumithz22-Sep-09 1:33 
QuestionMySql not responding to query [modified] Pin
Jeffrey Webster17-Sep-09 15:06
Jeffrey Webster17-Sep-09 15:06 
AnswerRe: MySql not responding to query [modified] Pin
Luc Pattyn17-Sep-09 15:56
sitebuilderLuc Pattyn17-Sep-09 15:56 
NewsGet trained, get free copy of SQL Server 2008 Standard Pin
brucedkyle17-Sep-09 9:00
brucedkyle17-Sep-09 9:00 
GeneralRe: Get trained, get free copy of SQL Server 2008 Standard Pin
εїзεїзεїз17-Sep-09 13:13
εїзεїзεїз17-Sep-09 13:13 
QuestionMultiple queries being requested on for same table Pin
Vishnu Nath17-Sep-09 4:53
Vishnu Nath17-Sep-09 4:53 
AnswerRe: Multiple queries being requested on for same table Pin
David Mujica17-Sep-09 5:14
David Mujica17-Sep-09 5:14 
AnswerRe: Multiple queries being requested on for same table Pin
Ashfield17-Sep-09 9:15
Ashfield17-Sep-09 9:15 
GeneralRe: Multiple queries being requested on for same table Pin
Vishnu Nath18-Sep-09 21:05
Vishnu Nath18-Sep-09 21:05 
GeneralRe: Multiple queries being requested on for same table Pin
Ashfield18-Sep-09 21:30
Ashfield18-Sep-09 21:30 
QuestionDatabase Deployment Pin
mobius11100117-Sep-09 4:30
mobius11100117-Sep-09 4:30 
AnswerRe: Database Deployment Pin
J4amieC17-Sep-09 4:51
J4amieC17-Sep-09 4:51 
AnswerScript it Pin
David Mujica17-Sep-09 5:07
David Mujica17-Sep-09 5:07 
GeneralRe: Database Deployment Pin
mobius11100117-Sep-09 5:46
mobius11100117-Sep-09 5:46 
QuestionTypes of Deadlocks in SQL Server Pin
John.L.Ponratnam17-Sep-09 4:21
John.L.Ponratnam17-Sep-09 4:21 
AnswerRe: Types of Deadlocks in SQL Server Pin
David Mujica17-Sep-09 5:02
David Mujica17-Sep-09 5:02 
AnswerRe: Types of Deadlocks in SQL Server Pin
Ashfield17-Sep-09 9:17
Ashfield17-Sep-09 9:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.