|
#1
|
|||
|
|||
sql
Здравствуйте! помогите пожалуйста с запросом
s2:=' from persons, group1,podr where persons.group_L=group1.nrec and persons.podr_L=podr.nrec and persons.podr_L=69'; нужно добавить чтобы он выбирал еще persons.podr_L=138 и т.д....как это правильно написать синтаксически? |
#2
|
|||
|
|||
итд это много?
|
#3
|
|||
|
|||
еще 5-6...
|
#4
|
|||
|
|||
было
and persons.podr_L=69'; надо and (persons.podr_L=69 or persons.podr_L=123 or ... )'; |
#5
|
|||
|
|||
Спасибо огромное! прям спас меня)
|
#6
|
|||
|
|||
а если больше 5-6 и в одну строку не поместится?
|
#7
|
||||
|
||||
Код:
select * from persons, group1,podr where persons.group_L=group1.nrec and persons.podr_L=podr.nrec and persons.podr in (69,123,156,78,5,23,65) --дальше сколько угодно Код:
s2:= 'select * from persons, group1,podr '+ ' where persons.group_L=group1.nrec and persons.podr_L=podr.nrec'+ ' and persons.podr in (69,123,156,78,5,23,65)'; Google в помощь |