data trunction when i am load into target as sql server

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
kethya11
Participant
Posts: 7
Joined: Mon Feb 17, 2014 2:55 am

data trunction when i am load into target as sql server

Post by kethya11 »

My Source have sql server datatype has number,target have sql server datatype has sql server.When i am loading soure to tartget,data will be truncated.
Ex:Source has 16.8 target loaded to 16.799992372605.
i am not use any convertion function.Please let me know have idea in this.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: data trunction when i am load into target as sql server

Post by chulett »

kethya11 wrote:target have sql server datatype has sql server.
:?:

Anyway, perhaps the replies here can help, even if they are about Oracle.
-craig

"You can never have too many knives" -- Logan Nine Fingers
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Re: data trunction when i am load into target as sql server

Post by SURA »

Use the Sever job to load and compare the value.
Thanks
Ram
----------------------------------
Revealing your ignorance is fine, because you get a chance to learn.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Re: data trunction when i am load into target as sql server

Post by ray.wurlod »

kethya11 wrote:My Source have sql server datatype has number,target have sql server datatype has sql server.When i am loading soure to tartget,data will be truncated.
Ex:Source has 16.8 target loaded to 16.799992372605.
i am not use any convertion function.Please let me know have idea in this.
Can you please report the SQL data type, the precision and the scale for this column on both source and target?

"sql server" is not a data type.

Please advise also whether you imported the table definitions from source and from target before constructing this job?

Finally, please advice with which stage types you are connecting to the SQL Server database(s).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kethya11
Participant
Posts: 7
Joined: Mon Feb 17, 2014 2:55 am

Re: data trunction when i am load into target as sql server

Post by kethya11 »

Hi Ray,

Thank for your reply

i am wrongly posted datatype ,datatype has float .Its no precision and scale values.
After construct the job am imported the meta data.I a, I am using the odbc connecter stage.

Please help me.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The float and dfloat data types are not guaranteed to store data to the final significant digits accurately. Research the IEEE specifications for storing these data types for the reasons why. I'd suggest you specify at least a scale value (ideally a precision value also), and perhaps treat the data type as decimal (though you may have to ignore/demote metadata mismatch warnings).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Post by SURA »

To load the float value i use Server job and not PX. PX always give different value whereas server is not.
Thanks
Ram
----------------------------------
Revealing your ignorance is fine, because you get a chance to learn.
kethya11
Participant
Posts: 7
Joined: Mon Feb 17, 2014 2:55 am

Post by kethya11 »

Thanks for giving reply to all
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Post by SURA »

use Double data type.
Thanks
Ram
----------------------------------
Revealing your ignorance is fine, because you get a chance to learn.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Double is the same as dfloat.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply