February 20, 2006 at 4:42 am
Hello, I am trying to find a way of storing a 64 bit number in SQL Server 7. The apparent absence of the Bigint data type available in SQL 2000 is a worry. Does anyone know how this could be done (maybe using float?). Any suggestions would be appreciated.
Thanks
Graham
February 21, 2006 at 6:14 am
Try:
DECLARE @bigInt decimal(38,0)
SET @bigint = 65536.0 * 65536 * 65536 * 65536
-- or
-- SET @bigint = Cast(65536 as Dec(38,0)) * 65536 * 65536 * 65536
PRINT @bigInt
February 21, 2006 at 6:41 am
Depending on your needs, you could store a 16 character hexadecimal string value, which your application could encode and decode as needed...
April 5, 2006 at 5:18 am
Sorry for the delay. Thanks for your suggestions, both of which are useful.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply