Skip to content

Instantly share code, notes, and snippets.

@ebot
Created September 29, 2008 17:16
Show Gist options
  • Save ebot/13628 to your computer and use it in GitHub Desktop.
Save ebot/13628 to your computer and use it in GitHub Desktop.
SELECT problems.id, problems.title, problems.start_date,
problems.uid, problems.uemail, tblUsers.uid, customers.custname
FROM (
customers INNER JOIN
(
problems INNER JOIN status ON
problems.status = status.status_id
) ON
customers.customer_id = problems.customer
)
INNER JOIN tblUsers ON
problems.rep = tblUsers.sid
Dim listStr, whereStr
listStr = "SELECT problems.id, problems.title, problems.start_date, " & _
"problems.uid, problems.uemail, tblUsers.uid, customers.custname "
"FROM (customers INNER JOIN " & _
"(problems INNER JOIN status ON problems.status = status.status_id) ON " & _
"customers.customer_id = problems.customer) " & _
"INNER JOIN tblUsers ON problems.rep = tblUsers.sid " & _
"WHERE " & whereStr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment