Re: Inserting data of two other tables [Now deleting ...]

Поиск
Список
Период
Сортировка
От papapep
Тема Re: Inserting data of two other tables [Now deleting ...]
Дата
Msg-id 3ED4B11E.9000209@gmx.net
обсуждение исходный текст
Ответ на Re: Inserting data of two other tables [Now deleting ...]  (Nabil Sayegh <postgresql@e-trolley.de>)
Ответы Re: Inserting data of two other tables [Now deleting ...]  (Nabil Sayegh <postgresql@e-trolley.de>)
Список pgsql-novice
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I've made a try with this:

SELECT count(journey) from DETALLTRAJECTES where EXISTS (SELECT NULL
from CAPTRAJECTE,DETALLTRAJECTES where pkey=journey and fecha=20030423);

and it doesn't work properly (at least it doesn't do what I need...)

In my last mail (this is for Nabil) I made a mistake in what I told you.
The date to filter the rows to remove is in CAPTRAJECTES, and the rows
to remove are in DETALLTRAJECTES. CAPTRAJECTES has a field called "pkey"
and DETALLTRAJECTES another called "journey" that are the join between
the two tables.

When I execute the select above noted it returns me about 15.000 rows.
But if I make this one:

SELECT count(journey) from CAPTRAJECTES,DETALLTRAJECTES where
pkey=journey and fecha=20030423;

it only returns me about 5.000. So the first one has any error in the
conception.

Where do I make the mistake? (thanks you all for your patience.....)

Josep Sànchez
~ [papapep]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+1LEd2vx52x0kyz4RAqk0AKDOo3ZoYTYKC5Pcfgov90+CLydxCwCfVgXM
RF+NLu0hs6iyR+QKGkjCbzk=
=wOrJ
-----END PGP SIGNATURE-----




В списке pgsql-novice по дате отправления:

Предыдущее
От: Nabil Sayegh
Дата:
Сообщение: Re: nOOb Alert..Need some help..
Следующее
От: Nabil Sayegh
Дата:
Сообщение: Re: Inserting data of two other tables [Now deleting ...]