Oliver Večerník <o...@vecernik.at> writes: >> 2. use ":results drawer", and explicitly formatting the results in >> Org-mode syntax w/awk > > Unfortunately this doesn't work. The output is always printed to the > "#+RESULTS:" section and not piped through awk. But working with > ":results raw" works perfect for me. I can even produce a separator > line in the table now with =print "|-"=. > > The only question left, how to import org tables "on the fly" to sqlite, > to keep everthing in Org mode. This would also be an interesting > candidate for an "ob-doc-sh.org" starter I guess.
I may have missed you spelling this out in a previous email, but can you not import Org tables directly into sqlite code blocks?
Evaluate this again after evaluating the second block. #+BEGIN_SRC sqlite :csv :db test.sqlite SELECT * from t1; #+END_SRC #+RESULTS: | 1 | apple pie | | 2 | sugar | A manually created Org-mode block. #+name: manual | 3 | rhubarb | | 4 | butter | #+BEGIN_SRC sqlite :csv :var data=manual :db test.sqlite :results silent .separator "," .import $data t1 #+END_SRC
-- Eric Schulte http://cs.unm.edu/~eschulte