When I apply Left(DSLink2.src_surrogate_comp,19) to
00012109614152087431682301311722200502
00012109614155689601682301311722200502
it gives
1210961415208743
1210961415568960 which is expected.
But when i apply for
99999999999999999999999999999999900001
99999999999999999999999999999999900002
it gives
9223372036854775807
9223372036854775807
I need to do for Right(DSLink2.src_surrogate_comp,19) and I am getting same output.
Anybody has any idea.........whats going on? and how to debug this.
There is a huge difference between a number that starts with 12 and a number that starts with 99.
See how much is 2^63. I bet its what you are getting.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
[quote="DSguru2B"]There is a huge difference between a number that starts with 12 and a number that starts with 99.
See how much is 2^63. I bet its what you are getting. ...[/quote]
Thanks. I changed SQL type from BigInt to Varchar and I'm getting the required result. Thanks again for your help. I will mark it as resolved.