Hi Twan, Yeah I do actually grab the ProductID's from a form value(s) and also the dates I grab from the user already.. I then just feed them into...
just out of interest.. a long time ago I did use BETWEEN for the dates.. but found that in some cases it would miss certain orders in that date range...
thanks you two! option 2 seems the preferred option Twan as the dates I'll add to the system are already formatted to be the beginning of a set week...
ok slight problem. I need someway of adding a datediff comparison to the last WHERE clause.. SELECT dbo.Products.ProductBrand,...
THANK YOU THANK YOU THANK YOU! I haven't checked the quantities yet but they look about right.. and it works a treat. Sure getting all the dates...
If I take out teh ISNULL wrap I get: the dbo.column preix does not match...........
Hi I get an "Error in list of function arguments: 'SELECT' not recognized. Unable to parse query text." error... when I paste that in...
ok Twan - no problem.. just tell me how to do what you want... basically I'm very much at the beginning of my work with MSSQL and am simply using...
ok another update - I thought the results I was getting was because that query didn't have any grouping - so I added it and now get a "Deferred...
dear me this is doing my head in - so thanks all for your help to this point- I know we are nearly there! here's my current query: SELECT...
oops - still not working. Is Is use the ISNULL wrap it doesn't like it.. if I take that out i get a !MISSING FROM CLAUSE error
ok that first query you said, if I take out the ISNULL part of the nested query i generates errors about orderdetail_retail not matchin a table or...
thanks for the input Twan, The first query you sent seems to have a syntax error somewhere in that nested select but I can't see it myself. the...
ok just noticed - the qty's bought are totally wrong.. Here's the results from the one product version: I get a massive qty for the first week, a...
ok just to update I think that query is not quite right... I've gone so far as to add a daterange WHERE clause to narrow it down to one product in a...
ok nearly there.... ok I know this would return an awful lot of entries, so when I first ran the query I got a timeout.. so thinking it was just...
if I take out the word AND from near that convert function i get a incorrect syntax near 'ON' James
that's doesn't work for me -get unable to parse query.. when trying to run it. James
ok I think you lot have nearly got it there but still a problem. this is the current query I'm using: SELECT dbo.Products.ProductBrand,...
ok just so everyone who is kindly helping me.. I have (as a example) four products, and four years worth of data. For each seven days, I'm using...
Separate names with a comma.