SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 need help with cast statement
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

AdamWest
Constraint Violating Yak Guru

USA
302 Posts

Posted - 07/05/2012 :  14:57:59  Show Profile  Reply with Quote
what does this here mean? I have to translate to Oracle.


"AND CAST(FLAGS AS BIGINT) & 1 = 1 "

webfred
Flowing Fount of Yak Knowledge

Germany
8529 Posts

Posted - 07/05/2012 :  15:02:50  Show Profile  Visit webfred's Homepage  Reply with Quote
The Column Flags is converted to BIGINT and then there a "bitwise AND" performed with 1

http://msdn.microsoft.com/en-us/library/ms174965


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
48073 Posts

Posted - 07/05/2012 :  15:05:04  Show Profile  Reply with Quote
its checking if leftmost bit of FLAGS is set & represents bitwise AND operation

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

webfred
Flowing Fount of Yak Knowledge

Germany
8529 Posts

Posted - 07/05/2012 :  15:17:30  Show Profile  Visit webfred's Homepage  Reply with Quote
quote:
Originally posted by visakh16

its checking if leftmost bit of FLAGS is set & represents bitwise AND operation

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/




I believe it is the rightmost bit - if not then please enlighten me.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
48073 Posts

Posted - 07/05/2012 :  15:18:48  Show Profile  Reply with Quote
quote:
Originally posted by webfred

quote:
Originally posted by visakh16

its checking if leftmost bit of FLAGS is set & represents bitwise AND operation

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/




I believe it is the rightmost bit - if not then please enlighten me.


No, you're never too old to Yak'n'Roll if you're too young to die.


sorry my bad
its rightmost bit
time for a coffee i guess

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000