|
|
|
|
SQL Reporting Services - Answers to your questions
| |
|
Author |
Thread:
Case trouble with IN subquery |
|
bubberz
|
Case trouble with IN subquery
Posted:
Tuesday, March 27, 2007 3:28 PM (GST)
|
|
I have the following in my WHERE clause for my Sql Server Reporting Services 2000 report (the user can use the parameter @MaxRevs to view all numbers (colNumber) or only the max of colNumbers when grouped by colParentNumber):
AND (tblMain.colNumber IN CASE @MaxRevs WHEN '' THEN '(SELECT colNumber FROM tblMain)' ELSE '(Select max(colNumber) From tblMain Group By [colParentNumber])' END))
I get the following error: 1. ADO error: Syntax error or ADO access error
I've used Case in the past, but it was for a "Like" portion in my WHERE clause.
Thanks!
|
|
|
|
|
|
|
|
|