Показать сообщение отдельно
Старый 14.08.2009, 15:26   #1  
kalex_a is offline
kalex_a
Участник
Аватар для kalex_a
Самостоятельные клиенты AX
MCBMSS
 
160 / 19 (1) ++
Регистрация: 26.11.2007
Адрес: Казахстан
? Проблема с запросом
Не подскажите как на Х++ написать такой запрос


Код:
 
select * from Ledgertrans as t2(nolock)
where voucher in 
(select voucher
from dbo.RASSETTRANS as t1(nolock) 
left join dbo.RASSETSTANDARDS as t2(nolock)
on t1.dataareaid=t2.dataareaid and t1.accountnum=t2.Assetid and t1.postingprofile=t2.postingprofile
where t1.AssetTransType in (5,6,7)
and t1.TransDate>='2009-01-01'
and t1.TransDate<'2009-02-01'
and t2.AssetGroup='группа'
)
and ACCOUNTNUM >'счет1'
and ACCOUNTNUM <'счет2'
Спасибо заранее.
__________________
Лучше сделать и жалеть, чем жалеть что не сделал