We help IT Professionals succeed at work.

CFQuery Help...

Lee R Liddick Jr
on
258 Views
Last Modified: 2013-12-24
I have no idea what is wrong with this...it was working yesterday and this morning and I don't remember making any changes to any of my queries this morning.  The only thing I did was change some background colors on some of the pages but I can't imagine that did anything.  But it doesn't matter what I do, this query doesn't work any more and I get the error "Invalid parameter 1 specified for dateadd."

What is wrong with this query??????
 
<cfquery datasource="mydatasource" name="getMyCompletedCases">
SELECT MAN.intcaseID,
      MAN.strRequester,
      MAN.strCaseType,
      MAN.strCaseProd,
      MAN.strCaseCat,
      MAN.strCaseCatItem,
      MDT.strCaseDetail,
      STA.strCaseStatName,
      SEV.strCaseSevName,
      MDA.dtiCaseOpen,
      MDA.dtiCaseComplete,
      MAN.dtiDateRequired,
      MST.intID,
      MST.intCaseStatID,
      MST.dtiModified,
      MST.active
FROM tbl_casemain MAN LEFT JOIN tbl_caseseverity SEV ON SEV.intCaseSevID = MAN.intCaseSevID
      INNER JOIN tbl_casemaindata MDA ON MDA.intCaseID = MAN.intCaseID
      INNER JOIN tbl_casemaindetails MDT ON MDT.intCaseID = MAN.intCaseID
      INNER JOIN tbl_casemainstatus MST ON MST.intCaseID = MAN.intCaseID
      INNER JOIN tbl_casestatus STA ON STA.intCaseStatID = MST.intCaseStatID
      INNER JOIN tbl_caseactivitytype ACT ON ACT.intCaseActTypeID = MST.intCaseActTypeID
WHERE MAN.strRequester = '#session.UserData.CUID#'
AND   MST.intID = (select max(b.IntID) from tbl_casemainstatus B
              where b.intCaseID = MST.intCaseID and
              b.dtiModified >= MST.dtiModified
         )
AND MST.intcaseStatID >= 8
AND (MDA.dtiCaseComplete BETWEEN DateAdd("d", -30, GetDate()) AND DateAdd("d", -1, GetDate()))
ORDER BY MAN.intCaseID
</cfquery>
Comment
Watch Question

Manager Technology
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Lee R Liddick JrReporting Analyst

Author

Commented:
Thank you Bennett!!!!!
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.