Query help (Oracle) [message #6974] |
Wed, 14 May 2003 08:30 |
Nazma Bepat
Messages: 34 Registered: May 2003
|
Member |
|
|
Can someone please help me to create a query using the course table that will display the course number, prerequisite and cost. If the employee does not have a prerequisite put “No Prerequisite Listed”. Create an alias for the column.
Thanks
nazma
|
|
|
Re: Query help (Oracle) [message #6975 is a reply to message #6974] |
Wed, 14 May 2003 09:18 |
Shane Kaszyca
Messages: 16 Registered: May 2003
|
Junior Member |
|
|
SELECT course_number,'No Prerequisite Listed' as prerequisite,cost
FROM course
WHERE course_number = ''
union
SELECT course_number, prerequisite, cost
FROM course
WHERE course_number <> ''
Hope this helps. If your prerequisite is null rather than blank ('') check for null instead
********************************************
Can someone please help me to create a query using the course table that will display the course number, prerequisite and cost. If the employee does not have a prerequisite put “No Prerequisite Listed”. Create an alias for the column.
|
|
|
|
|