There is sqlite3_column_origin_name( stmt, n ) ; is that also the alias?
instead of sqlite3_column_name(stmt,n );
or does there need to be sqlite3_column_original that really returns the
not alias?
On Mon, Jan 8, 2018 at 3:21 AM, Bart Smissaert
wrote:
> > As you can
> As you can see
Should read:
As you said
RBS
On Mon, Jan 8, 2018 at 11:17 AM, Bart Smissaert
wrote:
> > Best is to define type on output
>
> Yes, looks that way. As you can see the alias can help, eg:
> select max(integer_date_column) as integer_date_column
>
> what
> Best is to define type on output
Yes, looks that way. As you can see the alias can help, eg:
select max(integer_date_column) as integer_date_column
what I also added is coding to pick up the intended formatting from the
alias, not from the column but by just specifying the output datatype:
On 2018/01/08 12:00 AM, Bart Smissaert wrote:
OK, I can see your point and I am sure you are right.
All this has to do with the question (discussed not long ago) how one
should know how the output from a statement should be handled by
an application receiving the data. In my case that
OK, I can see your point and I am sure you are right.
All this has to do with the question (discussed not long ago) how one
should know how the output from a statement should be handled by
an application receiving the data. In my case that application is Excel.
Take for example an integer. Excel
On 2018/01/07 10:11 PM, Bart Smissaert wrote:
Sure, in that case there can be no sensible column name.
In the great majority of cases though the select field will be of a single
table column, with or without
an expression. In those cases it will be helpful to get the non alias
column name.
To
Sure, in that case there can be no sensible column name.
In the great majority of cases though the select field will be of a single
table column, with or without
an expression. In those cases it will be helpful to get the non alias
column name.
RBS
On Sun, Jan 7, 2018 at 7:59 PM, Simon Slavin
On 7 Jan 2018, at 6:16pm, Bart Smissaert wrote:
> Would it be possible somehow to get the column full name if there is a
> column alias?
>
> For example if we have:
>
> select max(ID) as MaxID from table1
>
> then I need to get max(ID) from the statement pointer.
>
Would it be possible somehow to get the column full name if there is a
column alias?
For example if we have:
select max(ID) as MaxID from table1
then I need to get max(ID) from the statement pointer.
One would think that if sqlite3_column_name can get the alias name then
somehow it must
be
On Tue, Feb 4, 2014 at 11:34 AM, Stephan Beal wrote:
> On Tue, Feb 4, 2014 at 2:52 AM, Richard Hipp wrote:
>
> > There is no "intended" behavior.
> > http://www.sqlite.org/c3ref/mark/column_name.html?If+there+is+n*fied
>
>
> i assume the broken image at
On Tue, Feb 4, 2014 at 2:52 AM, Richard Hipp wrote:
> There is no "intended" behavior.
> http://www.sqlite.org/c3ref/mark/column_name.html?If+there+is+n*fied
i assume the broken image at the top of that page qualifies as "unintended
behaviour" ;)
On Sun, Feb 2, 2014 at 12:23 PM, Charles Leifer wrote:
> I was surprised to find that, depending on whether I queried a table or a
> view, sqlite3_column_name would return different values for the column
> name. Specifically, when the table is aliased and the columns in the
I was surprised to find that, depending on whether I queried a table or a
view, sqlite3_column_name would return different values for the column
name. Specifically, when the table is aliased and the columns in the SELECT
clause are quoted, sqlite returns an unquoted, unaliased column name, e.g. "
> From: NSRT Mail account. <joecool2...@yahoo.com>
> To: "sqlite-users@sqlite.org" <sqlite-users@sqlite.org>
> Sent: Monday, October 29, 2012 2:33 PM
> Subject: [sqlite] sqlite3_column_name() contains quotes for views
>
> I believe I r
From: NSRT Mail account. <joecool2...@yahoo.com>
To: "sqlite-users@sqlite.org" <sqlite-users@sqlite.org>
Sent: Monday, October 29, 2012 2:33 PM
Subject: [sqlite] sqlite3_column_name() contains quotes for views
I believe I ran into a bug with
I believe I ran into a bug with SQLite, and would like to ensure the problem is
not on my end.
I created a simple table along with a view of it:
SQLite version 3.7.14.1 2012-10-04 19:37:12
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .dump
PRAGMA
On 13 Nov 2009, at 9:11pm, Kees Nuyt wrote:
> SELECT rowid AS rowid, col1, col2
> FROM foo;
> rowid|col1|col2
> 1|1|row1
> 2|2|row2
Heh. Neat. Also you can do things like
SELECT col1 AS rowid, col1, col2
Simon.
___
sqlite-users mailing list
On Fri, Nov 13, 2009 at 3:11 PM, Kees Nuyt wrote:
> On Fri, 13 Nov 2009 15:07:54 +0100, Marco Bambini
> wrote:
>
>> sqlite 3.6.19
>>
>> CREATE TABLE foo (col1 INTEGER PRIMARY KEY, col2 TEXT);
>>
>> SELECT rowid, col1, col2
>>
>> returns the following column
On Fri, 13 Nov 2009 15:07:54 +0100, Marco Bambini
wrote:
> sqlite 3.6.19
>
> CREATE TABLE foo (col1 INTEGER PRIMARY KEY, col2 TEXT);
>
> SELECT rowid, col1, col2
>
> returns the following column names with sqlite3_column_name:
> col1, col1, col2
>
> Is there a way to force the
On Fri, Nov 13, 2009 at 8:07 AM, Marco Bambini wrote:
> sqlite 3.6.19
>
> CREATE TABLE foo (col1 INTEGER PRIMARY KEY, col2 TEXT);
> a
> SELECT rowid, col1, col2
>
> returns the following column names with sqlite3_column_name:
> col1, col1, col2
>
> Is there a way to force the
Unless the user is a paying customer.
On Fri, Nov 13, 2009 at 8:37 AM, Jean-Christophe Deschamps
wrote:
>
>
> >Unfortunately I cannot modify the query... it is supplied by an user.
>
> Well, what about upgrading the user?
>
> Sorry coul'd resist ... I'm already out!
>
>
>
>
>Unfortunately I cannot modify the query... it is supplied by an user.
Well, what about upgrading the user?
Sorry coul'd resist ... I'm already out!
___
sqlite-users mailing list
sqlite-users@sqlite.org
On 13 Nov 2009, at 2:07pm, Marco Bambini wrote:
> CREATE TABLE foo (col1 INTEGER PRIMARY KEY, col2 TEXT);
> a
> SELECT rowid, col1, col2
>
> returns the following column names with sqlite3_column_name:
> col1, col1, col2
>
> Is there a way to force the first column name to be returned as rowid
Unfortunately I cannot modify the query... it is supplied by an user.
--
Marco Bambini
http://www.sqlabs.com
http://www.creolabs.com/payshield/
On Nov 13, 2009, at 3:10 PM, Virgilio Fornazin wrote:
> SELECT
> field as NAME
>
> does not work?
>
> On Fri, Nov 13, 2009 at 12:07, Marco
SELECT
field as NAME
does not work?
On Fri, Nov 13, 2009 at 12:07, Marco Bambini wrote:
> sqlite 3.6.19
>
> CREATE TABLE foo (col1 INTEGER PRIMARY KEY, col2 TEXT);
> a
> SELECT rowid, col1, col2
>
> returns the following column names with sqlite3_column_name:
> col1, col1,
sqlite 3.6.19
CREATE TABLE foo (col1 INTEGER PRIMARY KEY, col2 TEXT);
a
SELECT rowid, col1, col2
returns the following column names with sqlite3_column_name:
col1, col1, col2
Is there a way to force the first column name to be returned as rowid and not
as its col1 alias?
Thanks.
--
Marco
26 matches
Mail list logo