Reply to Please Help me!!!

Your name:

Reply:


Posted by David Mιndez on 04/03/07 05:06

I got the following definition tables:

CREATE TABLE VENTAS (
CLIREAL INT NOT NULL,
MATREAL CHAR(10) NOT NULL,
QTY SMALLINT NOT NULL DEFAULT 0,
AMOUNT DECIMAL(9,2) NOT NULL DEFAULT '0.00',
MES SMALLINT NOT NULL,
CLIENTE INT NOT NULL DEFAULT 0,
MATERIAL INT NOT NULL DEFAULT 0
)

CREATE TABLE CLIENTCONV (
CODE INT PRIMARY KEY,
CONV INT NOT NULL DEFAULT 0
)

CREATE TABLE CLIENTES (
CODE INT PRIMARY KEY,
NAME VARCHAR(40) NOT NULL,
VENDEDOR TINYINT NOT NULL DEFAULT 0,
USUARIO INT DEFAULT 0xFFFFFFFF
)

I need to find the members that exists on the following select queries (not
union):

SELECT DISTINCT CLIREAL FROM VENTAS WHERE CLIREAL NOT IN (SELECT CODE FROM
CLIENTES)
SELECT DISTINCT CLIREAL FROM VENTAS WHERE CLIREAL NOT IN (SELECT CODE FROM
CLIENTCONV)

Basically I need to choose the rows VENTAS.CLIREAL that do not exists in
CLIENTES.CODE rows and that also do not exists in the CLIENTCONV.CODE rows.

thank's.

David Mιndez.

[Back to original message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация