February 17, 2009 at 3:18 pm
Hello:
I'm new to all this, so please forgive me if this is a stupid question. I'm trying to pull data from a UNIX-based database into SSRS through an ODBC connection. Here's the SQL query that I want to form my dataset:
SELECT
person.name,
orders.ID,
orders.customer,
item.type,
detail.item,
detail.qty,
customer.phone,
item.name,
detailassoc.date,
detailassoc.time
FROM (((((person INNER JOIN customer
ON person.ID = customer.ID)
RIGHT JOIN orders
ON orders.customer = person.ID)
RIGHT JOIN detailkey
ON detailkey.ID = orders.ID)
RIGHT JOIN detail
ON detail.ID = detailkey.key)
RIGHT JOIN detailassoc
ON detailassoc.ID = detail.ID)
LEFT JOIN item
ON item.ID = detail.itemkey
I have the same tables in an instance of SQL Server and this query works fine there. In SSRS, however (where I have to use ODBC because I need the data in real time and the SQL Server database is only updated nightly), I receive a syntax error that points to one of the parentheses in my joins. I tried taking out the parentheses, but then it throws a syntax error pointing to the word JOIN.
Does anyone know what's wrong with my syntax here?
Thanks in advance! 😀
February 19, 2009 at 7:44 am
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply