Between two dates

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jestin
    New Member
    • Mar 2008
    • 12

    Between two dates

    hi friends

    i am trying to upgrade one sql query to oracle 8i,and i am facing one problem can any one help in this situation.in that query we need a some data in between two times

    ASP code is as follows
    set rscheck = Server.CreateOb ject("ADODB.Rec ordset")
    sqlcheck = "SELECT Tbl_RequestInfo .ReqServicetype id, Tbl_RequestInfo .ReqArea, Tbl_RequestInfo .ReqRschedDate, Tbl_RequestSche d.RschedTime, " &_
    "FROM Tbl_RequestInfo INNER JOIN Tbl_RequestSche d ON Tbl_RequestInfo .ReqID = Tbl_RequestSche d.RschedReqid " &_
    "WHERE (((Tbl_RequestI nfo.ReqServicet ypeid)=" & ReplaceQuote(te xtservicetype) & ") AND ((Tbl_RequestIn fo.ReqArea)=" & STR_Quote2(Repl aceQuote(textse rvicearea)) & ") " &_
    "AND ((Tbl_RequestIn fo.ReqRschedDat e)='"& FormatDateTime( textsched,2) & "') " &_
    "AND ((Tbl_RequestSc hed.RschedTime) Between " & DateDelimiter(F ormatDateTime(( "schedSTime"),4 )) & " And " & DateDelimiter(F ormatDateTime(( "schedETime"),4 )) & ") " &_
    "ORDER BY Tbl_RequestSche d.RschedTime"


    i need a data in between schedSTime & schedETime. can any one rectify my between operation is correct or not

    thx
  • DrBunchman
    Recognized Expert Contributor
    • Jan 2008
    • 979

    #2
    Hi Jestin,

    I think Oracle needs to have apostrophe's around any date variables so putting those in might fix your problem.

    If not, are you receiving an error when you run the above?

    Dr B

    Comment

    Working...