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

Field Length Question

I am not sure if there is a way but I want to find the length of fields in my QVD file.  In the file there are many different fields but I will pick one:  Description.  Is there a way to determine the maximum length of that field.  I know there is a $field command and a data profiler out there.  The data profiler seems to calculate the maximum length based on actual data in the field.  This could vary from one account to the next.  What I mean is this:

Client one:

Description = This is a test.

Client two = This is the second day of the week.

The length is different.  I am looking at the finding the length of the field with no data.  If this is not possible that is alright.

Thanks

David

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Simply put this expression in a list box:

     =Max(Len(Description))

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

9 Replies
israrkhan
Specialist II
Specialist II

if i understood your requirement.

you can try len() function. like below

it will return yoy, Length of string s. The result is an integer

len(Discription) where Discription = 'Test Discription'.  it will returns 16.

Kind Regards

Khan

jagan
Luminary Alumni
Luminary Alumni

Hi David,

Try like this

LOAD

*,

Len(Description) AS DescriptionLength

FROM DataSource;

Now in front end create a text object and use this expression to find maximum length of a field value

=Max(DescriptionLength)

Regards,

jagan.

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Simply put this expression in a list box:

     =Max(Len(Description))

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Thanks all for your suggestion.  I did not explain in clearly.  I dont need the max length looking at the actual data in the field.  What I was looking for is a way to determine what the max amount of data that can be stored in a given field.  Like Description I think the max amount of data is 500 characters but I am not sure.  If this is not possible in Qlikview no big deal.  Again thanks for your help.

David

Anonymous
Not applicable
Author

I have never come across a limit to the number of characters that can stored in a text field.

I reckon though that if one stores loads of rows of fields, that contain very long text fields [especially if they are all unique descriptions] then first threshold to cause issues would be performance.

Anonymous
Not applicable
Author

Agreed, I think you will encounter performance issues before you ever hit the QV limits due to todays current hardware limitations.

Not applicable
Author

I believe, there is no length constraints for string field values in Qlikview.

Not applicable
Author

Thanks all for the help.  I will need to go back to my development team to get the answer I am looking for.  I am not saying there is a limit on the length of the field.  What I was saying is I have a field in a QVD File called Description.  I want to find the maximum number of characters that field can hold.  In other words our development team has set the limit of the various fields in my data set.  I was trying to find a work around to determine what those lengths are without going to them.  No worries guys. 

arieidel
Partner - Creator II
Partner - Creator II

Hello David,

Have you solved this issue? I'm dealing with the same thing: I'm analyzing a Survey result and some users gave quite a bit long answers. I think a field limit is about 500 characters. Could you find a way to extend that?

Thanks,

Ariel