the input is a table in the sql server. A field is a bit (0 or 1).
the output is a sequential file. In the transformer stage, I set the corresponding output field's SQL type also be BIT.
The problem is when I view the output seqential file, I saw 1 in the sql server database table became -1 in the sequential file.
What did I miss here? I know I can manually get the right number by -1.
Just curious what's going on behind it.
Thanks.
Problem with BIT as SQL type
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The bit datatype uses the most significant bit in its byte. This is the sign bit. In a twos-complement machine the bit pattern 10000000 represents -1. There's nothing you can do about that. Why not apply the Abs() function?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.