Re: [sqlite] invalid subselect is not detected ?

2007-07-23 Thread Ken
Joe,
 
 Indeed you are correct its a correlated subquery! 
 
 Thanks again.
 
 Ken
 

Joe Wilson <[EMAIL PROTECTED]> wrote: --- Ken  wrote:
> Is this an error or by design?
>  create table ss( ssid, ss_value);
>  create table s(id, s_value);
...
>  select id from s where id in ( select id from ss);

(In the 5 hour lag it takes to post to the list, this has
probably already been answered 5 times, but what the heck...)

You've written a correlated subquery:

  select id from s where id in (select s.id from ss);

>  
>  returns 
>  1
>  2
>  3
>  
>  Shouldn't the subselect fail since the id is not in the SS table ?
>  
>  select s.id from s where s.id in ( select ss.id from ss );
>  returns:  SQL error: no such column: ss.id




  

Shape Yahoo! in your own image. Join our Network Research Panel today! 
http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 



-
To unsubscribe, send email to [EMAIL PROTECTED]
-




Re: [sqlite] invalid subselect is not detected ?

2007-07-21 Thread Andrew Finkenstadt

On 7/21/07, Joe Wilson <[EMAIL PROTECTED]> wrote:


--- [EMAIL PROTECTED] wrote:
> Joe Wilson <[EMAIL PROTECTED]> wrote:
> >
> > (In the 5 hour lag it takes to post to the list, this has
> > probably already been answered 5 times, but what the heck...)
> >
>
> I'd love for you to work on the slow email problem for me, Joe.
> Call me at my office for the root password.  :-)

If you post the root password on the net, more people will be able
to debug the problem leading to a quicker resolution.



Heehee... if you post the root password I guarantee I'll log in quickly,
change it again, and then phone you with the new one. :)  And then fix the
mail issue.

--a


Re: [sqlite] invalid subselect is not detected ?

2007-07-21 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote:
> Joe Wilson <[EMAIL PROTECTED]> wrote:
> > 
> > (In the 5 hour lag it takes to post to the list, this has
> > probably already been answered 5 times, but what the heck...)
> > 
> 
> I'd love for you to work on the slow email problem for me, Joe.
> Call me at my office for the root password.  :-)

If you post the root password on the net, more people will be able
to debug the problem leading to a quicker resolution.

Actually, this latest email was echoed within 15 minutes.
The Internet has miraculous self-healing properties, it seems.


   

Pinpoint customers who are looking for what you sell. 
http://searchmarketing.yahoo.com/

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] invalid subselect is not detected ?

2007-07-20 Thread drh
Joe Wilson <[EMAIL PROTECTED]> wrote:
> 
> (In the 5 hour lag it takes to post to the list, this has
> probably already been answered 5 times, but what the heck...)
> 

I'd love for you to work on the slow email problem for me, Joe.
Call me at my office for the root password.  :-)

--
D. Richard Hipp <[EMAIL PROTECTED]>


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] invalid subselect is not detected ?

2007-07-20 Thread Joe Wilson
--- Ken <[EMAIL PROTECTED]> wrote:
> Is this an error or by design?
>  create table ss( ssid, ss_value);
>  create table s(id, s_value);
...
>  select id from s where id in ( select id from ss);

(In the 5 hour lag it takes to post to the list, this has
probably already been answered 5 times, but what the heck...)

You've written a correlated subquery:

  select id from s where id in (select s.id from ss);

>  
>  returns 
>  1
>  2
>  3
>  
>  Shouldn't the subselect fail since the id is not in the SS table ?
>  
>  select s.id from s where s.id in ( select ss.id from ss );
>  returns:  SQL error: no such column: ss.id




  

Shape Yahoo! in your own image.  Join our Network Research Panel today!   
http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] invalid subselect is not detected ?

2007-07-20 Thread Andrew Finkenstadt

On 7/20/07, Ken <[EMAIL PROTECTED]> wrote:


Is this an error or by design?
create table ss( ssid, ss_value);
create table s(id, s_value);

insert into ss values (1,1234);
insert into ss values (2,1234);

insert into s values (1, 567);
insert into s values (2, 567);
insert into s values (3, 567);

select id from s where id in ( select id from ss);

returns
1
2
3

Shouldn't the subselect fail since the id is not in the SS table ?

select s.id from s where s.id in ( select ss.id from ss );
returns:  SQL error: no such column: ss.id


Thanks,
Ken



I believe that sqlite3 has a hidden column alias for the rowid named id,
unless another column is explicitly named 'id'.

--andy