D. Richard Hipp wrote:
> On Feb 24, 2010, at 5:45 PM, Igor Tandetnik wrote:
>
>> D. Richard Hipp wrote:
>>> This problem has existed in SQLite forever and has never been seen
>>> before. So it is obscure. The simple fix is to put the ON clause
>>> on the CROSS JOIN where it belongs.
>>
>> Doe
On Feb 24, 2010, at 5:45 PM, Igor Tandetnik wrote:
> D. Richard Hipp wrote:
>> This problem has existed in SQLite forever and has never been seen
>> before. So it is obscure. The simple fix is to put the ON clause on
>> the CROSS JOIN where it belongs.
>
> Does CROSS JOIN allow an ON clause? T
I posted the following and it didn't appear - I probably hit Reply to Sender
instead of Reply Group:
> Does INDEX sqlite_autoindex_currency_1 contain only pointers to the
> identical currencies?
>
> Tom
This little change also works:
ON +c1.cur=c2.cur;
or
ON c1.cur=+c2.cur;
Along with LIKE, th
D. Richard Hipp wrote:
> This problem has existed in SQLite forever and has never been seen
> before. So it is obscure. The simple fix is to put the ON clause on
> the CROSS JOIN where it belongs.
Does CROSS JOIN allow an ON clause? That doesn't make much sense. I guess I'm
missing something o
On Feb 24, 2010, at 5:20 PM, Pavel Ivanov wrote:
>> Does INDEX sqlite_autoindex_currency_1 contain only pointers to the
>> identical currencies?
>
> First of all AFAIK 'PRIMARY KEY' implies uniqueness of the column. And
> second: I bet if you execute 'PRAGMA case_sensitive_like = true' then
> pla
> Does INDEX sqlite_autoindex_currency_1 contain only pointers to the
> identical currencies?
First of all AFAIK 'PRIMARY KEY' implies uniqueness of the column. And
second: I bet if you execute 'PRAGMA case_sensitive_like = true' then
plans will be the same.
See http://www.sqlite.org/optoverview.h
"ve3meo" wrote in
message news:hm47t5$5l...@dough.gmane.org...
>
> "Igor Tandetnik" wrote in
> message news:hm45gu$s5...@dough.gmane.org...
>> Mark Brand wrote:
>>> --Gives unexpected results
>>> SELECT c1.cur cur1, c2.cur cur2, COALESCE(self.rate, x.rate) rate
>>> FROM currency c1
>>> CROSS
"Igor Tandetnik" wrote in message
news:hm45gu$s5...@dough.gmane.org...
> Mark Brand wrote:
>> --Gives unexpected results
>> SELECT c1.cur cur1, c2.cur cur2, COALESCE(self.rate, x.rate) rate
>> FROM currency c1
>> CROSS JOIN currency c2
>> LEFT JOIN exchange x
>>ON x.cur1=c1.cur
>>AND x.
Mark Brand wrote:
> --Gives unexpected results
> SELECT c1.cur cur1, c2.cur cur2, COALESCE(self.rate, x.rate) rate
> FROM currency c1
> CROSS JOIN currency c2
> LEFT JOIN exchange x
>ON x.cur1=c1.cur
>AND x.cur2=c2.cur
> LEFT JOIN (SELECT 1 rate) self
>ON c1.cur=c2.cur;
>
> /* results
> It's pretty strange how you try to join with some table not even
> mentioning any column of that table in the joining condition. I bet
> behavior is not defined for such cases in SQL standard and you're
> getting some interpretation of such query.
>
I'm not aware of any requirement that a JO
It's pretty strange how you try to join with some table not even
mentioning any column of that table in the joining condition. I bet
behavior is not defined for such cases in SQL standard and you're
getting some interpretation of such query.
Probably this query will return what you want:
SELECT c
11 matches
Mail list logo