Group-wise maximum

2006-05-05 Thread Ian Klassen
Hello, I'm working on using a temporary table to get the group-wise maximum for a number of items. I have a table structure like: CREATE TABLE item ( item_id int not null primary key, name varchar(100) not null); CREATE TABLE attribute_a ( index (item_id, time_id), item_id int not null, time

Re: Database design help

2006-01-20 Thread Ian Klassen
If you give this due consideration, you may find that a lot of your problem evaporates and the rest gets simpler to handle. Just a general observation made by a disinterested third party; ignore it if you like :-) Rhino - Original Message - From: "Ian Klassen" <[EMAIL PROTECTED]

Re: Database design help

2006-01-20 Thread Ian Klassen
n't that important and could be omitted with no important loss of functionality? If you give this due consideration, you may find that a lot of your problem evaporates and the rest gets simpler to handle. Just a general observation made by a disinterested third party; ignore it if you like

Re: Database design help

2006-01-20 Thread Ian Klassen
>close the store and want to take a full inventory we first run a report > >that get the sums of all the transactions for each product and that tells > >us what should be on the shelf according to the database. Then we verify > >or adjust the qty for each product on the shelf b

Re: Database design help

2006-01-18 Thread Ian Klassen
abase. Then we verify or adjust the qty for each product on the shelf by adding a record to the transaction log indicating the quantity and the type of transaction that occurred. When we want to see the values in the inventory its a very simple report to get the sums for each product. - Ho

Re: Database design help

2006-01-18 Thread Ian Klassen
s the way I would do it. What you think? mpneves On Wednesday 18 January 2006 18:09, Ian Klassen wrote: > Hi all, > > I'm trying to figure out a solution to the following problem. > > Let's say I have a store with various products. I take inventory of these > pr

Database design help

2006-01-18 Thread Ian Klassen
Hi all, I'm trying to figure out a solution to the following problem. Let's say I have a store with various products. I take inventory of these products on different days. At any given time I want to view what the inventory is for the entire store. I also want to know whether the inventory