07.04.2011, 09:44 | #1 |
Участник
|
условие с датой в Query
Добрый день,помогите начинающему,
хочу поставить условие в Query на примере sql-а X++: select sum(FlxNumPassengersArrival) from flxPortJournal_1 group by flxPortJournal_1.ShipsName where flxPortJournal_1.ArrivalDate >= Fromdate and flxPortJournal_1.ArrivalDate <= Todate union select sum(FlxNumPassengersDeparture) from flxPortJournal_1 group by flxPortJournal_1.ShipsName where flxPortJournal_1.DepartureDate >= Fromdate and flxPortJournal_1.DepartureDate <= Todate X++: qbds.addSelectionField(fieldNum(FlxPortJournal,FlxNumPassengersTotalArrival),SelectionField::Sum); qbds.addSelectionField(fieldNum(FlxPortJournal,FlxNumPassengersTotalDeparture),SelectionField::Sum); X++: sysQuery::findOrCreateRange(qbds, fieldnum(FlxPortJournal,ArrivalDate)) .value(strfmt("%2")); |
|