I'm creating a DTS package to import some data from our HP3000, using
the minisoft odbc driver as a linked server within sql server.
I'm importing a table from the HP3000 (which I've done lots of times
for lots of projects), however, this time I'm actually being given
negative money values. The HP3000 guy swears that he's sending me the
data as Signed 32bit Integer (Int32). However, when I view the data
in query analyzer, it appears to be unsigned 64 integer format
(UInt64).
For example, when viewing the data in query analyzer, I see
18446744073702169541 instead of the -7382075 expected value (in
pennies). The only thing I can think of, is that the HP3000 doesn't
really store Int32 values, but instead converts all values to UInt64.
And the HP3000 guy is just abstracted from this conversion. Or the
HP3000 guy is lousing up the data in someway, before it gets to me.
Now, I can do the import first, importing these bad values into
VarChar fields. Afterwhich, I can run a vb.net executable to update
the data to the correct values, but this is a really crappy work
around.
Dim z As UInt64 = UInt64.Parse("18446744073702169541")
Response.Write("CONVERSION: " & z.GetHashCode)
Does anyone know how I can do a UInt64 to Int32 conversion within the
DTS package itself? Thanks!