Zachary Yates wrote:
> 
> There's a lot more detail to this question posted at:
>
http://stackoverflow.com/questions/25534898/trouble-with-sqlexpressiont-join
-and-column-names
> 

I'm unable to replicate this issue using System.Data.SQLite.  Here is what
I've tried so far:

set db [sql open -type SQLite {Data Source=:memory:;}]
sql execute $db {
  CREATE TABLE Country(
    Id,
    Code,
    Title,
    ShortTitle,
    ModifiedOn,
    ModifiedBy
  );

  CREATE TABLE Mid(
    Id,
    CountryCode
  );

  CREATE TABLE ProgrammingMapView(
    Mid,
    ProductId
  );

  INSERT INTO Country (
    Id, Code, Title, ShortTitle, ModifiedOn, ModifiedBy)
  VALUES (
    1, 'US', 'United States of America', 'United States',
    '2014-01-01', 'Joe'
  );

  INSERT INTO ProgrammingMapView (Mid, ProductId) VALUES (1, 87);
  INSERT INTO Mid (Id, CountryCode) VALUES (1, 'US');

  SELECT "Country"."Id", "Country"."Code", "Country"."Title",
         "Country"."ShortTitle", "Country"."ModifiedOn",
         "Country"."ModifiedBy"
  FROM "Country"
  INNER JOIN "ProgrammingMapView"
     ON ("Mid"."Id" = "ProgrammingMapView"."Mid")
  INNER JOIN "Mid"
     ON ("Country"."Code" = "Mid"."CountryCode")
  WHERE ("ProgrammingMapView"."ProductId" = 87)
  ORDER BY "Country"."Title" ASC;
}
parray rows

The above uses the EagleShell from the Externals directory in the
source tree.  Here, the final line of output from the above script
is:

  rows(names) = Id Code Title ShortTitle ModifiedOn ModifiedBy

Underneath, this ends up using the exact same IDataRecord.GetName
method.

Do you have any further information on this issue that might be
useful?

--
Joe Mistachkin

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

Reply via email to