Bitwise and operator in select statement
Posted in 2000
Topics: SQL Development & Query Writing, Connectivity: ESQL/C, 4GL & Embedded SQL
This is a multi-part message in MIME format. ------=_NextPart_000_005F_01C05EA3.8A59E040 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Is it possible to create an informix select statement in ISQL or I4GL = which uses a bitwise and operator? Or create a view of a table using a = bitwise and operator? Here is what I am trying to accomplish. I have a table consisting of = numerous shipment records from 20 different organizations. When a user = from organization X queries shipments in my database, I do NOT want them = to see shipments in the database going from org. Y to org. Z. However, = they should be allowed to see shipments going from org. Y to org. X.=20 For each shipment record, I want to add an integer user access field = which will be set by the application software based on the value of = certain fields in the shipment record. Each user who accesses my system is assigned a profile contained in an = informix table. I want to set up an integer "access" value in this = profile whose bits will mask with the shipment access field to determine = which shipment records they can access. Example: User 1 has an access profile of 16 (bit 4 set). Shipment 1 has = an access field value of 547 (bits 0,1,5,9 set). Shipment 2 has an = access value of 531 (bits 0,1,4,9 set). User 1 select statements should = show Shipment 2 but not Shipment 1. Any better ideas on how to screen user access are appreciated. Willis Gregory tacedi@series2000.com ------=_NextPart_000_005F_01C05EA3.8A59E040 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content=3D"text/html; charset=3Diso-8859-1" = http-equiv=3DContent-Type> <META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV> <P>Is it possible to create an informix select statement in ISQL or I4GL = which=20 uses a bitwise and operator? Or create a view of a table using a bitwise = and=20 operator?</P> <P>Here is what I am trying to accomplish. I have a table consisting of = numerous=20 shipment records from 20 different organizations. When a user from = organization=20 X queries shipments in my database, I do NOT want them to see = shipments in=20 the database going from org. Y to org. Z. However, they should be = allowed to see=20 shipments going from org. Y to org. X. </P> <P>For each shipment record, I want to add an integer user access field=20 which will be set by the application software based on the = value of=20 certain fields in the shipment record.</P> <P>Each user who accesses my system is assigned a profile contained in = an=20 informix table. I want to set up an integer "access" value in this = profile whose=20 bits will mask with the shipment access field to determine which = shipment=20 records they can access.</P> <P>Example: User 1 has an access profile of 16 (bit 4 set). Shipment 1 = has an=20 access field value of 547 (bits 0,1,5,9 set). Shipment 2 has an access = value of=20 531 (bits 0,1,4,9 set). User 1 select statements should show Shipment 2 = but not=20 Shipment 1.</P> <P>Any better ideas on how to screen user access are appreciated.</P> <P>Willis Gregory</P> <P>tacedi@series2000.com</P> <P> </P> <P> </P> <P> </P></DIV></BODY></HTML> ------=_NextPart_000_005F_01C05EA3.8A59E040--
Related threads
- Conversion to differeent characters sets
- Control of CLIENT_LOCALE and DB_LOCALE at connection (doc issue?)
- Problem in changing locale via dbexport/dbimport
- Re: Matches not Work in 7.30
- DATABASE vs CONNECT TO: Invalid characters error?