Page 1 of 1

Conversion issue

Posted: Mon Jun 29, 2015 5:43 am
by udayk_2007
Hi Friends

I am getting below warning messages in multiple jobs

Implicit conversion from source type "string[max=24]" to result type "string[max=8]": Possible truncation of variable length string.

These warnings were not coming earlier.

We had a DB maintenance after which we are seeing these errors. Also interestingly these errors come in the first run after db maintenance. From the second run,most of the warnings gets corrected. In both the runs, code and data is exactly same.

We are using Oracle 10g as database.

Please suggest

Thanks

Posted: Mon Jun 29, 2015 6:17 am
by ArndW
Some questions come to mind:

- What is your SELECT statement to get this column? (Is it a database or a derived column)
- If a database column, what does a "describe" show for the exact same table, schema, database and user show in Oracle?

Posted: Mon Jun 29, 2015 6:44 am
by udayk_2007
Thanks for your response

1.This column is a Database column
2. In the database this column is varchar2(8) and in the DataStage it is varchar(8). Does varchar and varchar2 cause any difference ?

Posted: Mon Jun 29, 2015 6:49 am
by udayk_2007
Sorry the previous post had smiles enabled

In the database this column is varchar2(8) and in the DataStage it is varchar(8). Does varchar and varchar2 cause any difference ?

Posted: Mon Jun 29, 2015 6:53 am
by priyadarshikunal
where does this error coming from, is it from the target oracle stage or source oracle stage or any other stage?

What has changed during maintainance?

Posted: Mon Jun 29, 2015 7:02 am
by chulett
udayk_2007 wrote:Sorry the previous post had smiles enabled
FYI - You could have edited it rather than reposted it.
udayk_2007 also wrote:Does varchar and varchar2 cause any difference ?
No.

Posted: Mon Jun 29, 2015 7:03 am
by udayk_2007
The warning is coming in source stage.

Trying to get the DB maintenance details

Thanks

Posted: Mon Jun 29, 2015 7:14 am
by ArndW
Please activate $OSH_PRINT_SCHEMAS as a parameter and run the job with it set to "true". Look at the schemas to make sure of what datatype the column is at each stage.

Something odd is happening. Is this only for one column or for all text columns? Is this example of a varchar(24) one of the columns that stops erroring after a run or one where the warning remains?

Posted: Fri Jul 03, 2015 12:02 am
by atul9806
It will give warning because source is 24 and we are truncating data to 8, better use the substring functionality. var = trim(input)[1,8]
I hope, we will not get more than 8 char in input