[SQL] a celko-puzzle from long time ago

2006-11-06 Thread stig erikson
While reading celko's SQL puzzles (second edition) i followed a reference to http://www.dbmsmag.com/9801d06.html. There is a puzzle that counts items in boxes. When i try to run the proposed solution on PG 8.1.5, PG says: ERROR: column reference qty is ambiguous apparently the variable

Re: [SQL] A Not Join

2005-11-26 Thread stig erikson
L van der Walt wrote: I have three table: Users - Contains username, ID etc... Permissions - A permission name and ID Link up table - The user.id and permission.id If a user.id and a permission.id row exists in the linkuptable the user have that permission granted. With the statement

[SQL] 1-byte integers

2004-09-18 Thread stig erikson
how can i specify an integer to be one byte byte or even 4 bits long? int1, int(1), tinyint are nowhere to be seen. smallest i can find is smallint that is 2 bytes. in a table i will have a few columns with values between 0 and 15, so optimally i am looking for some kind of unsigned 4-bits, or