dbTalk Databases Forums  

conditional Selection of 'AND' and 'Select' statements

comp.database.oracle comp.database.oracle


Discuss conditional Selection of 'AND' and 'Select' statements in the comp.database.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Rohit Dhawan
 
Posts: n/a

Default conditional Selection of 'AND' and 'Select' statements - 04-17-2004 , 08:12 AM






I am working on Oracle reports . One of the parameters that a User
inputs is
'report_type'. Now, is there a way to do the following within a SQL
query with no use of procedures or functions.

select blaa from foo where

something = something
// if report_type='some_data' then
and somethingelse = something else
//else do nothing


Also, IS there a way of doing something like the following

// if report_type='some_data' then

select blaa from foo where
something = something
// if report_type='some_data' then
and somethingelse = something else
//else do nothing

else
select blass1 from foo where
something = something
// if report_type='some_data' then
and somethingelse = something else
//else do nothing

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.