Bitwise Operator

  • Is there any other information available on bitwise operators in SQL? I have a table with several columns that stores the data in the following format ('AA,BB,CC,DD') and would like to find an alternate way of storing the information for better searches in the future. Any help would be greately appreciated.

  • Any other information on bitwise operators besides what? What information do you have or have you read so far?

    Could you provide a little more information about your data? Are you suggesting that the values "AA,BB,CC,DD" are all stored in one column in your table? What do these values represent, and how do you envision bitwise operators pertaining to your problem?

    Thanks,

    Matthew Burr

  • I read the following article from this site: Using Bitwise Operators to Boost Performance. I wanted a few ideas how to redesign this table to increase performance while minimizing the storage (number of rows) required to store each of the users responses...which in some cases can be as many as ('AA,BB,CC,DD,EE,FF,GG,HH,II,JJ,KK,LL,MM,NN,OO,PP). The values are stored in one column and each represents a specific value that a lookup table will be built for. Currently the searches use the LIKE operator (LIKE '%BB%') etc... I wanted to find out if there is a way I can store this data that wouldn't require a table that repeated the data excessively.

    Thanks

  • Yes, I can see how your current design would be inefficient. Well, there is documentation in Books Online about the bitwise operators and how they work. They will be most effective if the questions that your users are responding to are YES/NO or TRUE/FALSE type questions. I don't want to spend time going over things you may already understand, so take a look at what you can find in Books Online and if there are specific questions you have about bitwise operators or how to adjust your schema, could you post those questions? That way we won't spend time talking about things you may already understand, and we can just concentrate on what you specifically need help with.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply