|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
conditional selection of 'and'
I have one query similar to the following:-
select coursenum,sectionnum,instructor 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,sectionnum,instructor from SECTION s where (sectionnum = '001') and coursenum LIKE 'MATH%' and instructor LIKE 'L%' i.e. only and only if arameter = 'add' else the above (first)query gets executed.I do not want to use procedure for the above as I think everyting can be done using and,or,not |
![]() |
| Viewing: Dev Articles Community Forums > Databases > General SQL Development > conditional selection of 'and' |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|