HTML report and Alasql SELECT INTO CSV()

Started by ChampagnePerry, July 01, 2022, 14:48:59 PM

Previous topic - Next topic

ChampagnePerry

Hi all,
I was just wondering if anyone had managed to use the AlaSQL SELECT <field list> FROM <table> INTO CSV("filename") and get it to work.
AlaSQL says it supports this but I can't get it to work at all.

When I run
SELECT e.name, e.documentation FROM Elements e JOIN ViewsContent vc ON e.id=vc.contentid JOIN Views v ON v.id=vc.viewid WHERE e.specialization="Data Domain" AND v.name="Data Governance Domains"

I get a nice list in the browser

When I run
SELECT e.name, e.documentation FROM Elements e JOIN ViewsContent vc ON e.id=vc.contentid JOIN Views v ON v.id=vc.viewid INTO CSV("DataDomains.csv") WHERE e.specialization="Data Domain" AND v.name="Data Governance Domains"
I get nothing, no error, no output - but that may be because it is trying to redirect the output to the file, no file (unless it is writing it somewhere but I just can't find it)

Any Ideas?
Anything I'm missing (quite likely)
Anything Stupid I'm doing (highly likely)

Thanks in advance.

Jean-Baptiste Sarrodie

Hi,

The INTO clause should come before the FROM clause:
SELECT <field list> INTO CSV('<filename>') FROM <table>
Regards,

JB
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.