[Zope-DB] ZSQL - Year, Month, Date issue HELP!

Charlie Clark charlie@begeistert.org
Thu, 06 Feb 2003 20:51:05 +0100

On 2003-02-06 at 18:25:58 [+0100], Roderick Silva wrote:

something unintelligible as an HTML-attachment:

The attached code=A0will work correctly as long as I don't cross over the=20
year. Once I do that the numbers get all messed up. In other words if I=20
choose 02/31/02 to 03/31/02 I=20
am ok. Once I choose 12/31/02 to 1/31/03 the numbers get messed up.

I was told that I should concat. Can someone point the way? Can someone=20
write one line of it for me?=20

Once I can start helping out on the list I will. Right now I am not much=20
help unless you need Flash work in return. That I can do well.=20




select tblproblemtype.name as Problem_Type, count(*)as total from=20
tblservicerequest, tblproblemtype=20
=A0=A0=A0 year(timelogged) =3D <dtml-var=20
"REQUEST.form['subfield_startdate_year']">=A0 and <dtml-var=20
=A0=A0=A0 month(timelogged) =3D <dtml-var=20
"REQUEST.form['subfield_startdate_month']">=A0 and <dtml-var=20
=A0=A0=A0 day(timelogged) between <dtml-var=20
"REQUEST.form['subfield_startdate_day']">=A0 and <dtml-var=20
=A0=A0=A0 tblservicerequest.problemtype =3D tblproblemtype.id
group by tblproblemtype.name
order by tblproblemtype.name

Can you please explain what you want to do, I don't quite understand it.

Charlie Clark
Helmholtzstr. 20
D- 40215
Tel: +49-211-938-5360