From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Thomas S. Dye" Subject: Re: Finally figuring out some ob-sqlite stuff -- for worg? Date: Sat, 09 Nov 2019 07:38:18 -1000 Message-ID: <871ruhosqd.fsf@tsdye.online> Mime-Version: 1.0 Content-Type: text/plain; format=flowed Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:58614) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iTUh2-0002wW-MP for emacs-orgmode@gnu.org; Sat, 09 Nov 2019 12:38:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iTUh0-0000tA-Vu for emacs-orgmode@gnu.org; Sat, 09 Nov 2019 12:38:36 -0500 Received: from gateway21.websitewelcome.com ([192.185.46.113]:33439) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iTUh0-0000p5-Lm for emacs-orgmode@gnu.org; Sat, 09 Nov 2019 12:38:34 -0500 Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway21.websitewelcome.com (Postfix) with ESMTP id 8F835400C7FA8 for ; Sat, 9 Nov 2019 11:38:22 -0600 (CST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Eric Abrahamsen Cc: emacs-org list > Okay, it's up. If anyone wants to explain to me the point of the > "where > exists" clause in the SQL, I would be interested to hear. It > works as > expected this way, but is that clause necessary? The 'if exists' clause protects against an SQLite error raised if you ask to delete a table that doesn't exist. The code will work without it if the table exists, but will exit without creating the table if not. Thanks for a useful addition to the Org babel SQLite documentation. I agree with you that Org mode tables are a convenient way to enter SQL data, keeping in mind that table columns can't be rearranged without changes to the SQL code. All the best, Tom -- Thomas S. Dye http://tsdye.online/tsdye