<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - SQLite: Base Direct SQL Not Running Properly"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=144694#c6">Comment # 6</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - SQLite: Base Direct SQL Not Running Properly"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=144694">bug 144694</a>
from <span class="vcard"><a class="email" href="mailto:flywire0@gmail.com" title="flywire <flywire0@gmail.com>"> <span class="fn">flywire</span></a>
</span></b>
<pre>There's a Direct SQL scope discussion that needs to be had here. User should be
able to run a SQL script that returns the result as a view (ie query table
grid). Tools → SQL doesn't do that. I'd expect it in Query → Direct SQL (with
one select).
==========
Another test case.
SQL code:
CREATE TABLE datetime_int (d1 int);
INSERT INTO datetime_int (d1)
VALUES(strftime('%s','now'));
SELECT d1 FROM datetime_int;
SELECT datetime(d1,'unixepoch')
FROM datetime_int;
SQLite2 output:
E:\demo\gnucash_books>\sqlite\sqlite3
SQLite version 3.36.0 2021-06-18 18:36:39
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> CREATE TABLE datetime_int (d1 int);
sqlite>
sqlite> INSERT INTO datetime_int (d1)
...> VALUES(strftime('%s','now'));
sqlite>
sqlite> SELECT d1 FROM datetime_int;
1632557102
sqlite>
sqlite> SELECT datetime(d1,'unixepoch')
...> FROM datetime_int;
2021-09-25 08:05:02
Expect 2 lines in Tools → SQL Output
1632557102
2021-09-25 08:05:02
Error in Query → Direct SQL is reasonable:
"The data content could not be loaded. only one SQL statement allowed"</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>