What's the neatest way to convert a BIGINT to binary? I have some ideas but what's the most elegant?
-
Show this thread
-
can do it pretty easily in python but let me expand I ultimately want a string representation of a BIGINT decimal recast to binary eg 257 --> '10000001' but imagine larger powers of 2 much larger 2^(5000)
3 replies 0 retweets 10 likesShow this thread -
Ideally entirely in SQL
5 replies 0 retweets 14 likesShow this thread -
oh right BIGINT is only 64 bits fuck not so clever are you now data engineers I need THOUSANDS of bits
4 replies 0 retweets 13 likesShow this thread -
Replying to @eigenrobot
No problem. Use type NUMERIC: # SELECT CAST(2 AS NUMERIC)^5000; 141246703213942603683520966701614733366889617518454111681368808585711816984270751255808912631671152637335603208431366082764203838069979338335971185726639923431051777851865399011877999645131707069373498...909376
1 reply 0 retweets 3 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.