Select a value between dates.

2006-04-11 Thread H L
I am far from an mysql expert... but is there a way to select between dates in a table and check if a value exists in all fields between dates. If one day between those dates cannot be booked i dont want to get it in my SUM resultset. I want to calculate Sum between those dates and i one idea

Re: Select Sum with union, tricky question perhaps not for you

2006-04-03 Thread H L
The solution is to redesign your tables. You need to split into separate columns the values you want to maintain. You do not want to keep the "flat file" design you are currently trying to use. CREATE TABLE calendar ( objectid, year, dayofyear, ... other fields... ) CREATE TABLE price

Select Sum with union, tricky question perhaps not for you

2006-04-02 Thread H L
Hi, i have a problem to select sum from same table using UNION. The key question is there a way of combining two questions in one so the resulting objectid in query1 is only used in query 2 in a smart way. Eg. if only one object is avaliable in a search first year then only check that objectid