Please help!  I already know that my query is wrong. 
I have identified it.  But what is the solution to my
query?

 --- gerald_clark <[EMAIL PROTECTED]>
wrote: > I answered this yesterday.
> Your FROM must precede your WHERE.
> 
> Terence Ng wrote:
> 
> >How do I correct this SQL code:
> > 
> >2 tables there, 
> >lcopen: id, bank, unit_price_us, order_cbm
> >lcreceive: id, amount_us, due_date
> >
> >#this condition :lcreceive.due_date < current_date
> >#only affect to : SUM(lcreceive.amount_us)
> >#and NOT :
> >#SUM(lcopen.unit_price_us*lcopen.order_cbm) * 7.8
> AS
> >open
> >
> >
> >SELECT
> >lcopen.bank, 
> >SUM(lcopen.unit_price_us*lcopen.order_cbm) * 7.8 AS
> >open,
> >#
> >SUM(lcreceive.amount_us) where lcreceive.due_date <
> >current_date,
> >#
> ># the above statement is not correct 
> ># 
> >FROM lcopen, lcreceive 
> >AND lcopen.id=lcreceive.id 
> >GROUP BY lcopen.bank;
> >
> >
> >
> > 
> > 
> > 
> >Terence Ng
> >
> >
>
>_______________________________________________________________________
> >Do You Yahoo!?
> >Get your free @yahoo.com.hk address at
> http://mail.english.yahoo.com.hk
> >
>
>---------------------------------------------------------------------
> >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
> >
> >
> >  
> >
> 
> 
> 
>
---------------------------------------------------------------------
> 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
>  

_______________________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com.hk address at http://mail.english.yahoo.com.hk

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