August 2, 2010 at 5:44 am
Hi,
I would like to store binary data (i.e) '100100100010000' of length more than 500 and fixed for the column.
Can anyone tell me what are the DataTypes that I can use for this to design the table and also the best one to apply?
We have designed the table with Char datatype but the client wants an alternative.
I have tried with Binary and VarBinary datatype. But these datatypes store the information only as Hexadecimal values.
I need some help on this very urgently,
Thanks,
Sarath
August 2, 2010 at 5:52 am
Hi sarath,
I think you can use Bigint,As u told the remaining datatypes like varbinary and binary will give hexadecimal values.
Regards
Varun R
August 2, 2010 at 6:32 am
Varun,
Thanks for your reply, but the data I wish to store has to be retained in the same format even if the values preced with 0 (e.g) 0000000001010000010.
And also bigint ranges from -9223372036854775808 through 9223372036854775807. Length of the data I have to store is more than 500 characters.
regards
Sarath
August 2, 2010 at 6:39 am
I think your best bet is VARBINARY. You'll need something like a user-defined function to convert to and from the datatype, but there really isn't a better datatype for storing binary data greater than 64 bits.
August 2, 2010 at 9:44 pm
Hi sarath,
Store it as varchar in DB
Regards
Varun R
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply