Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

LEN function in SQL

Hi Guys,

Can anyone think of a reason why the Len function doesn't work in SQL I'm using LEN(fieldname) just keeps telling me the function does not exist 😕

28 Replies
Not applicable
Author

error 2.png

Not applicable
Author

Thanks Max_dreamer I think its getting there I don't understand why its giving me two lines what do you think could be causing it ?

PrashantSangle

Hi,

When you use Join then there is possibilty of creating extra line,

Therefore when you use join in SQL you must use

1=1 which gives data only get true value.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
happydays1967
Creator
Creator

What 'dialect' of SQL are you using? i.e. what is the database engine? Some dialects use len() others length(). Might be just as simple as that

Not applicable
Author

Thanks I've put  in code as above but is still giving me two lines, not sure why.

Sorry about this !

buzzy996
Master II
Master II

can u try, on dimension tab check the check box Suppress When the value is null?

Not applicable
Author

Im not using dimentions on this table having the same problem still anyone got any ideas ?

Not applicable
Author

For example I'm getting this at the moment but I'm trying to show on one row - When I select don't show null values it is hiding the entire row so nothing is showing 😕

error 3.png

happydays1967
Creator
Creator

load

     service_id

     MaxString(parameter_flag1) as parm_1,

     MaxString(parameter_flag2) as parm_2,

     ......

resident <your_table>

GROUP BY service_id

Tha will put all values on 1 line

Regards,

HP

Not applicable
Author

Thanks Hans there's a lot of linking statements is there a way I can do that without loosing that, I tried maxstring in the script and it returns function not recognised 😕 but seems to work in front end