Hi,
I have an sql script, which updates some values by using BIT operations..
ex:
UPDATE table1
SET myValue = myValue & ~mask | (availability - mask)...
Problem is, this returns a value, when written to binary, it's one bit too long!
ex:
(= 62)
which should be:
(=31)
How can I "drop" this last BIT?
(Keep in mind that I store these values as LONGINT's)...
Been fighting with this one all day..
Try this...
Code Snippet
select cast(substring(rtrim(convert(char(19),<columnName>)),1,len(rtrim(convert(char(19),<columnName>)))-1) as bigint)
No comments:
Post a Comment