LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  How to obtain maximum length from columns

    Employee
    Posted 07-21-2010 07:20

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: matt.mac

    Hello all,

    We are currently inserting data into our database for our presentation layer and we are running into a problem where the DB query node throws an error because the column in the database is too small for the data it's trying to insert.

    Is there a node or a function that will output the maximum value for the columns supplied?

    Thanks

    Matt


  • 2.  RE: How to obtain maximum length from columns

    Employee
    Posted 07-22-2010 11:18

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: ejones

    You can use an Agg node. If the name of the field of unknown length is "junk" here is the code:

    max_length = groupMax(strlen(junk))
    emit max_length