Issue with decimal data type in look up transforamtion
Hello, I need to compare a decimal column in sql server and one in DB2 with decimal(6,0) data type. when I try to do this compare through look up it showing precision is not matching, when I check in advanced column editor, for sql its taking precision 6 but for DB2 its taking precision 0, do you guys have any idea on how to resolve this precision issue in look up transformation thanks Sam.
April 19th, 2011 12:22pm

you can use data conversion transform to convert those decimal columns to same one.http://www.rad.pasfu.com
Free Windows Admin Tool Kit Click here and download it now
April 19th, 2011 12:35pm

here both the columns are with same datatype decimal(6,0) then why should we need to change to some other datatypes, problem is while look reading its reading as decimal of precision '0', if we can solve this by converting to some other datatypes can you please suggest me thanks Sasi.
April 19th, 2011 12:46pm

here both the columns are with same datatype decimal(6,0) then why should we need to change to some other datatypes, In your first post, you said they don't have the same precision. The error says they don't have the same precision. And now you say the are the same datatype, namely decimal(6,0). So what is it? Are they the same or not? If not, convert the data in the dataflow to the datatype that you need using the data conversion component.MCTS, MCITP - Please mark posts as answered where appropriate.
Free Windows Admin Tool Kit Click here and download it now
April 19th, 2011 1:51pm

@ Koen Verbeeck both are of data type decvimal(6,0), but when I try to compare them in look up transformation one in sql its reading precision in advanced editor as 6 but one in DB2 the precision is reading as 0, it might be the problem it showing as precision do not match. Sam.
April 19th, 2011 2:13pm

An other option to make them equal (if they aren't), could be to cast in your lookup query like this: Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com
Free Windows Admin Tool Kit Click here and download it now
April 19th, 2011 2:13pm

To complement on Joost's excellent suggestion: if you are using DB2 as the lookup table, make sure you use SQL syntax that DB2 can handle (CAST should probably work fine, it is the names of the datatypes I'm worried about).MCTS, MCITP - Please mark posts as answered where appropriate.
April 19th, 2011 2:17pm

thanks for working me but here both data types are decimal(6,0) input is from SQL and i am comparing with DB2 table in look up, its showing an error because of precision, please help me in this regard thanks Sam.
Free Windows Admin Tool Kit Click here and download it now
April 19th, 2011 2:25pm

Sam:What is the exact error message you are getting? Did you try to convert to numeric? I recall numeric worked for me.Arthur My Blog
April 19th, 2011 2:32pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics