From: C. D. H. <Du...@Du...> - 2007-03-02 05:06:21
|
No, actually you're wrong. The original post said there was probably a means to build the file from within SQL-Ledger, and there is not. I indicated I use a tool to extract data, and you're showing us that you use a tool (psql) too. Unlike virtually every other Accounting package there is no way, from within the application to export data to a file. Dunc Dr Eberhard Lisse wrote: > Actually this is wrong. > > psql -AtF, databasename < gl.psql > gl.csv will produce CSV. > > and gl.psql looking like > > SELECT c.accno, c.description, ac.transdate, g.id, > round(ac.amount::numeric,2) as Amount, > g.reference, > g.description, substr(g.notes,1,55) as Notes, > ac.memo > > FROM gl g > JOIN acc_trans ac ON (g.id = ac.trans_id) > JOIN chart c ON (ac.chart_id = c.id) > LEFT JOIN department d ON (d.id = g.department_id) > WHERE 1 = 1 > AND ac.transdate >= '2005-06-01' > AND ac.transdate <= '2006-06-30' > > UNION ALL > > SELECT c.accno, c.description, ac.transdate, a.id, > round(ac.amount::numeric,2) as Amount, > a.invnumber, > ct.name, substr(a.notes,1,55) as Notes, > ac.memo > FROM ar a > JOIN acc_trans ac ON (a.id = ac.trans_id) > JOIN chart c ON (ac.chart_id = c.id) > JOIN customer ct ON (a.customer_id = ct.id) > LEFT JOIN department d ON (d.id = a.department_id) > WHERE 1 = 1 > AND ac.transdate >= '2005-06-01' > AND ac.transdate <= '2006-06-30' > > UNION ALL > > SELECT c.accno, c.description, ac.transdate, a.id, > round(ac.amount::numeric,2) as Amount, > a.invnumber, > ct.name, substr(a.notes,1,55) as Notes, > ac.memo > FROM ap a > JOIN acc_trans ac ON (a.id = ac.trans_id) > JOIN chart c ON (ac.chart_id = c.id) > JOIN vendor ct ON (a.vendor_id = ct.id) > LEFT JOIN department d ON (d.id = a.department_id) > WHERE 1 = 1 > AND ac.transdate >= '2005-06-01' > AND ac.transdate <= '2006-06-30' > > ORDER BY 1, 3, 4; > > does it for my auditor :-)-O > > el > > on 3/1/07 10:42 PM C. Duncan Hudson said the following: > >> David Boyle wrote: >> >>> On Thu, 2007-03-01 at 09:17 -0800, Wray Cason wrote: >>> >>> >>>> My bookkeeper wants to be able to crunch some numbers from my SQL Ledger >>>> database in a spreadsheet. Is there any established way to output reports >>>> to a csv file or something similar? >>>> >>>> >>> I imagine there is...but copy/paste works pretty well and is easy. >>> >>> David Boyle >>> NAPCO (Northwest Arkansas Paper Company) >>> >>> >>> >> There isn't, actually, a way to output to any kind of file. The >> technical solution is cut and paste, which I think leaves a lot to be >> desired. I use Postgres SQL Manager to generate reports. It would be >> nice if the functionality was built in, as that's not a tool I give to >> any of my users. >> >> Dunc >> > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > sql-ledger-users mailing list > sql...@li... > https://lists.sourceforge.net/lists/listinfo/sql-ledger-users > > |