Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Write PL/SQL query from SSRS 2008

881331Aug 23 2011 — edited Aug 24 2011
Hello,
I've need of writing the following statement as query or procedure within SSRS 2008(SQL Server Reporting Services 2008) to query Oracle data.

IF :PARAMETER1 = 1
SELECT A1,B1,C1 FROM TABLE1
INNER JOIN TABLE2 ON TABLE2.X = TABLE1.X
INNER JOIN TABLE3 ON TABLE3.Y = TABLE1.Y
WHERE TABLE1.FIELD1 = :PARAMETER1
ELSE IF :PARAMETER1 = 0
SELECT A1,B1,C1 FROM TABLE1
INNER JOIN TABLE2 ON TABLE2.X = TABLE1.X
WHERE TABLE1.FIELD1 = :PARAMETER1

Can someone please help since I am trying to write query with IF ELSE statement or block from SSRS 2008?

Brief scenario - I'm trying to query data from Oracle db by using Oracle data source connection(11g client) from SSRS 2008 to display on SSRS report.

Thanks,
JS.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 21 2011
Added on Aug 23 2011
7 comments
2,816 views