There is probably nothing wrong with fetch data via SQL, but I have no
idea how to write that complicated SQL query where getting data from 7
or 8 tables and as I made the calculations function already for
viewing I was looking for a way to just send it to a CSV.

I´ll look into the "You can use the python csv module directly: " It
sounds promising.


Kenneth

On Dec 9, 7:37 pm, Thadeus Burgess <thade...@thadeusb.com> wrote:
> Is there something wrong with the following?
>
> results = db(db.table.field == searchvar)(db.table.field2 ==
> searchvar2).select()
>
> results.export_to_csv(outputfile, delimiter=',', quotechar='"',
> qouting=csv.QOUTE_MINIMAL, represent=False)
>
> -Thadeus
>
> On Wed, Dec 9, 2009 at 7:24 AM, Hernan Olivera <lholiv...@gmail.com> wrote:
> > 2009/12/9 GhostRider <kenneth.t.lundst...@gmail.com>:
> >> I think the columns should the separated with a ; and not , to work
> >> better i Microsofts world.
>
> > It depends on the system language settings; both are correct, but you
> > must be carefull about decimal point or comma (i.e.: don't use comma
> > as separator and decimal point :)
>
> > --
> > Hernan Olivera
>
> > --
>
> > You received this message because you are subscribed to the Google Groups 
> > "web2py-users" group.
> > To post to this group, send email to web...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > web2py+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/web2py?hl=en.

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to