Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2012

    Unanswered: bigint left and right shift

    Hi all,
    I need two SQL Server functions for the left shift and right shift of a bigint.

    I found this article providing an integer left and right shift, but I need the same for a bigint.

    If there's some SQL Server expert that can tell me how to do it (maybe adjusting the functions in the article) this would be of great help.

  2. #2
    Join Date
    Oct 2007
    Provided Answers: 9
    wouldn't casting/converting to BIGINT/CHAR do the same? Think with CHAR it may put leading 0's, but you can strip them out.

  3. #3
    Join Date
    Jan 2013
    Provided Answers: 1
    SQL is intended to be a high level language, not assembly language. While you can do it. It's not a good idea and it will give code that will never port to a different piece of hardware (are you a high-end or low end machine?) . What are you actually trying to do at a high abstract level, and not at the machine level?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts