Here is the DDL for the scenario:

    create table Country (
        Id integer primary key,
        Code text,
        Title text,
        ShortTitle text,
        ModifiedOn text,
        ModifiedBy integer
    );

    create table Mid (
        Id integer primary key,
        CountryCode text,
        ModifiedOn text,
        ModifiedBy integer
    );
    
    create view ProgrammingMapView as
      select
        p.Id ProductId
      , pt.Id ProtocolId
      , m.Id Mid
      from Mid m
        join MidProduct mprod on (mprod.RegisteredMid = m.Id)
        join Product p on (p.Id = mprod.ProductId)
        join MidProtocol mprot on (mprot.RegisteredMid = m.Id)
        join ProtocolType pt on (pt.Id = mprot.ProtocolId)
        join ProductProtocol pp on (pp.ProductId = p.Id and pp.ProtocolTypeId = 
pt.Id)
    ;

-----Original Message-----
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] 
On Behalf Of Joe Mistachkin
Sent: Thursday, August 28, 2014 10:07 AM
To: 'General Discussion of SQLite Database'
Subject: Re: [sqlite] Possible bug in System.Data.Sqlite.Core (ADO.Net)


Clemens Ladisch wrote:
>
> Your query did not involve the query flattener.  Try this:
>

I used the query as originally reported.  However, as others have stated, 
without AS clauses, the column names are not well-defined.

In this case, the IDataRecord.GetName method of the SQLiteDataReader class is a 
very thin wrapper around the underlying sqlite3_column_name() API.

Basically, it just returns whatever the sqlite3_column_name() API returns 
verbatim.

--
Joe Mistachkin

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to