Autor Zpráva
kOsTEj
Profil
Ahoj,

nedavno jsem psal o radu s timto problemem.
Odkaz

Reseni od Kcka bylo v poradku:


(SELECT count(id) as s4ok FROM 2007_8 WHERE s4stav='1')
UNION ALL
(SELECT count(id) as s4nok FROM 2007_8 WHERE s4stav='2')
UNION ALL
(SELECT count(id) as s5ok FROM 2007_8 WHERE s5stav='1')
UNION ALL
(SELECT count(id) as s5nok FROM 2007_8 WHERE s5stav='2')


Ale ted bych potreboval rozsirit o hledani v dalsi tabulce. Chci se zeptat, jestli to zvladnu v soucasnem navrzeni tabulky pomoci klicoveho slova, nebo to budu muset zjistovat na 2x pro ruzne tabulky.

Takto to nelze udelat:(


((SELECT count(id) as s4ok FROM 2007_8 WHERE s4stav='1') UNION (SELECT count(id) as s4ok FROM 2007_9 WHERE s4stav='1'))
UNION
((SELECT count(id) as s4nok FROM 2007_8 WHERE s4stav='2') UNION (SELECT count(id) as s4nok FROM 2007_9 WHERE s4stav='2'))
UNION
((SELECT count(id) as s5ok FROM 2007_8 WHERE s5stav='1') UNION (SELECT count(id) as s5ok FROM 2007_9 WHERE s5stav='1'))
UNION
((SELECT count(id) as s5nok FROM 2007_8 WHERE s5stav='2') UNION (SELECT count(id) as s5nok FROM 2007_9 WHERE s5stav='2'))

Vaše odpověď


Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm: