CRM On Demand - Reports and Dashboards (MOSC)

MOSC Banner

Casting as CHAR and Using Length() reports unexpected length of the CHAR

Starting with Release 24 of CRM On Demand.
Some formulas which use "CAST" and "LENGTH" function together could not generate the expected result.

Example of the issue:
Formula: LENGTH(CAST("100" as Char))
The correct answer is "3". But in R24 report, the result is returned "30".

Engineering Answer:

This is due to a setting change that was introduced in Release 24, engineering has let us know that this is now the expected behavior.

Better Explanation and Examples of how to get the expected results:

LENGTH(CAST('100' as char)) reports 30 because that is the default size. You can test this by specifying the size of the char, LENGTH(CAST('100' as char(10))) would then report 10.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center