cancel
Showing results for 
Search instead for 
Did you mean: 

How to get Datalength in MaxDB

Former Member
0 Kudos

Hi Guys:

How I can run this query (SQL Transact from MS-SQL) but in MaxDB?!

select datalength(FIELDINFO),datalength(LOGICINFO),

datalength(EXTENSIONS)

from DYNPSOURCE

where PROGNAME = 'SAPMF05A' and DYNPNUMBER = '0110'

Seems the function DATALENGTH doesn't exist in MaxDB, similar is LENGTH but the field is LONG data type and doesn’t support this function.

Thanks!

Regards,

Federico

Accepted Solutions (1)

Accepted Solutions (1)

roland_mallmann
Advisor
Advisor
0 Kudos

Hi,

which MaxDB version are you using? Is the DB Unicode or not?

Our LENGTH function should perform similarly (in MaxDB version >= 7.6), but one would get the length in number of characters when using it on a Unicode-char field.

Regards,

Roland

Former Member
0 Kudos

Hello Roland:

This is a Unicode MaxDB 7.5.0.42, we already tried the LENGHT function but MaxDB returns an error that type LONG cant be converted or so, seems we cant use that function.

Any idea?

Regards,

Federico

roland_mallmann
Advisor
Advisor
0 Kudos

Hi,

as already stated, we do not support the LENGTH function on a LONG in version < MaxDB 7.6.

Regards,

Roland

Former Member
0 Kudos

Roland:

Is then no such a way in MaxDB 7.5 to get that information?

Thanks!

Federico

roland_mallmann
Advisor
Advisor
0 Kudos

Hi Frederico,

not for LONGs no, for non-LONGS, yes.

Regards,

Roland

Answers (0)