bit shift 
Author Message
 bit shift
Is there any bit shift operator in sql server ?

Thanks.
- Ratnadeep



Tue, 27 Sep 2005 14:21:58 GMT
 bit shift

No. However, all the bitwise operators work only with integers, therefore
multiplying an integer by 2 can be used to achieve a left bit-shift.

--
David Portas
------------
Please reply only to the newsgroup
--


Quote:
> Is there any bit shift operator in sql server ?

> Thanks.
> - Ratnadeep



Tue, 27 Sep 2005 17:48:27 GMT
 bit shift
ya, but that has a limit i.e 64 bits ( size of bigint ) , not more than
that.
i think that MySQL has those explicit shift operators ( << and  >> ) but
there also they work on integers and hence put a limitation on their use.
what for bigger numbers than this ?

Thanks.
- Ratnadeep


Quote:
> No. However, all the bitwise operators work only with integers, therefore
> multiplying an integer by 2 can be used to achieve a left bit-shift.

> --
> David Portas
> ------------
> Please reply only to the newsgroup
> --



> > Is there any bit shift operator in sql server ?

> > Thanks.
> > - Ratnadeep



Tue, 27 Sep 2005 19:08:28 GMT
 bit shift
If you want to handle long bit-strings then SQL is not the way to do it.
Can't you use the host language on your client?

--
David Portas
------------
Please reply only to the newsgroup
--


Quote:
> ya, but that has a limit i.e 64 bits ( size of bigint ) , not more than
> that.
> i think that MySQL has those explicit shift operators ( << and  >> ) but
> there also they work on integers and hence put a limitation on their use.
> what for bigger numbers than this ?

> Thanks.
> - Ratnadeep



> > No. However, all the bitwise operators work only with integers,
therefore
> > multiplying an integer by 2 can be used to achieve a left bit-shift.

> > --
> > David Portas
> > ------------
> > Please reply only to the newsgroup
> > --



> > > Is there any bit shift operator in sql server ?

> > > Thanks.
> > > - Ratnadeep



Tue, 27 Sep 2005 20:16:40 GMT
 
 [ 4 post ] 

 Relevant Pages 

1. Bit Shifting Operations

2. Bit Shifts?

3. bit shift

4. 64 bit - Windows Liberty 64bit, Windows Limited Edition 64 Bit, Microsoft SQL Server 2000 Developer Edition 64 Bit, IBM DB2 64 bit - new !

5. 16 bit + 32 bit apps complaining

6. BIT/BIT VARYING status

7. Using 16 bit application with 32 Bit drivers

8. Convert 32 bit component to 16 bit ??

9. Convert SQL databbase from 16 bit to 32 bit

10. 16 bit/32 bit

11. 16 bit ODBC drivers in the 32 bit environment

12. 16-bit applications in a 32-bit environment...


 
Powered by phpBB® Forum Software