I have one query similar to the following:-
select coursenum,secti onnum,instructo r from
SECTION s where (sectionnum = '001')
and coursenum LIKE 'MATH%'
but is it possible to add another 'and' condition to the above query
provided a certain user parameter = 'add'
for e.g
select coursenum,secti onnum,instructo r from
SECTION s where (sectionnum = '001')
and coursenum LIKE 'MATH%'
and instructor LIKE 'L%' i.e. only and only if :parameter = 'add' else
the above query gets executed.
I do not want to use procedure for the above as I think everyting can
be done using and,or,not
select coursenum,secti onnum,instructo r from
SECTION s where (sectionnum = '001')
and coursenum LIKE 'MATH%'
but is it possible to add another 'and' condition to the above query
provided a certain user parameter = 'add'
for e.g
select coursenum,secti onnum,instructo r from
SECTION s where (sectionnum = '001')
and coursenum LIKE 'MATH%'
and instructor LIKE 'L%' i.e. only and only if :parameter = 'add' else
the above query gets executed.
I do not want to use procedure for the above as I think everyting can
be done using and,or,not
Comment