-
i would expect that SUBSTR(V_EVENTDATADESC,1,3) is returning non-numerics -- i don't think nulls would be a problem.
-
i would expect that SUBSTR(V_EVENTDATADESC,1,3) is returning non-numerics -- i don't think nulls would be a problem.
-
Originally posted by Diggers12
The problem seems to be the fact that the EVENTDATADESC columns has some NULL entries, but I thought the line
IF V_EVENTDATADESC IS NULL THEN
V_LOCATIONDBOID := 42000000000000000000;
ELSE SELECT LOCATIONDBOID INTO V_LOCATIONDBOID FROM LOCATIONS WHERE LOCATIONID = TO_NUMBER(SUBSTR(V_EVENTDATADESC,1,3)) ;
would resolve this,
any ideas?
Ofcourse it wud resolve if EVENTDATADESC column is NULL....
Problem arrises if EVENTDATADESC column is not NULL & substr(V_EVENTDATADESC,1,3) has non numeric values as told by SLIMDAVE...
U cud resolve as ( this is jus 1 method )
Code:
IF V_EVENTDATADESC IS NULL THEN
V_LOCATIONDBOID := 42000000000000000000;
ELSE
Begin
SELECT LOCATIONDBOID INTO V_LOCATIONDBOID FROM LOCATIONS WHERE LOCATIONID = TO_NUMBER(SUBSTR(V_EVENTDATADESC,1,3)) ;
EXCEPTION
WHEN OTHERS THEN
V_LOCATIONDBOID = 'Wat Ever U want To Set as Substr reurned non numeric value & cannot be joined'
or if u wish not to perform any action...then jus give
NULL
END;
u may need to take care of this part of code as well
IF SUBSTR(V_EVENTDATADESC,7,9) = '019000000' THEN V_APPLICATIONDBOID := TO_NUMBER(SUBSTR(V_EVENTDATADESC,7)); END IF;
Abhay
[/code]
funky...
"I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."
"Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|