Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2008.04.27;
Скачать: CL | DM;

Вниз

Как связать 2 запроса   Найти похожие ветки 

 
031178   (2008-04-03 14:01) [0]

Подскажите мастера, можно как нибудь связать вот эти 2 запроса в один !!

Select * from Kontakt where exists (select null from NS where (NS._ID = Kontakt._Num)and(NS._Name="111"))

Select * from Kontakt where exists (select null from Interes where (Interes._ID = Kontakt._Num)and(Interes._Pozic="222"))


 
Johnmen ©   (2008-04-03 14:02) [1]


>  можно как нибудь связать

Тебе правильно надо связать или как-нибудь?


 
Armond ©   (2008-04-03 14:03) [2]

да честно сказать, просто чтобы работал !!!


 
031178   (2008-04-03 14:04) [3]

Лучше конечно правильно !!! А может как то по другому можно условие задать ?


 
Johnmen ©   (2008-04-03 14:06) [4]


> Лучше конечно правильно !!!

Что значит "правильная связка"? Это как?

А может как то по другому можно условие задать ?

Ага. Вопрос надо по-другому задавать.


 
031178   (2008-04-03 14:09) [5]

Johnmen , можешь подсказать ? Или лучше дискуссировать будем ?


 
Плохиш ©   (2008-04-03 14:12) [6]


> Или лучше дискуссировать будем ?

Лучше ветку закрыть, т.к. помочь кому-то не знающему, что оно хочет получить, не представляется возможным.


 
clickmaker ©   (2008-04-03 14:14) [7]

where <cond1> or <cond2>
еще есть join


 
Игорь Шевченко ©   (2008-04-03 14:15) [8]

Обоим надо связать ? Или кому-то одному ?


 
031178   (2008-04-03 14:15) [9]

Я вроде нормально спросил, может кто нибудь помочь связать 2 запроса в один ?

Select * from Kontakt where exists (select null from NS where (NS._ID = Kontakt._Num)and(NS._Name="111"))

Select * from Kontakt where exists (select null from Interes where (Interes._ID = Kontakt._Num)and(Interes._Pozic="222"))


 
Игорь Шевченко ©   (2008-04-03 14:16) [10]


> Select * from Kontakt where exists (select null from NS
> where (NS._ID = Kontakt._Num)and(NS._Name="111"))
>
> Select * from Kontakt where exists (select null from Interes
> where (Interes._ID = Kontakt._Num)and(Interes._Pozic="222"))


Select * from Kontakt where exists (select null from NS
 where (NS._ID = Kontakt._Num)and(NS._Name="111"))
or exists (select null from Interes
 where (Interes._ID = Kontakt._Num)and(Interes._Pozic="222"))

?


 
Johnmen ©   (2008-04-03 14:16) [11]

Последняя попытка:
ЧТО ЗНАЧИТ "СВЯЗАТЬ"?


 
031178   (2008-04-03 14:18) [12]

Игорь Шевченко, спасибо !!!


 
Sergey13 ©   (2008-04-03 14:19) [13]

> [9] 031178   (03.04.08 14:15)
> Select * from Kontakt where exists (select null from NS
> where (NS._ID = Kontakt._Num)and(NS._Name="111"))
>
> Select * from Kontakt where exists (select null from Interes
> where (Interes._ID = Kontakt._Num)and(Interes._Pozic="222")
> )

Select * from Kontakt where exists (select null from NS where (NS._ID = Kontakt._Num)and(NS._Name="111"))
UNION
Select * from Kontakt where exists (select null from Interes where (Interes._ID = Kontakt._Num)and(Interes._Pozic="222"))

Или попробовать
Select * from Kontakt where (exists (select null from NS where (NS._ID = Kontakt._Num)and(NS._Name="111")))
                        or (exists (select null from Interes where (Interes._ID = Kontakt._Num)and(Interes._Pozic="222")))


 
clickmaker ©   (2008-04-03 14:48) [14]

вот кто ВКонтактеРу пишет ))



Страницы: 1 вся ветка

Текущий архив: 2008.04.27;
Скачать: CL | DM;

Наверх




Память: 0.49 MB
Время: 0.021 c
15-1205321613
oxffff
2008-03-12 14:33
2008.04.27
Chrome от Remobject. Есть обладатели?


15-1205675818
Loginov Dmitry
2008-03-16 16:56
2008.04.27
Очередное обновление Matrix32


15-1205497981
Правильный_Вася
2008-03-14 15:33
2008.04.27
бывают ли блондины среди негроидов и монголоидов?


9-1169568586
FireMan_Alexey
2007-01-23 19:09
2008.04.27
Kak sdlatb dvigenie vdolb steni (ploskosti)!


15-1202637891
md10
2008-02-10 13:04
2008.04.27
140 v - что делать?