Re: [sqlite] sqlite3_column_name with alias

2018-01-18 Thread J Decker
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

Re: [sqlite] sqlite3_column_name with alias

2018-01-08 Thread Bart Smissaert
> 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

Re: [sqlite] sqlite3_column_name with alias

2018-01-08 Thread Bart Smissaert
> 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:

Re: [sqlite] sqlite3_column_name with alias

2018-01-08 Thread R Smith
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

Re: [sqlite] sqlite3_column_name with alias

2018-01-07 Thread Bart Smissaert
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

Re: [sqlite] sqlite3_column_name with alias

2018-01-07 Thread R Smith
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

Re: [sqlite] sqlite3_column_name with alias

2018-01-07 Thread Bart Smissaert
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

Re: [sqlite] sqlite3_column_name with alias

2018-01-07 Thread 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. >