hi,

  This is kathir from Uniware Systems, We are developing project on ASP with Backend 
as MySQL, We having a problem using "IN" and "NOT IN" operators in sub query
here i am listing my query as follows:

"select c.pickupdate,c.contno, r.relrefno, r.custname, r.contsize, r.conttype, 
r.qtybooked from contpickup c,releaseauthor r where c.relrefno=r.relrefno and 
c.relrefno in(select relrefno from contpickup where contno='" & ccode & "') and 
c.contno not in (select contno from billlading where relrefno in(select relrefno from 
contpickup where contno='" & ccode & "'))"

iam selecting the values from 3 different tables using in and not in operators.  When 
iam executing the above query it displaying the error as follows:

[TCX][MyODBC]You have an error in your SQL syntax near 'CRXU9021208'')' at line 1 

for ur clarification the simple query is also not executing using IN operator.

 select relrefno from releaseauthor where relrefno in 
(select relrefno from contpickup)

But this statement is executing 
 select relrefno from releaseauthor where relrefno in 
("123","456")

pls.. let me know solutions as earliest for the above query and using IN and NOT IN 
operators.

note:

The above query is executing in MSSQL Server 7.0 and Oracle 8.

regards,
kathir (Programmer Analyst)



_____________________________________________________
Chat with your friends as soon as they come online. Get Rediff Bol at
http://bol.rediff.com





---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to