iluvwitter
MIS
Hi,
I'm really new to SQL. I am trying to set up a query that runs automatically daily to pull any data populated in a table for the present day (not just for today but ongoing daily). I do not want to have to have to update the date in the query daily. The table only populates with codes of jobs ran that day with a timestamp for each code.
So for today (7/22) we might have codes A and C, and yesterday we might have had A, B, and C. I want to be able to use case statements to designate substitue values for the codes and produce results so if A and C were run TODAY, then the query would return: Report A and Report C were run today. The table also has all historical runs and I want to ignore anything before the present day.
i.e. table has following data
Time Code
2009-07-21 17:35:02:597 A
2009-07-21 18:35:02:597 B
2009-07-21 19:35:02:597 C
2009-07-22 17:35:02:597 A
2009-07-22 19:35:02:597 C
Would really appreciate the help!!
I'm really new to SQL. I am trying to set up a query that runs automatically daily to pull any data populated in a table for the present day (not just for today but ongoing daily). I do not want to have to have to update the date in the query daily. The table only populates with codes of jobs ran that day with a timestamp for each code.
So for today (7/22) we might have codes A and C, and yesterday we might have had A, B, and C. I want to be able to use case statements to designate substitue values for the codes and produce results so if A and C were run TODAY, then the query would return: Report A and Report C were run today. The table also has all historical runs and I want to ignore anything before the present day.
i.e. table has following data
Time Code
2009-07-21 17:35:02:597 A
2009-07-21 18:35:02:597 B
2009-07-21 19:35:02:597 C
2009-07-22 17:35:02:597 A
2009-07-22 19:35:02:597 C
Would really appreciate the help!!