W dniu 2014-03-10 12:27, Stephan Beal pisze:
On Mon, Mar 10, 2014 at 11:53 AM, Dariusz Wawer <[email protected]>wrote:

When I obtain the column name through sqlite3_column_name() I get
different results for query on view (ALIAS.COLUMN) than for query on table
(COLUMN). The alias is included in column name for view query but not in
table query, even though it is explicitely specified.

Where does the difference come from? How are view selects handled
differently than table selects? Is this intentional? If so, then what is
the reasoning behind it?


The column name returned is ALWAYS UNDEFINED unless you use an "AS" clause
to name it. If you do not use an "AS" clause then it is perfectly legal for
sqlite3 to return anything it wants for the column names.

yes, that is what is written in the documentation at https://www.sqlite.org/c3ref/column_name.html and it is what I have read first when trying to find an answer. It provides a solution, but it does not answer the question.


Pozdrawiam,
Dariusz Wawer

--
+-------------------     http://www.cc.com.pl/     --------------- +
   CCCC CCCC   CC Otwarte Systemy Komputerowe Sp. z o.o. --------- |
  CCC  CCC           - CheckPoint, Juniper, SafeNet, Vasco Partner |
  CC   CC              - Internet, Intranet, WWW, Bezpieczne sieci |
  CCC  CCC               - TEL,FAX (+48) 22 646-68-73, 606-37-80 - |
   CCCC CCCC               - Rakowiecka 36, Warszawa, 02-532 PL -- |
+------------------------------------------------------------------+
Spółka zarejestrowana w Wydz.XIII Gospodarczym Krajowego  Rejestru |
Sądowego, nr KRS 0000023570, zarząd: Grzegorz Blinowski  -  Prezes |
Zarządu, Tomasz Ramsza - Członek Zarządu; Kapitał zakł.:100000 PLN |
+----------------------------------------------------------------- +
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to