Home » U++ Library support » U++ SQL » Lowercase field name in table - error
Re: Lowercase field name in table - error [message #36799 is a reply to message #36798] |
Fri, 06 July 2012 10:25 |
Sender Ghost
Messages: 301 Registered: November 2008
|
Senior Member |
|
|
In case of SQLite, it returns original column name(s), independent from the query case-sensitivity:
sqlite> .header on
sqlite> .mode column
sqlite> create table SIMPLE_TEST1 (id integer primary key, NAME text, LASTNAME text, BDATE integer);
sqlite> insert into SIMPLE_TEST1(id, NAME, LASTNAME, BDATE) values (0, 'Joe', 'Smith', 20000101);
sqlite> insert into SIMPLE_TEST1(id, NAME, LASTNAME, BDATE) values (1, 'Mike', 'Smith', 20000102);
sqlite> insert into SIMPLE_TEST1(id, NAME, LASTNAME, BDATE) values (2, 'Jon', 'Goober', 20000103);
sqlite> select id, NAME, LASTNAME, BDATE from SIMPLE_TEST1;
id NAME LASTNAME BDATE
---------- ---------- ---------- ----------
0 Joe Smith 20000101
1 Mike Smith 20000102
2 Jon Goober 20000103
sqlite> select ID, NAME, LASTNAME, BDATE from SIMPLE_TEST1;
id NAME LASTNAME BDATE
---------- ---------- ---------- ----------
0 Joe Smith 20000101
1 Mike Smith 20000102
2 Jon Goober 20000103
But yes, I'm aware about possible ambiguities/differences between database engines and why uppercase used instead of lowercase (e.g. because of global SqlId(s) and possible lowercase local variables inside developer's source code). While this didn't change the conclusion, in my opinion.
Personally, I thought about access to column names with the case-sensitivity of constructed query. I already did something inside another topic.
Nevertheless, I agree, that in the current constraints, what you did is "the most prudent option".
[Updated on: Fri, 06 July 2012 10:48] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Thu May 23 18:57:35 CEST 2024
Total time taken to generate the page: 0.01901 seconds
|