+ Reply to Thread
Results 1 to 16 of 16

SQL Syntax Error

Hybrid View

  1. #1
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,983

    Re: SQL Syntax Error

    Your From date check appears to have a random '20' on the front of it, which won't be helping. I also can't see the point of aliasing a table with its actual name. Try using:
    .CommandText = "SELECT HPD_Help_Desk.Incident_Number, HPD_Help_Desk.Description, HPD_Help_Desk.First_Name, " & _
             "HPD_Help_Desk.Last_Name, HPD_Help_Desk.Priority, HPD_Help_Desk.Status, HPD_Help_Desk.SLM_Status, " & _
             "HPD_Help_Desk.Company, HPD_Help_Desk.Last_Resolved_Date FROM HPD_Help_Desk " & _
             "WHERE (HPD_Help_Desk.Company='DCWR') AND (HPD_Help_Desk.Status>='Resolved') " & _
             "AND (HPD_Help_Desk.Last_Resolved_Date>{ts '" & from & "'} " & _
             "And HPD_Help_Desk.Last_Resolved_Date<{ts '" & untill & "'})"
    and see if that helps.
    Everyone who confuses correlation and causation ends up dead.

  2. #2
    Registered User
    Join Date
    01-27-2011
    Location
    Cardiff, Wales
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: SQL Syntax Error

    Thanks again, but it's still showing the same error

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1