C
|
chris 8/26/2007 |
in the lsit page all records are shown in the table, how would I limit the list page to show only the curent month of records. Thank you
You need to use date functions in SQL query to calculate the beginning of the month and end of the month. Here is the article that can help: http://www.databasejournal.com/features/ms...cle.php/3650031
|
W
|
wilsonk author 8/27/2007 |
ok, I found the post where it was suggested to use strSQL = AddWhere(strSQL, "[employee='" & session("UserID") & "'") to filter by login name which works |
A
|
ac163601 8/27/2007 |
ok, I found the post where it was suggested to use strSQL = AddWhere(strSQL, "[employee='" & session("UserID") & "'") to filter by login name which works now I want to also add an additional where clause to filter by the month which I have this code WHERE contactdate >= GETDATE()-{fn CURRENT_TIME}-DAY(GETDATE())+1 "' AND conactdate < DATEADD(MONTH, 1, GETDATE()-{fn CURRENT_TIME}-DAY(GETDATE())+1) How can I combine both where statements to work on the befre SQL Query
|
W
|
wilsonk author 8/27/2007 |
ok so I have set the security code, but I still cant get the code corect to dosplay records for the current month. do I still need to use the strSQL = AddWhere since it is an asp runnner function? sorry if its is obvious but it isnt to me. This is for a report page |