So after further review, there is a 0xa0 (non-breaking space -  ) 
character - a non-breaking space before the semi-colon. Thus making the column 
name analogous to ptn.TreatmentNoteID_;

I guess it is functioning as intended?  


> Sent: Wednesday, July 15, 2015 at 3:53 PM
> From: "Jason H" <jhihn at gmx.com>
> To: sqlite-users at mailinglists.sqlite.org
> Cc: "General Discussion of SQLite Database" <sqlite-users at 
> mailinglists.sqlite.org>
> Subject: Re: [sqlite] Error: no such column: When column exists!
>
> So yes, I was missing 'S's, but that is only because I've been hacking at the 
> tables to get something to change.
> 
> So the query you gave me works, however, when I put it all on the same line, 
> it is identical to my query which does not. To prove this, I updated the file 
> on github with a query table.
> Just select from it, and paste it into the shell:
> 
> sqlite> select * from queries;
> 1|select * from PatientTreatmentNotes ptn join PatientTreatmentNotesSteps pts 
> ON pts.TreatmentNoteID = ptn.TreatmentNoteID ;|works
> 2|select * from PatientTreatmentNotes ptn join PatientTreatmentNotesSteps pts 
> ON pts.TreatmentNoteID = ptn.TreatmentNoteID?;|error
> sqlite> select * from PatientTreatmentNotes ptn join 
> PatientTreatmentNotesSteps pts ON pts.TreatmentNoteID = ptn.TreatmentNoteID ;
> sqlite> select * from PatientTreatmentNotes ptn join 
> PatientTreatmentNotesSteps pts ON pts.TreatmentNoteID = ptn.TreatmentNoteID?;
> Error: no such column: ptn.TreatmentNoteID
> 
> I think this is a gremlin. I'm interested in knowing your results.
> 
> And thanks to everyone helping with this!
> 
> > Sent: Wednesday, July 15, 2015 at 2:21 PM
> > From: "Richard Hipp" <drh at sqlite.org>
> > To: "General Discussion of SQLite Database" <sqlite-users at 
> > mailinglists.sqlite.org>
> > Subject: Re: [sqlite] Error: no such column: When column exists!
> >
> > On 7/15/15, Jason H <jhihn at gmx.com> wrote:
> > > Since attachments are not supported,
> > > https://github.com/jhihn/files/blob/master/no_such_column.sqlite3
> > >
> > 
> > The table names were both misspelled in your original query.  After I
> > fixed that, everything seems to work.  I tested with 3.7.8, 3.7.17,
> > 3.8.0, 3.8.7, and trunk.
> > 
> > select *
> >   from PatientTreatmentNotes ptn
> >            join PatientTreatmentNotesSteps pts
> >              ON pts.TreatmentNoteID = ptn.TreatmentNoteID ;
> > -- 
> > D. Richard Hipp
> > drh at sqlite.org
> > _______________________________________________
> > 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