Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Dirk Emmermacher's report query using gebdat between (today - 6570) and (today - 10950) returned nothing. Ferro pointed out that today - 10950 is the smaller date, so the BETWEEN bounds were reversed. Dirk confirmed he changed his code and it now works. bozon added that stating that no error occurred but no rows were returned would have made the problem easier to find.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Hi folks,
Look at the detail: is today - 6570 > than today - 10950
or is today - 10950 > than today - 6570 ???
I mean the correct statement should be:
if gebdat between (today - 10950) and (today - 6570)
Of course, today -10950 is LESS than today - 6570 !!
Best regards !!
Ferronato
emmermacher@hotmail.com escreveu:
> Hello list.
>
> I'got a small problem with one report.
> I have to write a report which results is an overview about age
> distribution in one table
>
> I try to use the if statement like
> if gebdat between (today - 6570) and (today - 10950)
>
> Gebdat is a date-type field.
> How can get result a want to have?
> IDS is an very old 7.30
>
> Any ideas?
>
> Thanks in advance for your friendly advices.
>
> Best regards.
>
> Dirk Emmermacher
Hello Ferro.
Thanks for your tip.
I see that "between" is not right here. I changed my source code.
Now it works.
Best regards from Hannover, Germany.
Dirk Emmermacher
Ferro schrieb:
> Hi folks,
>
> Look at the detail: is today - 6570 > than today - 10950
> or is today - 10950 > than today - 6570 ???
> I mean the correct statement should be:
>
> if gebdat between (today - 10950) and (today - 6570)
>
> Of course, today -10950 is LESS than today - 6570 !!
>
> Best regards !!
>
> Ferronato
>
> emmermacher@hotmail.com escreveu:
>
> > Hello list.
> >
> > I'got a small problem with one report.
> > I have to write a report which results is an overview about age
> > distribution in one table
> >
> > I try to use the if statement like
> > if gebdat between (today - 6570) and (today - 10950)
> >
> > Gebdat is a date-type field.
> > How can get result a want to have?
> > IDS is an very old 7.30
> >
> > Any ideas?
> >
> > Thanks in advance for your friendly advices.
> >
> > Best regards.
> >
> > Dirk Emmermacher
Nice catch, I read right past that and assumed it was correct. I was
then puzzled about what was actually wrong.
Ferro wrote:
> Hi folks,
>
> Look at the detail: is today - 6570 > than today - 10950
> or is today - 10950 > than today - 6570 ???
> I mean the correct statement should be:
>
> if gebdat between (today - 10950) and (today - 6570)
>
> Of course, today -10950 is LESS than today - 6570 !!
>
> Best regards !!
>
> Ferronato
>
> emmermacher@hotmail.com escreveu:
>
> > Hello list.
> >
> > I'got a small problem with one report.
> > I have to write a report which results is an overview about age
> > distribution in one table
> >
> > I try to use the if statement like
> > if gebdat between (today - 6570) and (today - 10950)
> >
> > Gebdat is a date-type field.
> > How can get result a want to have?
> > IDS is an very old 7.30
> >
> > Any ideas?
> >
> > Thanks in advance for your friendly advices.
> >
> > Best regards.
> >
> > Dirk Emmermacher
If the original reporter had included the information that he was not
getting any errors but no results were returned from the query we would
have found the problem easier. So, remember to include notes about what
is exactly happening.
bozon wrote:
> Nice catch, I read right past that and assumed it was correct. I was
> then puzzled about what was actually wrong.
>
> Ferro wrote:
> > Hi folks,
> >
> > Look at the detail: is today - 6570 > than today - 10950
> > or is today - 10950 > than today - 6570 ???
> > I mean the correct statement should be:
> >
> > if gebdat between (today - 10950) and (today - 6570)
> >
> > Of course, today -10950 is LESS than today - 6570 !!
> >
> > Best regards !!
> >
> > Ferronato
> >
> > emmermacher@hotmail.com escreveu:
> >
> > > Hello list.
> > >
> > > I'got a small problem with one report.
> > > I have to write a report which results is an overview about age
> > > distribution in one table
> > >
> > > I try to use the if statement like
> > > if gebdat between (today - 6570) and (today - 10950)
> > >
> > > Gebdat is a date-type field.
> > > How can get result a want to have?
> > > IDS is an very old 7.30
> > >
> > > Any ideas?
> > >
> > > Thanks in advance for your friendly advices.
> > >
> > > Best regards.
> > >
> > > Dirk Emmermacher
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.