Hi,
My table definiton column is varchar ,and coulmn coming from source in the sense extracted from flat files is char ,so i changed the target value from varchar to char.All this is for only a single column issue
but when i tryed to test in a sample job taking the source table definition column as varchar and source field as char and target as varchar. my record are not load into the target dataset.
Could anyone help on this.
Thanks
sunitha
string to decimal conversion
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 98
- Joined: Thu Feb 05, 2009 1:14 am
- Location: visakhapatnam
- Contact:
-
- Participant
- Posts: 98
- Joined: Thu Feb 05, 2009 1:14 am
- Location: visakhapatnam
- Contact:
Hi,
The values are somewhat like
000000000782911
0000000813736
000000145
00000898545,
coming from source after doing string to decimal and decimal to string conversion ,the values are losing their least sigificant values
consider the value coming after conversion is 14567.87, it is coming as 14567.8 that means the values above 10000.00 we could not be accurate values,basically when we check in DSmanager the column in field def iS varchar and in source it was char and my target value should be varchar again.we cannot modify the source column datatype we are doing this conversion.
Can u help mein resolving this issue.
Thanks
Sunitha
The values are somewhat like
000000000782911
0000000813736
000000145
00000898545,
coming from source after doing string to decimal and decimal to string conversion ,the values are losing their least sigificant values
consider the value coming after conversion is 14567.87, it is coming as 14567.8 that means the values above 10000.00 we could not be accurate values,basically when we check in DSmanager the column in field def iS varchar and in source it was char and my target value should be varchar again.we cannot modify the source column datatype we are doing this conversion.
Can u help mein resolving this issue.
Thanks
Sunitha
-
- Participant
- Posts: 98
- Joined: Thu Feb 05, 2009 1:14 am
- Location: visakhapatnam
- Contact:
Hi,
source is sequential file and target is a dataset.
1) 100023 is the source value
after conversion
Stringto Decimal(DsLink6.VAR1)/100)->10000.2
DecimaltoString(var1,"suppress zero)->10000.2
2)12345 is source value
after conversion
Stringto Decimal(DsLink6.VAR1)/100)->123.4
DecimaltoString(var1,"suppress zero)->123.45
3)6244544 source value
Stringto Decimal(DsLink6.VAR1)/100)->62445.4
DecimaltoString(var1,"suppress zero)->62445.4
THIS IS MY PROBLEM
Thanks
Sunitha
source is sequential file and target is a dataset.
1) 100023 is the source value
after conversion
Stringto Decimal(DsLink6.VAR1)/100)->10000.2
DecimaltoString(var1,"suppress zero)->10000.2
2)12345 is source value
after conversion
Stringto Decimal(DsLink6.VAR1)/100)->123.4
DecimaltoString(var1,"suppress zero)->123.45
3)6244544 source value
Stringto Decimal(DsLink6.VAR1)/100)->62445.4
DecimaltoString(var1,"suppress zero)->62445.4
THIS IS MY PROBLEM
Thanks
Sunitha
to reiterate:
(and post your settings as well)dsusr wrote:...check the precision and scale...
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 98
- Joined: Thu Feb 05, 2009 1:14 am
- Location: visakhapatnam
- Contact: