Re: [Q] Frusturating SQL question
Posted in 1996
Saqib Mausoof <ssmaus@ccmail.monsanto.com> wrote:
>I hope someone can help me out of this frustaration. I have a
>tbale in Informix 5.01 that hold information for visitors to our
>site. I need to print out a simple report which shows the number
>of visitors and their time of arrival at midnight everday. A
>simple cron job unloads my query into an ascii file and with a
>little awk manipulation I print the file to the remote site.
>Unfortunately, I can't get my SIMPLE query to work. My date
>column is LASTMOD (DATETIME YEAR TO MINUTE) and I need to get
>data for just one day. My query is
>Select lname, fname, vendor, status, lastmod
>from visitors
>where lastmod = TODAY (YEAR TO MINUTE)
>order by 3,2,1
>This does not work, obviously. But what does work? Any ideas?
>I would be gald of any help.
>Saqib
I think you implied this job runs at midnight or after midnight.
Would you have any records for the new date since the day
changes at midnight. If your wanting the day that just ended
data maybe you need to use TODAY -1.
--
Tolly Brumbelow, Informix DBA
email:tolly.brumbelow@bridge.bellsouth.com