Hello...
I have a table with a number of fields along with a time stamp column... I am wondering how I can query for only rows inserted on the current date other than manually entering the date parameter... An example below:
Let's say I had a table like this:
OFF_ID OFFER RESULT ENTRY_TS
2719 MAGAZINE NOT INTERESTED 2006-09-27 16:11:06.678
2720 CAR ACCEPT 2006-09-27 16:15:02.231
2721 VACATION ACCEPT 2006-09-28 08:32:16.547
2722 T-SHIRT NOT INTERESTED 2006-09-28 08:41:22.812
I would use the following to get a count of just rows from today:
SELECT COUNT (*)
FROM INFO_TABLE
WHERE INFO_TABLE.ENTR Y_TS > '2006-09-28';
However, I would like to instead have a query where it automatically pulls rows based on the current date without having to manually enter the date...
By the way, I am using MySQL against an MS SQL Server Database...
Thanks in advance for any assistance.
I have a table with a number of fields along with a time stamp column... I am wondering how I can query for only rows inserted on the current date other than manually entering the date parameter... An example below:
Let's say I had a table like this:
OFF_ID OFFER RESULT ENTRY_TS
2719 MAGAZINE NOT INTERESTED 2006-09-27 16:11:06.678
2720 CAR ACCEPT 2006-09-27 16:15:02.231
2721 VACATION ACCEPT 2006-09-28 08:32:16.547
2722 T-SHIRT NOT INTERESTED 2006-09-28 08:41:22.812
I would use the following to get a count of just rows from today:
SELECT COUNT (*)
FROM INFO_TABLE
WHERE INFO_TABLE.ENTR Y_TS > '2006-09-28';
However, I would like to instead have a query where it automatically pulls rows based on the current date without having to manually enter the date...
By the way, I am using MySQL against an MS SQL Server Database...
Thanks in advance for any assistance.
Comment