Hello !  

Three possibilities:  

1- Show a qualified name to disambiguate.  

2 - Show duplicated column names.  

3 - Show error message message about ambiguos column name.  

?  

On the case mentioned apply rule 2, like postgresql do.  

Cheers !  

?  
>  Wed Aug 26 2015 2:35:41 pm CEST CEST from "Simon Slavin"
><slavins at bigfraud.org>  Subject: Re: [sqlite] Why sqlite show qualified
>column names when selecting from views ?
>
>  On 26 Aug 2015, at 10:17am, Domingo Alvarez Duarte
><sqlite-mail at dev.dadbiz.es> wrote:
> 
>  
>>But like it's already done on several other cases why not fix this issue
>>and
>> wrap this fix with "#ifdef SQLITE_CLEAN_COLUMN_NAMES" that's not defined
>>by
>> default so older code will remain working but new code can enable this and
>> use it ?
>> 

>  With that definition set, suppose you execute the following two commands:
> 
> ATTACH DATABASE 'August' AS salesThisMonth;
> SELECT clientName, salesThisMonth.salesTotal, salesTotal
> FROM sales
> JOIN salesThisMonth ON salesThisMonth.clientId = sales.clientId
> ORDER BY clientName;
> 
> What should the name be for the second column ?
> 
> Also, with
> 
> SELECT a, b, 100*a/b FROM myTable;
> 
> What should the name of the third column be ?
> 
> Simon.
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> 
>
>  



?

Reply via email to