Dynamic query...problem

anonymous_at_discussions.microsoft.com
Date: 04/07/04


Date: Wed, 7 Apr 2004 05:12:18 -0700


"SELECT FirstName, EmployeeID, LastName, BirthDate FROM
Employee " + iff(@p1 = 0," "," WHERE (DepartmentID = " +
@p1 + ")")

this query is not working in sql reporting server2000
and the error reported is "syntax error"
the similar example is mentioned in SQL reporting Services
Books Online under "walkThrough:Using a dynamic query in a
report"

How do we use this query correctly? does the IIF condition
work here? How do we use similar query if I need to
connect to Oracle 8i database with Microsoft OLEDB
provider for Oracle (MSDAORA 1)



Relevant Pages