Oliver Večerník <o...@vecernik.at> writes:

> Hi,
>
> I've got a small test case which I believe is a bug:
>
> $ cat t1.sql
> PRAGMA foreign_keys=OFF;
> BEGIN TRANSACTION;
> CREATE TABLE t1(id integer,product text);
> INSERT INTO "t1" VALUES(1,'apple pie');
> INSERT INTO "t1" VALUES(2,'sugar');
> COMMIT;
> sqlite3 test.sqlite < t1.sql
>
> #+BEGIN_SRC sh
> echo "ID|product"
> sqlite3 test.sqlite "
>   SELECT * from t1;
> "
> #+END_SRC
>
> #+RESULTS:
> | ID | product |     |
> |  1 | apple   | pie |
> |  2 | sugar   |     |
>

What about

#+BEGIN_SRC sqlite :csv :db test.sqlite
  SELECT * from t1;
#+END_SRC

#+RESULTS:
| 1 | apple pie |
| 2 | sugar     |

-- 
Eric Schulte
http://cs.unm.edu/~eschulte

Reply via email to