Re: [sqlite] Selecting from view gives bad column information when view name is used in quotes in select statement

2014-07-14 Thread James K. Lowden
On Sun, 13 Jul 2014 22:45:27 +0200 Clemens Ladisch wrote: > > There is no contract of which column names should be returned, no > > "incorrect" headers and no guarantee, and no obligation from the > > standard or any other requirement. > > But these particular column names do not look as if they

Re: [sqlite] Selecting from view gives bad column information when view name is used in quotes in select statement

2014-07-14 Thread James K. Lowden
On Sun, 13 Jul 2014 22:54:52 +0100 Simon Slavin wrote: > > sqlite> select "TestView"."id", "TestView"."data2" from TestView; > > TestViewTestView > > -- -- > > 1 Miranda ... > It's also not 'wrong' with regard to the SQL specification. SQL does > not define any com

Re: [sqlite] Selecting from view gives bad column information when view name is used in quotes in select statement

2014-07-13 Thread Simon Slavin
On 13 Jul 2014, at 9:45pm, Clemens Ladisch wrote: > But these particular column names do not look as if they were anything > but as bug: > > sqlite> select "TestView"."id", "TestView"."data2" from TestView; > TestViewTestView > -- -- > 1 Miranda I understand your

Re: [sqlite] Selecting from view gives bad column information when view name is used in quotes in select statement

2014-07-13 Thread RSmith
On 2014/07/13 22:45, Clemens Ladisch wrote: RSmith wrote: On 2014/07/11 17:26, Bruce Cowan wrote: When you select columns from a view, the (ADO.NET) DbDataReader that is returned from the execute call does not contain sensible column names There is no contract of which column names should be

Re: [sqlite] Selecting from view gives bad column information when view name is used in quotes in select statement

2014-07-13 Thread Clemens Ladisch
RSmith wrote: > On 2014/07/11 17:26, Bruce Cowan wrote: >> When you select columns from a view, the (ADO.NET) DbDataReader that is >> returned from the execute call does not contain sensible column names > > There is no contract of which column names should be returned, no > "incorrect" headers and

Re: [sqlite] Selecting from view gives bad column information when view name is used in quotes in select statement

2014-07-13 Thread Simon Slavin
On 13 Jul 2014, at 2:34pm, RSmith wrote: > If you need the returned names to be exactly something specific, then you > need to use the "AS" directive. You can even put the 'AS' into the VIEW: sqlite> .headers ON sqlite> .mode columns sqlite> CREATE TABLE TestA (one TEXT, two TEXT); sqlite> IN

Re: [sqlite] Selecting from view gives bad column information when view name is used in quotes in select statement

2014-07-13 Thread RSmith
On 2014/07/11 17:26, Bruce Cowan wrote: When you select columns from a view, the (ADO.NET) DbDataReader that is returned from the execute call does not contain sensible column names// ...//This problem makes SQLite views completely unusable with ServiceStack.OrmLite version 4.0.23 or newe

[sqlite] Selecting from view gives bad column information when view name is used in quotes in select statement

2014-07-13 Thread Bruce Cowan
When you select columns from a view, the (ADO.NET) DbDataReader that is returned from the execute call does not contain sensible column names when the select statement specifies "view-name"."column-name" or [view-name].[column-name]. Instead of column names, it just contains the view name for e