September 8, 2009 at 11:34 pm
Hey I am new to this forum, hope i am posting my query at the right place.
I am using uint datatype in c# however to save storage i am converting them into int and storing them in SQL as both uint and int are of 4 byte excepts that int can store -ve values. so any positive uint value which is over the range of int is converted as -ve value and is stored, while retrieving it i convert it into +ve uint value. Now my questing is, why the following two commands give different outputs, please help me understand.
1. select convert(bigint,convert(binary(8),3000000001))
2. DECLARE @i BIGINT = 3000000001
select convert(bigint,convert(binary(8),@i))
Thanks in advance.
Naresh
September 9, 2009 at 12:37 am
This is a duplicate of http://www.sqlservercentral.com/Forums/Topic784712-146-1.aspx
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply