So in your case (delphi usage) how do you do when using postgresql ?  

Cheers !  
>  Wed Aug 26 2015 4:52:02 pm CEST CEST from "Stephen Chrzanowski"
><pontiac76 at gmail.com>  Subject: Re: [sqlite] Why sqlite show qualified 
>column
>names when selecting from views ?
>
>  I'm sure either #1 or #3 happens already. I know I've been nagged about
> ambiguous field names, but I also know that somewhere I've seen _1 or _2 be
> appended to field names (That might be just the SQL IDE I use doing that).
> 
> I can't get on board with #2 because most wrappers only look at the first
> value, or, would overwrite "SalesTotal" with whatever the last column has
> the name SalesTotal. The wrapper I use in Delphi uses both named field
> arrays (IE: tbl.FieldByName['SalesTotal']) as well as field numbers (IE:
> tbl.FieldByID[1]) but I try to use the field names since the order of the
> field names COULD change.
> 
> 
> On Wed, Aug 26, 2015 at 10:12 AM, Domingo Alvarez Duarte <
> sqlite-mail at dev.dadbiz.es> wrote:
> 
>  
>>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
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 

>>  _______________________________________________
>> sqlite-users mailing list
>> sqlite-users at mailinglists.sqlite.org
>> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>> 

>  _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> 
>
>  



?

Reply via email to