Jump to content

Help me query please


jantichap

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

Link to comment
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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.