Pergunta

I have the following setup.

'Apps/Reports' <---------> 'DB2 Connect' <------------> 'Legacy DB2 on AS400'
               `Hibernate`               `native calls`

When data is retrieved from by the application, it will be padded with extra spaces if the length is less that the column length. Of note when running a query, if the WHERE cause parameter is not padded, its automatically padded with extra spaces such that the query will retrieve the same records for a padded and non-padded parameter.

Is there a way (preferably on IBM DB2 Connect or connection string parameter) to remove extra whitespaces from a resultset?

Foi útil?

Solução

Are the columns in the iSeries defined as CHAR()? I'm assuming so, because this is how CHAR() works -- it's a fixed field length, not a variable field length (that's what VARCHAR is for).

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top