How to - Print Bit Pattern of Permissions Mask
The following SQL is an example of how to print a bit pattern for the bot mask of a permission in LiveLink.The solution (sql statement) provided is a generic sql statement applicable only in the Oracle environment.It is not a turn key solution, and so you will have to make the necessary changes to make it work agains the LiveLink schema. However it does demonstrate a method of determining if a bit is set (1) or clear (0), and a method of printing the entire bit mask.Hope this helps. If it does your response to this thread will be greatly appreciated.The sql statement that prints the bit pattern:select C1,( decode(bitand(c1,1),0,'0',1)|| decode(bitand(c1,2),0,'0',1)|| decode(bitand(c1,4),0,'0',1)|| decode(bitand(c1,8),0,'0',1)|| decode(bitand(c1,16),0,'0',1)|| decode(bitand(c1,32),0,'0',1)|| decode(bitand(c1,64),0,'0',1)|| decode(bitand(c1,128),0,'0',1)|| decode(bitand(c1,256),0,'0',1)|| decode(bitand(c1,512),0,'0',1)|| decode(bitand(c1,1024),0,'0',1)|| decode(bitand(c1,2048),0,'0',1)|| decode(bitand(c1,4096),0,'0',1)|| decode(bitand(c1,8192),0,'0',1)|| decode(bitand(c1,16384),0,'0',1)|| decode(bitand(c1,32768),0,'0',1)) as "12345678901234567890"from bit/The results as displayed for a sample table called BIT: C1 1234567890123456---------- ---------------- 1 1000000000000000 12 0011000000000000 0 0000000000000000 15 1111000000000000 36865 1000000000001001 36869 10100000000010016 rows selected.SQL> desc bit; Name Null? Type ----------------------- -------- ---------------------------- C1 NUMBERSQL> SQL> select * from bit; C1---------- 1 12 0 15 36865 368696 rows selected.Mohsin JessaOCP-DBA(8i,9i,10g)