Log in

View Full Version : Error in tables


fawwad
Sep 14, 2006, 12:40 AM
table1 product pk is productID
table2 problems pk is problemID
table3 severity pk is severityId
table4 users pk is userID
when I used in vb.net then message is
incorrect syntes near inner

Const sSelect As String = "select problems.problemID," & "problems.reportedon," & "users.userName,prduct.productName,problems.version ," & "severity.severityName,problems.description,problem s.steps" & "from severity inner join(product inner join" & "(users inner join problems on" & "users.userID=problems.userID)on product.productID=" & "problems.productID)on " & " severity.severityID=problems.severityID"& "order by problems.problemID"

ScottGem
Sep 14, 2006, 05:33 AM
What database are you using as your back end? The problem is your inner joins aren't resolved properly.

What I suggest you do is test out the query in whatever database environment you are using, then copy the SQL into your code. BTW, there is no need to concatenate in bits and pieces like that. Just use one string.