SQL Qurey Error

Results 1 to 2 of 2

Thread: SQL Qurey Error

  1. #1
    Join Date
    Dec 1969

    Default SQL Qurey Error

    THis is my SQl Stetement... My database is MSSQL Server<BR><BR>SQLPreviousYr = "SELECT Count(*) AS NumberPat " &_<BR> "FROM Patient AS p, Clinic AS c " &_<BR> "WHERE c.ClinicCode = p.PClinicCode AND p.EnrolmentDate &#060; &#039;01/01/" & Trim(Request.Form("dob_yy2")) & "&#039; and c.cliniccode=&#039;" & Rs3("ClinicCode") & "&#039; GROUP BY c.cliniccode "<BR><BR>SET RsPreviousYr = Conn.Execute(SQLPreviousYr)<BR><BR>THis is the error I am getting :<BR><BR>Error Type:<BR>Microsoft OLE DB Provider for ODBC Drivers (0x80040E07)<BR>[Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting datetime from character string.<BR>/Test/test.asp, line 744<BR><BR><BR>Thanks...<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: SQL Qurey Error

    FAQ 110<BR><BR>www.aspfaqs.com

Posting Permissions

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