csv export

Share your cool Custom SQL reports or Lua scripts with other mmex users

csv export

Postby Nikolay » Thu Jan 12, 2012 3:00 am

This report may help if you need export some custom data into csv file with semicolon as delImiter.
Code: Select all
select '"'||date||'"'||delimiter||'"'||
payee||'"'||delimiter||'"'||
TransactionType||'"'||delimiter||'"'||
case TransactionType when 'Withdrawal' then -amount else amount end||'"'||delimiter||'"'||
Category||'"'||delimiter||'"'||
Subcategory||'"'||delimiter||'"'||
TransactionNumber||'"'||delimiter||'"'||
replace(notes,'"', '""')||'"' as data
from alldata
left join (select ';' as delimiter)
where AccountName like '$%' and TransactionType<>'Transfer'

Result may be copied from Custom SQL view then pasted into notepad or into some any other pad, saved as csv.
Nikolay
MMEX Developer
 
Posts: 1173
Joined: Sat Dec 06, 2008 8:27 am
Location: Sankt-Petersburg, Russia

Return to Custom SQL and Lua Scripts

Who is online

Users browsing this forum: No registered users and 2 guests

cron