[sqlite] No such column error

2020-03-23 Thread Aydin Ozgur Yagmur
I have been developing a c++ program in windows. In this program, in a loop, I open database, query and update the records then close it. I am encountering randomly with "No such column error". Query looks like that (but there are more columns than this STATUS table): "select a.BIRTH_DATE,

Re: [sqlite] no such column error

2016-10-27 Thread Bart Smissaert
Hi Rob, I can see your point, but couldn't tell you if this should be considered a bug or not. Probably only DRH can tell you that. RBS On Thu, Oct 27, 2016 at 8:21 AM, Rob Golsteijn wrote: > Hi RBS, > > Re-introducing mytable in the sub-select is a workaround (and

Re: [sqlite] no such column error

2016-10-27 Thread Rob Golsteijn
Hi RBS, Re-introducing mytable in the sub-select is a workaround (and to get the same semantics in the general case I have to use the same row from the inner mytable and outer mytable). As indicated in my original message I already have a workaround for the issue. The intention of my post was

Re: [sqlite] no such column error

2016-10-26 Thread R Smith
On 2016/10/25 5:44 PM, Bart Smissaert wrote: Try this: UPDATE mytable SET myfield1 = (SELECT 1 from mytable ORDER BY EXISTS (SELECT 1 WHERE mytable.myfield2 = 1 ) ) RBS

Re: [sqlite] no such column error

2016-10-25 Thread Bart Smissaert
Try this: UPDATE mytable SET myfield1 = (SELECT 1 from mytable ORDER BY EXISTS (SELECT 1 WHERE mytable.myfield2 = 1 ) ) RBS On Tue, Oct 25, 2016 at 4:40 PM, Rob Golsteijn

[sqlite] no such column error

2016-10-25 Thread Rob Golsteijn
Hi List, I encountered a situation in which sqlite does not understand to which field I try to refer. I simplified the original query to show the problem. The simplified query itself is now completely meaningless (and for my specific situation I could rewrite the query to work around the

Re: [sqlite] 'no such column' error returned in a CASE statement

2010-11-03 Thread Ioannis Epaminonda
Pavel Ivanov-2 wrote: > > > Yes, it's expected. Column aliases are visible only in GROUP BY/ORDER > BY/HAVING clauses and outer selects. All other places should use exact > column expression instead. > > Pavel > > Ah, thanks Pavel for the clarification, now it makes sense. This is a bit

Re: [sqlite] 'no such column' error returned in a CASE statement

2010-11-02 Thread Pavel Ivanov
sqlite-users-boun...@sqlite.org on behalf of Ioannis Epaminonda > Sent: Tue 11/2/2010 8:19 AM > To: sqlite-users@sqlite.org > Subject: EXTERNAL:[sqlite] 'no such column' error returned in a CASE statement > > > > > The following error 'no such column: A' is returned when i ex

Re: [sqlite] 'no such column' error returned in a CASE statement

2010-11-02 Thread Black, Michael (IS)
hael D. Black Senior Scientist Advanced Analytics Directorate Northrop Grumman Information Systems From: sqlite-users-boun...@sqlite.org on behalf of Ioannis Epaminonda Sent: Tue 11/2/2010 8:19 AM To: sqlite-users@sqlite.org Subject: EXTERNAL:[sqlite] 'no such

[sqlite] 'no such column' error returned in a CASE statement

2010-11-02 Thread Ioannis Epaminonda
The following error 'no such column: A' is returned when i execute the following statement. SELECT 'test' as A,CASE WHEN A = 'test' THEN 'true' ELSE 'false' END as ERRVAL Is this the expected result or should the generated column be available to the case statement. Thanks. -- View this