cancel
Showing results for 
Search instead for 
Did you mean: 

Which SA version has introduced the LEN() function?

VolkerBarth
Contributor
0 Kudos
2,383

During my current tests with proxy tables, I have noticed that the MS SQL-compatible LEN() function is supported with SA 11.0.1 and 12.0.0. In contrast, older versions (e.g. 10.0.1.3722) do not accept that function.

(That came as a surprise - I had tried to use LEN()/LENGTH() to find out whether SA would rewrite such functions for different server classes...)

As there seems to be no reference to LEN() in the docs at all:

When was LEN() introduced? And is this just a short form for LENGTH()?

Accepted Solutions (1)

Accepted Solutions (1)

johnsmirnios
Advisor
Advisor

It was introduced in 11.0.0 GA and is exactly an alias for LENGTH(). Looking at the history, I'd say it didn't manage to get documented because it was added by/for the IQ team. I don't know if the intention was to include it in SA or if it should have been conditionally compiled only for IQ as it was in 9.x. Do you like having it? I don't see any good reason to remove it now that it is out there in the wild.

-john.

VolkerBarth
Contributor
0 Kudos

@John: Thanks for the explanation! - As stated, LEN() is compatible with MS SQL, and that's practical for proxy tables. So I don't think it should get removed. But a slight documentation note would be fine. - For SA-only development, I personally will continue to use LENGTH().

reimer_pods
Participant

LEN comes in handy for people who also code in PowerScript (PowerBuilder) where LEN is a built-in-function

I would leave it as it is. Just document it :).

Answers (0)