On Thursday 10 July 2008 13:54:04 Markus Hoenicka wrote:
> Quoting Kris Groves <[EMAIL PROTECTED]>:
> > Hi,
> >
> > I've detected a problem with the code I wrote here.
> > Normally sqlite3, when returning a result column in the format
> > tablename.columnname, the real table name is returned, regardless if it
> > was aliased in the original sql statement.
> > I've just discovered that if you do a 'select distinct' sqlite3 returns
> > the tablename alias, and as a result fails to resolve the field type for
> > that column.
>
> Is this problem so severe that we should revert the driver to the
> previous version until a fix is available? Or do you think you can fix
> this problem in a matter of days?
>
> regards,
> Markus

I'm starting on it tomorrow morning.  I will also add code that will determine 
the field type for an expression :)

The workaround until it is done, is not to alias your tables when 
using 'distinct', and if you are using a distinct select with multiple 
tables, to prefix your columns with the real tablename
e.g. select distinct a.x, b.y from a,b where ....;

Shall I submit the code as I did last time ? (attaching to a mail here)

-- 
Kris Groves

 Project Manager / Software Engineer                   mm-lab GmbH
 Phone:  +49 7154 827 323                      Stammheimer Str. 10
 Fax:    +49 7154 827 350                     D-70806 Kornwestheim
 [EMAIL PROTECTED]                                 www.mmlab.de

            Domicile of Company: Kornwestheim, Germany
   District Court - Court of Registration Stuttgart HRB 207257
          Managing Directors: Bernd Herrmann, Lothar Krank, 
                 Michael Meiser, Dr. Andreas Streit              


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Libdbi-drivers-devel mailing list
Libdbi-drivers-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel

Reply via email to