J
John G
I built an ASP.NET page for an access DB I created. I have a query that does
exactly what I need it to do in Access but when I try and use it to populate
a datagrid I get a parse error at the '<' symbol. Could anyone perhaps point
out where I may have gone astray? This is the working Access query:
PARAMETERS MyWorkDay DateTime;
SELECT tblStages.Team, [tblTechs].[First] & ' ' & [tblTechs].[Last] AS
TechName,
Sum(IIf(Format(((DateDiff('n',[Start],[Stop])/60)),'Fixed')<>'',Format(((DateDiff('n',[Start],[Stop])/60)),'Fixed'),'0.00')) AS TotalHours
FROM tblTechs LEFT JOIN tblStages ON tblTechs.VDash = tblStages.Tech
WHERE (((tblTechs.Active)=True) AND
((IIf(Format([Stop],'mm/dd/yy')<>'',Format([Stop],'mm/dd/yy'),Format([MyWorkDay],'mm/dd/yy')))=Format([MyWorkDay],'mm/dd/yy')))
GROUP BY tblStages.Team, [tblTechs].[First] & ' ' & [tblTechs].[Last]
HAVING
(((Sum(IIf(Format(((DateDiff('n',[Start],[Stop])/60)),'Fixed')<>'',Format(((DateDiff('n',[Start],[Stop])/60)),'Fixed'),'0.00')))=0))
ORDER BY tblStages.Team, [tblTechs].[First] & ' ' & [tblTechs].[Last];
I of course drop the PARAMETER statement in the query builder in visual
studio as I pull that from a calendar control in my asp page. Essentially
what I need this to do (and it does in Access) is give me a list of all the
Techs who didn't enter hours for whichever date I specify. outputting:
Team TechName TotalHours
NULL John Doe 0
NULL Jane Doe 0
TIA,
John Hem
exactly what I need it to do in Access but when I try and use it to populate
a datagrid I get a parse error at the '<' symbol. Could anyone perhaps point
out where I may have gone astray? This is the working Access query:
PARAMETERS MyWorkDay DateTime;
SELECT tblStages.Team, [tblTechs].[First] & ' ' & [tblTechs].[Last] AS
TechName,
Sum(IIf(Format(((DateDiff('n',[Start],[Stop])/60)),'Fixed')<>'',Format(((DateDiff('n',[Start],[Stop])/60)),'Fixed'),'0.00')) AS TotalHours
FROM tblTechs LEFT JOIN tblStages ON tblTechs.VDash = tblStages.Tech
WHERE (((tblTechs.Active)=True) AND
((IIf(Format([Stop],'mm/dd/yy')<>'',Format([Stop],'mm/dd/yy'),Format([MyWorkDay],'mm/dd/yy')))=Format([MyWorkDay],'mm/dd/yy')))
GROUP BY tblStages.Team, [tblTechs].[First] & ' ' & [tblTechs].[Last]
HAVING
(((Sum(IIf(Format(((DateDiff('n',[Start],[Stop])/60)),'Fixed')<>'',Format(((DateDiff('n',[Start],[Stop])/60)),'Fixed'),'0.00')))=0))
ORDER BY tblStages.Team, [tblTechs].[First] & ' ' & [tblTechs].[Last];
I of course drop the PARAMETER statement in the query builder in visual
studio as I pull that from a calendar control in my asp page. Essentially
what I need this to do (and it does in Access) is give me a list of all the
Techs who didn't enter hours for whichever date I specify. outputting:
Team TechName TotalHours
NULL John Doe 0
NULL Jane Doe 0
TIA,
John Hem