Jump to content

Archived

This topic is now archived and is closed to further replies.

jantichap

Help me query please

Recommended Posts

select luser.userid,luser.firstname,luser.lastname from luser

where luser.Pos = \'Teacher\'and luser.userid not in

(select sectionuser.userid from sectionuser

where sectionuser.courseid = \'204105\'and sectionuser.SectionID = \'1\' and sectionuser.Semester = \'2\')

ORDER BY luser.UserID

 

this query i can use in other database server but i can\'t use in MySQL version 4.0.2-alpha-nt

 

please!!! help me to convert my query can use in MySQL ....thank

Share this post


Link to post
Share on other sites

A few typos, try:

 


SELECT luser.userid,luser.firstname,luser.lastname 

FROM luser

WHERE (luser.Pos = \'Teacher\') 

AND 

(

  luser.userid NOT IN

   (

   SELECT sectionuser.userid 

   FROM sectionuser 

   WHERE 

   (sectionuser.courseid = \'204105\') 

   AND

   (sectionuser.SectionID = \'1\') 

   AND 

   (sectionuser.Semester = \'2\') 

   )

)

ORDER BY luser.UserID 

 

Try it,

P., denmark

 

select luser.userid,luser.firstname,luser.lastname from luser  

where luser.Pos = \'Teacher\'and luser.userid not in  

(select sectionuser.userid from sectionuser  

where sectionuser.courseid = \'204105\'and sectionuser.SectionID = \'1\' and sectionuser.Semester = \'2\')  

ORDER BY luser.UserID  

 

this query i can use in other database server but i can\'t use in MySQL version 4.0.2-alpha-nt  

 

please!!! help me to convert my query can use in MySQL ....thank

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.