Limitations: Maximum string length is 268,435,456 Unicode characters (256 mega characters) or 536,870,912 bytes. This is the size limit.
This is the Situation: I need the size limit from the last character. Oracle throws off errors like
: inconsistent datatypes: expected - got CLOB
How to fix such errors, Is XMLAGG an option?
Below is the test code:
` WITH q AS (
SELECT 'All aboard!
Hahahahaha
Aye Aye Aye Aye Aye Aye...
Crazy, but that s how it goes
Millions of people living as foes
Maybe it s not too late
To learn how to love and forget how to hate
Mental wounds not healing
Life s a bitter shame
I m going off the rails on a crazy train
I m going off the rails on a crazy train
I ve listened to preachers, I ve listened to fools
I ve watched all the dropouts who make their own rules
One person conditioned to rule and control
The media sells it and you live the role
Mental wounds still screaming
Driving me insane
I m going off the rails on a crazy train
I m going off the rails on a crazy train
I know that things are going wrong for me
You gotta listen to my words
Yeah
Heirs of a cold war, that s what we ve become
Inheriting troubles, I m mentally numb
Crazy, I just cannot bear
I m living with something that just isn t fair
Mental wounds stop healing
Who and what s to blame
I m going off the rails on a crazy train' AS sentence FROM DUAL)
SELECT SUBSTR(sentence,-256) AS Y FROM Q; `
Results:
Yeah Heirs of a cold war, that s what we ve become Inheriting troubles, I m mentally numb Crazy, I just cannot bear I m living with something that just isn t fair Mental wounds stop healing Who and what s to blame I m going off the rails on a crazy train
Test Scenarios: The code must return values for the below scenarios
' Hello we have 14. apples in the basket, we are shipping them to Japan via Australia for $23142 using #1243432 flight number '
' How can the plastic pretend on top of the supported newcomer? Why can t the horror exceed the charitable knight? The helmet thinks! How does whatever ward misprint the transmitter? The higher kernel ignores a collective with the aware array. An anatomy laughs around the back defect?'
' 949490909232 Yo Whats up?'
' Thanks'
'5/16/1941'
' 1. Hi man
This is not the best Idea;
Is Soccer the worlds popular sport
How many Elephants can fit in the White House
A lion can eat 6 deer, 4 zebra and 8 buffalos in 2 years.'
I guess you need this -
SELECT SUBSTR(sentence,-LENGTH(sentence), 256) AS Y
FROM Q;