[sqlite] TEXT columns with Excel/VBA

2015-12-03 Thread R Smith
On 2015/12/03 8:49 PM, Scott Hess wrote: > On Thu, Dec 3, 2015 at 4:49 AM, R Smith wrote: > >> On 2015/12/03 3:04 AM, Scott Hess wrote: >> >> I posit that a column declared as: col VARCHAR(32) NOT NULL says a >> whole lot more about what is actually happening than: col TEXT NOT NULL > I'm sayi

[sqlite] TEXT columns with Excel/VBA

2015-12-03 Thread Bernardo Sulzbach
I understand Smith's point. But when I am sure that some schema is going to stay in SQLite for the foreseeable future, I like using text. It is simple, adequate, and expresses my intent completely: TEXT. That's what the column has, TEXT, not 40, not 60, not less than 30, just freaking text. Lastly

[sqlite] TEXT columns with Excel/VBA

2015-12-03 Thread R Smith
On 2015/12/03 3:04 AM, Scott Hess wrote: > I discourage this kind of usage because it means that in some distant > future when someone has to make things work with a different database > engine, they have to grind through and check every weirdo VARCHAR(73) and > MEDIUMBIGINT declaration someone p

[sqlite] TEXT columns with Excel/VBA

2015-12-03 Thread Simon Slavin
On 3 Dec 2015, at 12:49pm, R Smith wrote: > I *ALWAYS* write cross-platform code as far as SQL is concerned. I even think > in this day and age every programmer should, or is there a case for the > opposite? If cross-platform code worked identically cross-platform I'd rest more easily. The

[sqlite] TEXT columns with Excel/VBA

2015-12-03 Thread Bart Smissaert
So, it will be quite a rare occurrence then that this could be of any benefit. Still nice to know this. RBS On 3 Dec 2015 1:33 am, "Richard Hipp" wrote: > On 12/2/15, Bart Smissaert wrote: > >> and the SQLite query planner sometimes notes that length when > considering > > data shape > > > >

[sqlite] TEXT columns with Excel/VBA

2015-12-03 Thread Scott Hess
On Thu, Dec 3, 2015 at 4:49 AM, R Smith wrote: > On 2015/12/03 3:04 AM, Scott Hess wrote: > >> I discourage this kind of usage because it means that in some distant >> future when someone has to make things work with a different database >> engine, they have to grind through and check every weird

[sqlite] TEXT columns with Excel/VBA

2015-12-03 Thread R Smith
On 2015/12/02 6:34 PM, Erwin Kalvelagen wrote: > Good morning. > > I wrote a little tool to dump certain data sets into a SQLite database. A > user suggested that I should not use type TEXT but rather type VARCHAR for > character columns, due to some issue with Excel/VBA. See the comments in: > h

[sqlite] TEXT columns with Excel/VBA

2015-12-03 Thread Bart Smissaert
> and the SQLite query planner sometimes notes that length when considering data shape In what situations does that happen? RBS On Thu, Dec 3, 2015 at 12:29 AM, R Smith wrote: > > > On 2015/12/02 6:34 PM, Erwin Kalvelagen wrote: > >> Good morning. >> >> I wrote a little tool to dump certain da

[sqlite] TEXT columns with Excel/VBA

2015-12-02 Thread Richard Hipp
On 12/2/15, Bart Smissaert wrote: >> and the SQLite query planner sometimes notes that length when considering > data shape > > In what situations does that happen? > CREATE TABLE ex1(a INTEGER, b VARCHAR(5), c VARCHAR(5000)); CREATE INDEX ex1b ON ex1(b); CREATE INDEX ex1c ON ex1(c); SELECT * FR

[sqlite] TEXT columns with Excel/VBA

2015-12-02 Thread Scott Hess
On Wed, Dec 2, 2015 at 4:29 PM, R Smith wrote: > > Personally I use VARCHAR(Len) in table column definitions - simply because > my schema is then directly interchangeable with MySQL/PostGres and the > SQLite query planner sometimes notes that length when considering data > shape - but for data pur

[sqlite] TEXT columns with Excel/VBA

2015-12-02 Thread Simon Slavin
On 2 Dec 2015, at 4:34pm, Erwin Kalvelagen wrote: > I could not find a reference to this using Google. So my question is: Is > this a known problem? I would like to understand a little bit better what > this is about. The bug, if there is a bug, must be in Excel/VBA. SQLite will accept either

[sqlite] TEXT columns with Excel/VBA

2015-12-02 Thread Bernardo Sulzbach
On Wed, Dec 2, 2015 at 2:34 PM, Erwin Kalvelagen wrote: > A user suggested that I should not use type TEXT but rather type VARCHAR for > character columns, due to some issue with Excel/VBA. If he or she turns out to be correct, do it. As Slavin and Hipp mentioned, SQLite won't care about the cha

[sqlite] TEXT columns with Excel/VBA

2015-12-02 Thread Richard Hipp
On 12/2/15, Erwin Kalvelagen wrote: > Good morning. > > I wrote a little tool to dump certain data sets into a SQLite database. A > user suggested that I should not use type TEXT but rather type VARCHAR for > character columns, due to some issue with Excel/VBA. See the comments in: > http://yetano

[sqlite] TEXT columns with Excel/VBA

2015-12-02 Thread Erwin Kalvelagen
Good morning. I wrote a little tool to dump certain data sets into a SQLite database. A user suggested that I should not use type TEXT but rather type VARCHAR for character columns, due to some issue with Excel/VBA. See the comments in: http://yetanothermathprogrammingconsultant.blogspot.com/2013/