General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
* appearing as total
Here is my query:
select distinct instructor.instructorid, course.courseid, studentcourse.sckey,;
(iif(studentcourse.ispaid = .T.,(course.hours * paymodel.rate) *
count(studentcourse.courseid),0)) as total;
from course left join studentcourse on course.courseid = studentcourse.courseid;
left join instructor on studentcourse.instructorid = instructor.instructorid;
left join paymodel on instructor.training = paymodel.traintype;
into cursor temppay;
group by course.courseid
This gives me all the courses even if they don't have an instructor. I then want to check if in the studentcourse table if the ispaid field is true. If it is I want to total up how much they are to be paid. If not they get 0 for that student. The total is 0 for all the ones that ispaid = .F. but the ones that equal true the total field equals a star(*). Does anyone know why this is happening? I don't know if it really makes sense.
Thanks in advance,
Tyler
Next
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