November 24, 2009 at 12:15 pm
I am using Dreamweaver MX4 with an ASP webpage that I have ODBC Access Table.
Code1 works fine IF I put in a start and end date.
As soon as I remove the hard-coded dates so that a user can input the desired dates from a webpage form I get ERROR the specified expression Field3 is not part of an aggregated function.
Does anyone know what the Dreamweaver problem is?
I can supply the entire source code if needed.
Thank you....
Rick:-):-)
Code1
SELECT Field3, Field10 , SUM(Field16) as SumofField16
FROM CustomerHistory_CP
WHERE Field3 LIKE '%Search_Criteria%' AND Field6 >= #2009-01-01# AND Field6 <= #2009-10-31# GROUP BY Field3, Field10
Code2
SELECT Field3, Field10 , SUM(Field16) as SumofField16
FROM CustomerHistory_CP
WHERE Field3 LIKE '%Search_Criteria%' AND Field6 >= #StartDate# AND Field6 <= #EndDate# GROUP BY Field3, Field10
November 24, 2009 at 1:01 pm
There seems to be no change in Code1 and Code2 except hardcoded values..
Are you making sure the Date value entered by the user (date input) is a valid date format.
Is the front-end application performing the check on the user input?
Blog -- LearnSQLWithBru
Join on Facebook Page Facebook.comLearnSQLWithBru
Twitter -- BruMedishetty
November 24, 2009 at 1:06 pm
I don't really know dreamweaver but it seems to me the issue must have something to do with the way you are passing the date variables. Are you using the right syntax?
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply