[thelist] SQL: ORDER with two parameters

Adriano Castro ad at netvisao.pt
Wed Mar 31 05:03:57 CST 2004


    Ken... You da man!!

    Tks for those brackets. I was fiddling with them but wasn't getting
them right. Now i get it. Table A is joined to the "view" (the other
join) and only then one sets up the ON clause.

    I'll leave you with a not-so-fabulous tip...

<tip type="domain redirects" author="Adriano Castro">
To avoid losing visits (or making users angry and upset) make sure your
domain root (foobar.com) leads the user to the same as www.foobar.com.
This, of course, is only valid if you are not using foobar.com for any
other purpose.
</tip>

> D'oh
>
> That's what Tab posted. If you have Access, then you need to put some
> brackets in:
>
> SELECT
>      a.ID,
>      a.ID_Type,
>      a.Reference
> FROM
>      Doc_list AS a
> INNER JOIN
> (
>         Doc_Relationships AS b
>     INNER JOIN
>         Doc_List AS C
>     ON
>         b.id_referer = c.ID
> ) ON
>     a.ID = b.Id_doc
> WHERE
>      a.ID_Type = 2
> ORDER BY
>     c.reference,
>     a.reference


More information about the thelist mailing list