u can always cut the verbosity in py:
query( *[func.sum(getattr(TimeEntries, x))
for x in 'reg ot ce hol sklv vac ct whatever else'.split() ])
...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"sqlalchem
On Sep 4, 2:32 pm, Michael Bayer <[EMAIL PROTECTED]> wrote:
> On Sep 4, 2008, at 3:14 PM, Mike wrote:
>
>
>
>
>
> > Hi,
>
> > I am trying to translate the following SQL into SqlAlchemy session
> > syntax:
>
> > sql = ''' SELECT SUM(reg), SUM(ot), SUM(ce), SUM(hol), SUM(sklv),
> > SUM(vac), SUM(c
Hi,
On Sep 4, 2:32 pm, Michael Bayer <[EMAIL PROTECTED]> wrote:
> On Sep 4, 2008, at 3:14 PM, Mike wrote:
>
>
>
>
>
> > Hi,
>
> > I am trying to translate the following SQL into SqlAlchemy session
> > syntax:
>
> > sql = ''' SELECT SUM(reg), SUM(ot), SUM(ce), SUM(hol), SUM(sklv),
> > SUM(vac), SU
On Sep 4, 2008, at 3:14 PM, Mike wrote:
>
> Hi,
>
> I am trying to translate the following SQL into SqlAlchemy session
> syntax:
>
> sql = ''' SELECT SUM(reg), SUM(ot), SUM(ce), SUM(hol), SUM(sklv),
> SUM(vac), SUM(ct), SUM(conv), SUM(misc)
>FROM tbl_TimeEntries
>WHERE da