One of the ideas I most gleefully stole from YASQL for sqlpython is special terminators, sequences like
\g
and \c
that replace a SELECT statement's ending semicolon. When a query ends with a special terminator, the output is specially formatted: \c
gives CSV, \h
gives HTML, \t
gives transposed (columns as rows / rows as columns), etc. Type help terminators
for details.sqlpython 1.5.0 is out today, with the most demented special output format yet: CHARTS! Instant ad-hoc grapical goodness direct from your query, no tedious mucking around in spreadsheets or exporting to another program. Just terminate your query with \l (line graph), \L (scatter graph - no lines), \p (pie chart), or \b (bar graph).
Also, as of 1.5.0, it's pretty easy to define your own special terminators and formats. Just install sqlpython in uncompressed form (easy_install -UZ will do that), open up output_templates.py, and follow the pattern.
5 comments:
Good stuff--thanks for sharing.
Hi Catherine,
I really like this latest addition to sqlpython. Very well done!
Cheers,
Luca
Instant thought - sqlpython doesn't seem to display stuff printed with dbms_output. Have I just missed an option that I need to set? (The documentation seems a bit hard to locate).
You're right, Paul, dbms_output isn't working yet. Sadly, I don't even know how to make it work. I'm eager for any suggestions...
Indeed that's an interesting question. I see from this post on asktom a possible solution related to the jdbc clients which may give some ideas: http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:45027262935845
Post a Comment