Author Topic: Help me query please  (Read 2716 times)

0 Members and 1 Guest are viewing this topic.

Offline jantichapTopic starter

  • Irregular
  • Posts: 1
    • View Profile
Help me query please
« on: January 08, 2003, 02:03:07 AM »
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                    

Offline biopv

  • Enthusiast
  • Posts: 267
    • View Profile
    • http://palle.retrosearch.dk
Help me query please
« Reply #1 on: January 08, 2003, 05:20:23 AM »
A few typos, try:

Code: [Select]

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

Quote
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
                   
Palle Villesen, www.birc.dkBioinformatics Research Center