Subject |
Re: sql code |
From |
Charlie <tm@tc.com> |
Date |
Wed, 13 Jun 2018 15:15:20 -0400 |
Newsgroups |
dbase.getting-started |
Thanks very much. I actually figured this out just before I read your message. This is it...
sql = "select lname,sum(qty) as cnt, sum(qty*cost) as tcost, sum(qty*sell) as tsell from taldata where lname = '&talname' group by lname"
Peter Hegelbach Wrote:
> Hi
>
> Try:
> sql = "select lname,sum(qty) as cnt, sum(qty*cost) as tcost,
> sum(qty*sell) as tsell from taldata where lname ='"+talname+"' group by
> lname"
>
> Mind the apostrophs.
>
> Peter
>
>
> Am 13.06.2018 um 20:43 schrieb Charlie:
> > Hi... what is wrong here? I am trying to filter this sql statement with where using the variable talname, but I can't seem to get this to work for some reason. I've gotten so many different error messages my head is spinning.
> >
> > Really appreciate any help!
> >
> > sql = "select lname,sum(qty) as cnt, sum(qty*cost) as tcost, sum(qty*sell) as tsell from taldata where lname ="+talname+" group by lname"
> >
>
>
> ---
> Diese E-Mail wurde von AVG auf Viren geprüft.
> http://www.avg.com
>
|
|