General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Thanks David,
I finally got it to work the way I want. I linked the tables together that contained the quantities and that worked.
select course.courseid, course.name, nvl(material.materialid, "None ") as materialid,;
nvl(material.description, "None ") as mname,;
classi.qty, ccrequest.qty2, whatever.qty3;
from course left join cmaterials on course.courseid = cmaterials.courseid;
left join material on cmaterials.materialid = material.materialid;
left join ccrequest on course.courseid = ccrequest.courseid;
left join classi on course.courseid = classi.courseid;
left join whatever on course.courseid = whatever.courseid;
UNION select course.courseid, course.name, nvl(textbook.textid, "None ") as materialid,;
nvl(textbook.textname, "None ") as mname,;
classi.qty, ccrequest.qty2, whatever.qty3;
from course left join coursematerial on course.courseid = coursematerial.courseid;
left join textbook on coursematerial.textid = textbook.textid;
left join ccrequest on course.courseid = ccrequest.courseid;
left join classi on course.courseid = classi.courseid;
left join whatever on course.courseid = whatever.courseid;
into cursor clmaterial
Tyler
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only