> I am stuck on a select query and was wondering if someone could help.  I
> have I've written a database app. that helps me run my business
> (trucking).  I need however to write a query that shows me all of the
> loads that are delivered but not billed (invoiced).  Which means that I
> have to select the loads that are delivered but do not have an entry in
> the INVOICED table -- since an entry is made in the INVOICED table
> whenever a load is billed.
> 
> I know the query below won't work.  Can someone please help me fix it?
> 
> SELECT l.load_no l.date FROM loads l, invoiced i
> WHERE l.dlvr_date > 0
> AND l.load_no != i.load_no
> 
> 
> Thanks,
> 
> Richard

Because MySQL doesnt support subquery I think you have to breake your sql
and bring your logic into your bussiness layer.
Maybe you can find better solution but at least this can resolve your
problem.

regards
----------------------------------------------------------------------
Mohammadreza Shojatalab                              
European Bioinformatics Institute    Tel: +44 (0)1223 494 669                          
  
EMBL Outstation                      Fax: +44 (0)1223 494 468                          
  
Wellcome Trust Genome Campus         E-Mail: [EMAIL PROTECTED]                           
  
Hinxton, Cambridge                   URL: http://www.ebi.ac.uk/~shoja                  
  
CB10 1SD, UK


---------------------------------------------------------------------
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