Stevius
asked on
Correct ASP Syntax for Date()-365
I want to show the order results from the last year. Therefore I used this:
sql = sql & " AND ((tblOrder.dtmInput)>'" & Date()-365"'))"
The problem is the Date()-365. Does this work in sql-asp?
Thanks to inform me when you know the exact syntax?
Regards,
Stevius
or try this other
sql = sql & " AND ((tblOrder.dtmInput)>'" & getDate()-365"'))"
xabi
sql = sql & " AND ((tblOrder.dtmInput)>'" & getDate()-365"'))"
xabi
ASKER
When I try this I get expect end of statement error.
Use the DateAdd() method:
DateAdd("d",-365,Date())
FtB
DateAdd("d",-365,Date())
FtB
sql = sql & " AND ((tblOrder.dtmInput)>'" & DateAdd("d",-365,Date() & "'))"
FtB
FtB
ASKER
Thanks for the help: The error now is Expected ')'
Therefore I have copied the complete sql statement.
Everything works fine when I exclude the date rule.
sql = "SELECT tblOrder.IDOrder, tblBook.IDBook, tblBook.strTitle, tblEmployee.strLastName, tblEmployee.usercode"
sql = sql & " , tblBook.blnCheckIn, tblOrder.dtmInput"
sql = sql & " FROM tblEmployee INNER JOIN (tblOrder LEFT JOIN tblBook ON tblOrder.IDOrder = tblBook.IDOrder)"
sql = sql & " ON tblEmployee.IDEmployee = tblOrder.IDEmployee"
sql = sql & " WHERE (((tblBook.blnCheckIn)=No) AND ((tblEmployee.usercode)='" & userid(1) & "')"
sql = sql & " AND ((tblOrder.dtmInput)>'" & DateAdd("d",-365,Date() & "'))"
sql = sql & " ORDER BY tblOrder.IDOrder;"
Therefore I have copied the complete sql statement.
Everything works fine when I exclude the date rule.
sql = "SELECT tblOrder.IDOrder, tblBook.IDBook, tblBook.strTitle, tblEmployee.strLastName, tblEmployee.usercode"
sql = sql & " , tblBook.blnCheckIn, tblOrder.dtmInput"
sql = sql & " FROM tblEmployee INNER JOIN (tblOrder LEFT JOIN tblBook ON tblOrder.IDOrder = tblBook.IDOrder)"
sql = sql & " ON tblEmployee.IDEmployee = tblOrder.IDEmployee"
sql = sql & " WHERE (((tblBook.blnCheckIn)=No)
sql = sql & " AND ((tblOrder.dtmInput)>'" & DateAdd("d",-365,Date() & "'))"
sql = sql & " ORDER BY tblOrder.IDOrder;"
I would use Datediff function
sql = sql & " datediff(yy,tblOrder.dtmIn put,getdat e()) = 1"
sql = sql & " datediff(yy,tblOrder.dtmIn
sql = "SELECT tblOrder.IDOrder, tblBook.IDBook, tblBook.strTitle, tblEmployee.strLastName, tblEmployee.usercode"
sql = sql & " , tblBook.blnCheckIn, tblOrder.dtmInput"
sql = sql & " FROM tblEmployee INNER JOIN (tblOrder LEFT JOIN tblBook ON tblOrder.IDOrder = tblBook.IDOrder)"
sql = sql & " ON tblEmployee.IDEmployee = tblOrder.IDEmployee"
sql = sql & " WHERE (((tblBook.blnCheckIn)=No) AND ((tblEmployee.usercode)='" & userid(1) & "')"
sql = sql & " AND tblOrder.dtmInput > (SysDate-30)"
sql = sql & " ORDER BY tblOrder.IDOrder;"
sql = sql & " , tblBook.blnCheckIn, tblOrder.dtmInput"
sql = sql & " FROM tblEmployee INNER JOIN (tblOrder LEFT JOIN tblBook ON tblOrder.IDOrder = tblBook.IDOrder)"
sql = sql & " ON tblEmployee.IDEmployee = tblOrder.IDEmployee"
sql = sql & " WHERE (((tblBook.blnCheckIn)=No)
sql = sql & " AND tblOrder.dtmInput > (SysDate-30)"
sql = sql & " ORDER BY tblOrder.IDOrder;"
What happens if you do this:
response.write sql
response.end
so that we can see the output.
FtB
response.write sql
response.end
so that we can see the output.
FtB
sql = sql & " AND tblOrder.dtmInput > (SysDate-365)" ;)
sql = sql & " AND ((tblOrder.dtmInput)>'" & DateAdd("d",-365,Date()) & "')"
FtB
FtB
Inorder to use the sql date format, use..
sql = sql & " AND ((tblOrder.dtmInput)> (SELECT DATEADD(day, -365, (select getDate()))))"
Cheers!!
sql = sql & " AND ((tblOrder.dtmInput)> (SELECT DATEADD(day, -365, (select getDate()))))"
Cheers!!
The issue was that you needed to close the parentheses for the DateAdd() method but it was included inside the quotation marks.
FtB
FtB
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I think jitganguly's suggestion is the most optimised one..
Cheers!!
Cheers!!
ASKER
Thanks You All !!! I used the solution of Fritz. Easy to copy and it works !!! Yeah !
I didn't had to deal with the parentheses and all the other signs that confuses me . TC, Stevius
I didn't had to deal with the parentheses and all the other signs that confuses me . TC, Stevius
Glad to have helped,
FtB
FtB
ASKER
And the db is not excessive nor immense
Thx Ftb
Thx Ftb
I still stand by my statement ... ;0)
>>I think jitganguly's suggestion is the most optimised one..<<
Cheers!!
>>I think jitganguly's suggestion is the most optimised one..<<
Cheers!!
If the DBMS supports the DateDiff() method, then that is a good way to do it (SQL Server and Access support this I believe). The reason that I went with the DateAdd is so that it could happen outside of the SQL, keeping it compatible with a wider range of DBMS's.
FtB
FtB
ASKER
:) Anyway I'll keep all solutions.
>>The reason that I went with the DateAdd is so that it could happen outside of the SQL, keeping it compatible with a wider range of DBMS's
1.More overheads with this solution.
2. You don't write application for different types of DBMS's but cross browser
Anyway, No offense Patrick.
1.More overheads with this solution.
2. You don't write application for different types of DBMS's but cross browser
Anyway, No offense Patrick.
Jit--
Not to be contrary, but I think that you do have to keep in mind the DBMS when writing your SQL. For example, you can include a number of different functions in a SQL statement created for Access that will fail with MySQL. Date() works fine in the former but fails in the latter.
So what I am saying here is that if you keep your functions so that they are executed in the VBScript rather than in the SQL, then you will have a wider compatibility with different DBMS's. However, if you know what DBMS you are going to use and are familiar with what methods are supported, then you may have a performace gain for using the methods within the SQL. Does that make sense?
FtB
Not to be contrary, but I think that you do have to keep in mind the DBMS when writing your SQL. For example, you can include a number of different functions in a SQL statement created for Access that will fail with MySQL. Date() works fine in the former but fails in the latter.
So what I am saying here is that if you keep your functions so that they are executed in the VBScript rather than in the SQL, then you will have a wider compatibility with different DBMS's. However, if you know what DBMS you are going to use and are familiar with what methods are supported, then you may have a performace gain for using the methods within the SQL. Does that make sense?
FtB
Gee.. did i start off a war here.. LOL
Anyway, Fritz has a valid reason i guess.. but how ever.. i still believe that if application portability is not an issue, then performance should get top prority. Anyway.. In most cases, how ever well written the code is, we would have to do some re coding when porting the app. Also, what if the application portability is to happen the other way round ie, SQL/Access stays and the app is to be ported to PHP/.NET/JSP??
Anyway.. No application is 100% portable.. so i try and code for performance most of the time.. unless there is a clear need for portability and is identified during the project scoping.
Cheers!!
Anyway, Fritz has a valid reason i guess.. but how ever.. i still believe that if application portability is not an issue, then performance should get top prority. Anyway.. In most cases, how ever well written the code is, we would have to do some re coding when porting the app. Also, what if the application portability is to happen the other way round ie, SQL/Access stays and the app is to be ported to PHP/.NET/JSP??
Anyway.. No application is 100% portable.. so i try and code for performance most of the time.. unless there is a clear need for portability and is identified during the project scoping.
Cheers!!
Well--you are absolutely correct about that. If portablility is not an issue, and the DBMS supports the function, then it is best to write for performance.
I still don't know what DBMS is being used, so I tried to code in the most generic way. If truth be told, however, I am guessing that most likely the answer is Access or SQL Server, in which case DateDiff() should be supported in the native SQL.
FtB
I still don't know what DBMS is being used, so I tried to code in the most generic way. If truth be told, however, I am guessing that most likely the answer is Access or SQL Server, in which case DateDiff() should be supported in the native SQL.
FtB
Agree to that.. ;o)
Cheers!!
Cheers!!
ASKER
I had to leave urgently yesterday.
If anyone still interested the db used is Access and portability is not important for this one. I agree to go for performance and am trying to make Datediff work.
Regards for all the practical info.
Stevius
If anyone still interested the db used is Access and portability is not important for this one. I agree to go for performance and am trying to make Datediff work.
Regards for all the practical info.
Stevius
ASKER
Apparently today it doesn't seem to work. Anybody can help?
***Error Type:***
Microsoft JET Database Engine (0x80040E07)
Data type mismatch in criteria expression.
***CODE USED***
sql = "SELECT tblOrder.IDOrder, tblBook.IDBook, tblBook.strTitle, tblEmployee.strLastName, tblEmployee.usercode"
sql = sql & " , tblBook.blnCheckIn, tblOrder.dtmInput"
sql = sql & " FROM tblEmployee INNER JOIN (tblOrder LEFT JOIN tblBook ON tblOrder.IDOrder = tblBook.IDOrder)"
sql = sql & " ON tblEmployee.IDEmployee = tblOrder.IDEmployee"
sql = sql & " WHERE (((tblBook.blnCheckIn)=No) AND ((tblEmployee.usercode)='" & userid(1) & "')"
sql = sql & " AND ((tblOrder.dtmInput)>'" & DateAdd("d",-365,Date()) & "'))"
sql = sql & " ORDER BY tblOrder.IDOrder;"
Thanks,
Stevius
***Error Type:***
Microsoft JET Database Engine (0x80040E07)
Data type mismatch in criteria expression.
***CODE USED***
sql = "SELECT tblOrder.IDOrder, tblBook.IDBook, tblBook.strTitle, tblEmployee.strLastName, tblEmployee.usercode"
sql = sql & " , tblBook.blnCheckIn, tblOrder.dtmInput"
sql = sql & " FROM tblEmployee INNER JOIN (tblOrder LEFT JOIN tblBook ON tblOrder.IDOrder = tblBook.IDOrder)"
sql = sql & " ON tblEmployee.IDEmployee = tblOrder.IDEmployee"
sql = sql & " WHERE (((tblBook.blnCheckIn)=No)
sql = sql & " AND ((tblOrder.dtmInput)>'" & DateAdd("d",-365,Date()) & "'))"
sql = sql & " ORDER BY tblOrder.IDOrder;"
Thanks,
Stevius
Do a response.write on the sql string and port your code here...
Cheers!!
Cheers!!
Give this a shot--it uses the DateDiff() method discussed above:
sql = "SELECT tblOrder.IDOrder, tblBook.IDBook, tblBook.strTitle, tblEmployee.strLastName, tblEmployee.usercode"
sql = sql & " , tblBook.blnCheckIn, tblOrder.dtmInput"
sql = sql & " FROM tblEmployee INNER JOIN (tblOrder LEFT JOIN tblBook ON tblOrder.IDOrder = tblBook.IDOrder)"
sql = sql & " ON tblEmployee.IDEmployee = tblOrder.IDEmployee"
sql = sql & " WHERE (((tblBook.blnCheckIn)=No) AND ((tblEmployee.usercode)='" & userid(1) & "')"
sql = sql & " datediff(yy,tblOrder.dtmIn put,getdat e()) = 1"
sql = sql & " ORDER BY tblOrder.IDOrder;"
FtB
sql = "SELECT tblOrder.IDOrder, tblBook.IDBook, tblBook.strTitle, tblEmployee.strLastName, tblEmployee.usercode"
sql = sql & " , tblBook.blnCheckIn, tblOrder.dtmInput"
sql = sql & " FROM tblEmployee INNER JOIN (tblOrder LEFT JOIN tblBook ON tblOrder.IDOrder = tblBook.IDOrder)"
sql = sql & " ON tblEmployee.IDEmployee = tblOrder.IDEmployee"
sql = sql & " WHERE (((tblBook.blnCheckIn)=No)
sql = sql & " datediff(yy,tblOrder.dtmIn
sql = sql & " ORDER BY tblOrder.IDOrder;"
FtB
Patrick is missing an and before datediff
sql = "SELECT tblOrder.IDOrder, tblBook.IDBook, tblBook.strTitle, tblEmployee.strLastName, tblEmployee.usercode"
sql = sql & " , tblBook.blnCheckIn, tblOrder.dtmInput"
sql = sql & " FROM tblEmployee INNER JOIN (tblOrder LEFT JOIN tblBook ON tblOrder.IDOrder = tblBook.IDOrder)"
sql = sql & " ON tblEmployee.IDEmployee = tblOrder.IDEmployee"
sql = sql & " WHERE (((tblBook.blnCheckIn)=No) AND ((tblEmployee.usercode)='" & userid(1) & "')"
sql = sql & " and datediff(yy,tblOrder.dtmIn put,getdat e()) = 1"
sql = sql & " ORDER BY tblOrder.IDOrder;"
Do I get points ? :-)
sql = "SELECT tblOrder.IDOrder, tblBook.IDBook, tblBook.strTitle, tblEmployee.strLastName, tblEmployee.usercode"
sql = sql & " , tblBook.blnCheckIn, tblOrder.dtmInput"
sql = sql & " FROM tblEmployee INNER JOIN (tblOrder LEFT JOIN tblBook ON tblOrder.IDOrder = tblBook.IDOrder)"
sql = sql & " ON tblEmployee.IDEmployee = tblOrder.IDEmployee"
sql = sql & " WHERE (((tblBook.blnCheckIn)=No)
sql = sql & " and datediff(yy,tblOrder.dtmIn
sql = sql & " ORDER BY tblOrder.IDOrder;"
Do I get points ? :-)
Good catch!
FtB
FtB
However, I copied it from your post above!
FtB
FtB
However I didn't put the whole SQL above on my first post :-), so no and business
ASKER
After Sale Service :)
This is the sql string returned
SELECT tblOrder.IDOrder, tblBook.IDBook, tblBook.strTitle, tblEmployee.strLastName, tblEmployee.usercode , tblBook.blnCheckIn, tblOrder.dtmInput FROM tblEmployee INNER JOIN (tblOrder LEFT JOIN tblBook ON tblOrder.IDOrder = tblBook.IDOrder) ON tblEmployee.IDEmployee = tblOrder.IDEmployee WHERE (((tblBook.blnCheckIn)=No) AND ((tblEmployee.usercode)='G GB105') and datediff(yy,tblOrder.dtmIn put,getdat e()) = 1 ORDER BY tblOrder.IDOrder;
When I execute the sql I get an error message.
Error Type:
Microsoft JET Database Engine (0x80040E14)
Syntax error (missing operator) in query expression '(((tblBook.blnCheckIn)=No ) AND ((tblEmployee.usercode)='G GB105') and datediff(yy,tblOrder.dtmIn put,getdat e()) = 1 ORDER BY tblOrder.IDOrder;'.
/intern/sb/bib_myLecture.a sp, line 153
Line 153 is : rs4.open sql, cn
Thanks!
This is the sql string returned
SELECT tblOrder.IDOrder, tblBook.IDBook, tblBook.strTitle, tblEmployee.strLastName, tblEmployee.usercode , tblBook.blnCheckIn, tblOrder.dtmInput FROM tblEmployee INNER JOIN (tblOrder LEFT JOIN tblBook ON tblOrder.IDOrder = tblBook.IDOrder) ON tblEmployee.IDEmployee = tblOrder.IDEmployee WHERE (((tblBook.blnCheckIn)=No)
When I execute the sql I get an error message.
Error Type:
Microsoft JET Database Engine (0x80040E14)
Syntax error (missing operator) in query expression '(((tblBook.blnCheckIn)=No
/intern/sb/bib_myLecture.a
Line 153 is : rs4.open sql, cn
Thanks!
I think you have an extra "("
Try..
sql = "SELECT tblOrder.IDOrder, tblBook.IDBook, tblBook.strTitle, tblEmployee.strLastName, tblEmployee.usercode"
sql = sql & " , tblBook.blnCheckIn, tblOrder.dtmInput"
sql = sql & " FROM tblEmployee INNER JOIN (tblOrder LEFT JOIN tblBook ON tblOrder.IDOrder = tblBook.IDOrder)"
sql = sql & " ON tblEmployee.IDEmployee = tblOrder.IDEmployee"
sql = sql & " WHERE ((tblBook.blnCheckIn)=No) AND ((tblEmployee.usercode)='" & userid(1) & "')"
sql = sql & " and datediff(yy,tblOrder.dtmIn put,getdat e()) = 1"
sql = sql & " ORDER BY tblOrder.IDOrder;"
Cheers!!
Try..
sql = "SELECT tblOrder.IDOrder, tblBook.IDBook, tblBook.strTitle, tblEmployee.strLastName, tblEmployee.usercode"
sql = sql & " , tblBook.blnCheckIn, tblOrder.dtmInput"
sql = sql & " FROM tblEmployee INNER JOIN (tblOrder LEFT JOIN tblBook ON tblOrder.IDOrder = tblBook.IDOrder)"
sql = sql & " ON tblEmployee.IDEmployee = tblOrder.IDEmployee"
sql = sql & " WHERE ((tblBook.blnCheckIn)=No) AND ((tblEmployee.usercode)='"
sql = sql & " and datediff(yy,tblOrder.dtmIn
sql = sql & " ORDER BY tblOrder.IDOrder;"
Cheers!!
ASKER
HAd to do something else then asp.
strange but true: Undefined function 'getdate' in expression.
Anyone knows what to do?
Thanks ;)
Try..
Try..
sql = "SELECT tblOrder.IDOrder, tblBook.IDBook, tblBook.strTitle, tblEmployee.strLastName, tblEmployee.usercode"
sql = sql & " , tblBook.blnCheckIn, tblOrder.dtmInput"
sql = sql & " FROM tblEmployee INNER JOIN (tblOrder LEFT JOIN tblBook ON tblOrder.IDOrder = tblBook.IDOrder)"
sql = sql & " ON tblEmployee.IDEmployee = tblOrder.IDEmployee"
sql = sql & " WHERE ((tblBook.blnCheckIn)=No) AND ((tblEmployee.usercode)='" & userid(1) & "')"
sql = sql & " and datediff(yy,tblOrder.dtmIn put,(selec t getdate())) = 1"
sql = sql & " ORDER BY tblOrder.IDOrder;"
Cheers!!
Try..
sql = "SELECT tblOrder.IDOrder, tblBook.IDBook, tblBook.strTitle, tblEmployee.strLastName, tblEmployee.usercode"
sql = sql & " , tblBook.blnCheckIn, tblOrder.dtmInput"
sql = sql & " FROM tblEmployee INNER JOIN (tblOrder LEFT JOIN tblBook ON tblOrder.IDOrder = tblBook.IDOrder)"
sql = sql & " ON tblEmployee.IDEmployee = tblOrder.IDEmployee"
sql = sql & " WHERE ((tblBook.blnCheckIn)=No) AND ((tblEmployee.usercode)='"
sql = sql & " and datediff(yy,tblOrder.dtmIn
sql = sql & " ORDER BY tblOrder.IDOrder;"
Cheers!!
ASKER
! Thanks ap_sajith !
I get the following : Syntax error. in query expression '((tblBook.blnCheckIn)=No) AND ((tblEmployee.usercode)='G GB105') and datediff(yy,tblOrder.dtmIn put,(selec t getdate())) = 1'.
When I execute the sql I get this :
SELECT tblOrder.IDOrder, tblBook.IDBook, tblBook.strTitle, tblEmployee.strLastName, tblEmployee.usercode , tblBook.blnCheckIn, tblOrder.dtmInput FROM tblEmployee INNER JOIN (tblOrder LEFT JOIN tblBook ON tblOrder.IDOrder = tblBook.IDOrder) ON tblEmployee.IDEmployee = tblOrder.IDEmployee WHERE ((tblBook.blnCheckIn)=No) AND ((tblEmployee.usercode)='G GB105') and datediff(yy,tblOrder.dtmIn put,(selec t getdate())) = 1 ORDER BY tblOrder.IDOrder;
Hope this helps ...
I get the following : Syntax error. in query expression '((tblBook.blnCheckIn)=No)
When I execute the sql I get this :
SELECT tblOrder.IDOrder, tblBook.IDBook, tblBook.strTitle, tblEmployee.strLastName, tblEmployee.usercode , tblBook.blnCheckIn, tblOrder.dtmInput FROM tblEmployee INNER JOIN (tblOrder LEFT JOIN tblBook ON tblOrder.IDOrder = tblBook.IDOrder) ON tblEmployee.IDEmployee = tblOrder.IDEmployee WHERE ((tblBook.blnCheckIn)=No) AND ((tblEmployee.usercode)='G
Hope this helps ...
ASKER
When I try Date() I get the message that no value is given for one or more parameters
See if this query returns any error...
SELECT tblOrder.IDOrder, tblBook.IDBook, tblBook.strTitle, tblEmployee.strLastName, tblEmployee.usercode , tblBook.blnCheckIn, tblOrder.dtmInput FROM tblEmployee INNER JOIN (tblOrder LEFT JOIN tblBook ON tblOrder.IDOrder = tblBook.IDOrder) ON tblEmployee.IDEmployee = tblOrder.IDEmployee WHERE datediff(yy,tblOrder.dtmIn put,(selec t getdate())) = 1 ORDER BY tblOrder.IDOrder;
Cheers!!
SELECT tblOrder.IDOrder, tblBook.IDBook, tblBook.strTitle, tblEmployee.strLastName, tblEmployee.usercode , tblBook.blnCheckIn, tblOrder.dtmInput FROM tblEmployee INNER JOIN (tblOrder LEFT JOIN tblBook ON tblOrder.IDOrder = tblBook.IDOrder) ON tblEmployee.IDEmployee = tblOrder.IDEmployee WHERE datediff(yy,tblOrder.dtmIn
Cheers!!
ASKER
I get a syntax error when executed in access sql query.
It works when I use
SELECT tblOrder.IDOrder, tblBook.IDBook, tblBook.strTitle, tblEmployee.strLastName, tblEmployee.usercode , tblBook.blnCheckIn, tblOrder.dtmInput FROM tblEmployee INNER JOIN (tblOrder LEFT JOIN tblBook ON tblOrder.IDOrder = tblBook.IDOrder) ON tblEmployee.IDEmployee = tblOrder.IDEmployee WHERE datediff(yy,tblOrder.dtmIn put,(date( ))) = 1 ORDER BY tblOrder.IDOrder;
>The only problem is that he asks for a parameter "yy"
I tried to response.write getDate > Type mismatch: 'getDate'
response.write date() returns the current date.
When I remove the sql line with datediff the query runs.
It works when I use
SELECT tblOrder.IDOrder, tblBook.IDBook, tblBook.strTitle, tblEmployee.strLastName, tblEmployee.usercode , tblBook.blnCheckIn, tblOrder.dtmInput FROM tblEmployee INNER JOIN (tblOrder LEFT JOIN tblBook ON tblOrder.IDOrder = tblBook.IDOrder) ON tblEmployee.IDEmployee = tblOrder.IDEmployee WHERE datediff(yy,tblOrder.dtmIn
>The only problem is that he asks for a parameter "yy"
I tried to response.write getDate > Type mismatch: 'getDate'
response.write date() returns the current date.
When I remove the sql line with datediff the query runs.
getDate is a SQL function.. not an asp function... it is equivalent to the now function is vbscript..
BTW.. is your db access or SQL?
Cheers!!
BTW.. is your db access or SQL?
Cheers!!
ASKER
Hey ap_sajith,
Finally a solution.
sql = sql & " AND ((tblOrder.dtmInput)>" & "#" & DateAdd("d",-365,Date()) & "#" & ")". Apparently with dates we need the #-sign.
Thanks !
Finally a solution.
sql = sql & " AND ((tblOrder.dtmInput)>" & "#" & DateAdd("d",-365,Date()) & "#" & ")". Apparently with dates we need the #-sign.
Thanks !
ASKER
So can only be used within sql
DB still is Access - I'm thinking about transfer to SQL.
DB still is Access - I'm thinking about transfer to SQL.
For access db.. yes... you need to wrap the dates in "#".. how ever its not needed in SQL server.
Cheers!!
Cheers!!
you might have modify your queries a bit when u migrate the app to sql.... BTW.. Date Issues are the major head aches for Asp developers ;o)
Cheers!!
Cheers!!
ASKER
Now I know where to find already one problem. Remove the #'s.
Ai and I still have some queries with dates to go ...
Your tip in executing the statement in access really helped a lot.
SY, Stevius
Ai and I still have some queries with dates to go ...
Your tip in executing the statement in access really helped a lot.
SY, Stevius
sql = sql & " AND ((tblOrder.dtmInput)>'" & sysdate-365"'))"
xabi