branch: externals/org
commit dff9602246ccdc4415cbcd48bbbed4f733ac9218
Author: Ralf <[email protected]>
Commit: Ihor Radchenko <[email protected]>
lisp/ob-sql.el: Fix SQL execution for saphana DB
* lisp/ob-sql.el (org-babel-execute:sql): Fix SQL execution for
saphana database engine so retrieved columns are correctly identified.
The SAP Hana command line tool 'hdbsql' uses a comma as the default
field separator. Previously the code assumed that a TAB is used which
caused a wrong import of the result.
TINYCHANGE
---
lisp/ob-sql.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el
index 14ca6bc48f..61932dd50e 100644
--- a/lisp/ob-sql.el
+++ b/lisp/ob-sql.el
@@ -387,7 +387,7 @@ SET COLSEP '|'
(goto-char (point-max))
(forward-char -1))
(write-file out-file))))
- (org-table-import out-file (if (string= engine "sqsh") '(4) '(16)))
+ (org-table-import out-file (if (memq (intern engine) '(saphana sqsh))
'(4) '(16)))
(org-babel-reassemble-table
(mapcar (lambda (x)
(if (string= (car x) header-delim)