sql joining mulitiple tables error

Results 1 to 2 of 2

Thread: sql joining mulitiple tables error

  1. #1
    Join Date
    Dec 1969

    Default sql joining mulitiple tables error

    I&#039m sorry to bug you guys with what may be a very trivial question but I am recieve an error for this sql statement in asp which attempts to link 3 databases together. However it always throws up a Type mismatch:&#039[string "FROM project D,Cust"]&#039<BR><BR>Here&#039 the code...<BR><BR>sql2 = "SELECT D.Project_Type, D.Project_No, D.Nickname, " &_ <BR> "D.Project_Code, D1.COMPANY_NA, D1.Contact_Name, " & _<BR> "D2.Consultant, D2.Date, D2.Task, D2.Comments, D2.Hours, &_ <BR> "D2.Minutes, D2.Billable, D2.Billed, D2.Rate, " & _<BR> "D2.Km_Travelled, D2.Travel_Rate, D2.Other_Expenses " & _<BR> <BR> "FROM project D, Cust1 D1, timesheet D2" & _ <BR> <BR>"WHERE D2.Project_No = &#039" + projno + "&#039 AND D1.CUST_CODE = &#039" <BR> + custcode + "&#039 " & _<BR> <BR>"ORDER BY Project_Type, D.Nickname, D.Project_Code, D1.COMPANY_NA, D1.Contact_Name, D2.Consultant, D2.Date, D2.Task, D2.Hours, D2.Minutes, D2.Billable, D2.Billed, D2.Rate, D2.Km_Travelled, D2.Travel_Rate, D2.Other_Expenses"<BR><BR>If anyone can help I would be much obliged. <BR>Thanks <BR>Nick

  2. #2
    sm549 Guest

    Default RE: sql joining mulitiple tables error

    Looks like you&#039re missing a double quote on this line:<BR><BR>"D2.Consultant, D2.Date, D2.Task, D2.Comments, D2.Hours, &_ <BR><BR>If that doesn&#039t do it, Response.Write sql2 and post the generated SQL statement.<BR><BR>Good luck.<BR>

Posting Permissions

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