On 10/28/08, jose isaias cabrera <[EMAIL PROTECTED]> wrote:
>
>  thanks, BareFeet.  I will give this a try tomorrow.
>
>  Igor,
>
>  I tried to reply to your email, but somehow, I can not reply to newsgroup.
>  Weird.  But, the relationship is login.

If the relationship is X.login = Y.login where each is a primary key
in the respective table then you should really reconsider the
structure of your db... they really should be one table.


>
>   thanks,
>
>   josé
>
>
>
>  > ----- Original Message -----
>  > From: "BareFeet" <[EMAIL PROTECTED]>
>  > To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org>
>  > Sent: Tuesday, October 28, 2008 6:43 PM
>  > Subject: Re: [sqlite] Combined Select Statement
>  >
>  >
>  >> Hi José,
>  >>
>  >>> I have two tables:
>  >>>
>  >>> CREATE TABLE X
>  >>>                    (
>  >>>                        login primary key,
>  >>>                        Name,
>  >>>                        Password,
>  >>>                        ...,
>  >>>                        ProjOwned
>  >>>                    );
>  >>>
>  >>>
>  >>> CREATE TABLE Y
>  >>>                    (
>  >>>                        login primary key,
>  >>>                        Internal,
>  >>>                        ...,
>  >>>                        Place
>  >>>                    );
>  >>>
>  >>>
>  >>> What I would like to do is to create a select statement that will
>  >>> bring,
>  >>>
>  >>> X.Login,X.Name,Y.Internal
>  >>>
>  >>> as the result in one row.
>  >>
>  >> Assuming that the tables are related by the "Login" column/field, then
>  >> you to join then, such as:
>  >>
>  >> select X.Login, X.Name, Y.Internal from X left join Y on X.Login =
>  >> Y.Login
>  >>
>  >> Tom
>  >> BareFeet
>  >>
>  >> _______________________________________________
>  >> sqlite-users mailing list
>  >> sqlite-users@sqlite.org
>  >> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>  >>
>  >
>
>  _______________________________________________
>  sqlite-users mailing list
>  sqlite-users@sqlite.org
>  http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>


-- 
Puneet Kishor http://punkish.eidesis.org/
Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/
Open Source Geospatial Foundation (OSGeo) http://www.osgeo.org/
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to