cancel
Showing results for 
Search instead for 
Did you mean: 

convert int to string in xml extract

former_member214617
Participant
0 Kudos
1,248

Hi

while extracting the data from xml file to sql tables, there is one problem coming up... as in xml column u_type is of int datatype but the actual data is like 1B,1H... and after extraction 1,2 is going inside the sql table..

i tried using the cast function as cast(u_type,'varchar(4)') but it is not working.. getting warning

Cannot convert data <1H> into type <INTEGER>. Context: Column <Column u_type>.

Any idea

regards

View Entire Topic
mohan_salla
Participant
0 Kudos

Hallo Leo,

It seems, the problem is in your XML structure file(XSD), Change the data type of that field to varchar(4) at Structure file level.

cheers