Note that there are some explanatory texts on larger screens.

plurals
  1. POAsp.Net multiple join tables issue from Sqldatasoruce Query Builder into one gridview
    primarykey
    data
    text
    <p>In Visual Studio 2010 with ASP.NET 4, I am trying to join several tables together to put the results in a gridview and details view with sqldatasource. In the sqldatasource wizard I have chosen to specify a custom SQL statement or stored procedure and then in the Query Builder to define complex queries such as JOINs, I have tried to generate a SQL statement to join the problem table with speficific columns from other tables. But when I try to test the query I get an error message which says "Cannot call methods on varchar". I am new to sql statements so please can you advise on what is wrong with the statement. Here is the generated sql statement below</p> <pre><code> SELECT Problem.ProblemID, Problem.CustomerID, Problem.Summary, Problem.DateLogged, Problem.DateUpdated, Status.Status, Priority.Priority, Technician.Name, Technician.Surname, [Skill Group].[Skill Group], HelpdeskOperator.Name AS Expr1, HelpdeskOperator.Surname AS Expr2, Problem.NoteID, Problem.ResolutionID FROM Problem INNER JOIN Status ON Problem.StatusID = Status.Status.StatusID INNER JOIN HelpdeskOperator ON Problem.HelpdeskID = HelpdeskOperator.HelpdeskID AND Status.StatusID = HelpdeskOperator.StatusID INNER JOIN Priority ON Problem.PriorityID = Priority.PriorityID INNER JOIN [Skill Group] ON Problem.SkillGroupID = [Skill Group].SkillGroupID INNER JOIN Technician ON Problem.ProblemID = Technician.ProblemID AND Status.StatusID = Technician.StatusID AND Priority.PriorityID = Technician.PriorityID AND [Skill Group].SkillGroupID = Technician.SkillGroupID </code></pre> <p>Thank you in advance</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload