nal Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of John Machin
Sent: Tuesday, February 24, 2009 3:01 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Using result of subquery both as value and
conditional test...
On 25/02/200
On 25/02/2009 6:15 AM, John Elrick wrote:
> I may be overlooking something obvious, however, I cannot discern from
> the documentation if this is possible.
>
> given a simple example:
>
> create table x (x_id integer);
> create table y (y_id integer, y_value varchar);
>
> insert into x values (
D. Richard Hipp wrote:
> On Feb 24, 2009, at 2:15 PM, John Elrick wrote:
>
>
SNIP
>>
>> Is there any way to eliminate the second (select y_value from y where
>> y_id = x_id)? If so, what would the query look like?
>>
>>
>
> SELECT coalesce((SELECT y_value FROM y WHERE y_id=x_id), 'darn')
On Feb 24, 2009, at 2:15 PM, John Elrick wrote:
> I may be overlooking something obvious, however, I cannot discern from
> the documentation if this is possible.
>
> given a simple example:
>
> create table x (x_id integer);
> create table y (y_id integer, y_value varchar);
>
> insert into x valu
I may be overlooking something obvious, however, I cannot discern from
the documentation if this is possible.
given a simple example:
create table x (x_id integer);
create table y (y_id integer, y_value varchar);
insert into x values (1);
insert into x values (2);
insert into y values (1, 'Hell
5 matches
Mail list logo