getting the right field value with INNER JOIN sql statement

Results 1 to 2 of 2

Thread: getting the right field value with INNER JOIN sql statement

  1. #1
    dekoster Guest

    Default getting the right field value with INNER JOIN sql statement

    I&#039m trying to get the value of a field comming from three tables. Here&#039s my SQL statement :<BR><BR>SQL = "SELECT categorie.id, categorie.nom, produits.espace, espace.nom FROM espace "<BR>SQL=SQL & " INNER JOIN (produits INNER JOIN categorie ON "<BR>SQL=SQL & " produits.categorie = categorie.id) ON espace.id = produits.espace "<BR>SQL=SQL & " GROUP BY categorie.id, categorie.nom, produits.espace, espace.nom "<BR>SQL=SQL & " HAVING produits.espace = " & Request.QueryString("espace") & ""<BR><BR>I can&#039t figure out how to put the result of say the "produits.espace" field in my asp page. I&#039ve tryed &#060;% =rs("espace.nom") %&#062; but that doesn&#039t seem to work. Where&#039s the syntax error???

  2. #2
    John Weeflaar Guest

    Default RE: getting the right field value with INNER JOIN sql statement

    You can try to add single quotes in the last line:<BR><BR>..... = &#039" & Request.QueryString("espace") & "&#039"<BR><BR>John

Posting Permissions

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