Data truncation
Posted: Wed Feb 09, 2011 12:24 am
Hi,
I have a field named material in my database which is of length 18.But the max length of the value is 7.I am using the below query and specified the column length as 12 because I am joining with similar column of length 12.But i am getting the below warning..
If I set it as 18 as in Database then I have issues in joining as the similar couln to join has length 12.
Can any one help me with this.
Query used:
select substr(MATERIAL,1,max(length(ltrim(rtrim(MATERIAL)))))as MATERIAL from A GROUP BY MATERIAL
Warning:
The size specified for column 'MATERIAL' (12) is less than that of the source table column (18);data truncation may result.
I have a field named material in my database which is of length 18.But the max length of the value is 7.I am using the below query and specified the column length as 12 because I am joining with similar column of length 12.But i am getting the below warning..
If I set it as 18 as in Database then I have issues in joining as the similar couln to join has length 12.
Can any one help me with this.
Query used:
select substr(MATERIAL,1,max(length(ltrim(rtrim(MATERIAL)))))as MATERIAL from A GROUP BY MATERIAL
Warning:
The size specified for column 'MATERIAL' (12) is less than that of the source table column (18);data truncation may result.