on 3/27/02 0:47, Robert Brenstein at rjb .AT. rz .DOT uni-potsdam.de wrote:
> SELECT pEmployeeId, pEmployeeLastname, pEmployeeFirstname, > pEmployeeIsResearchLeaderFlag, pEmployeeFormerLastName, xPositionBeginDate > FROM info_people, xdata_functions > WHERE pEmployeeWebHideFlag = 0 > and xPositionBeginDate < [runDate] > and xPositionEndDate > [runDate] > and pEmployeeId = xPositionEmployeeRef > ORDER by pEmployeeLastname, pEmployeeFirstname, xPositionBeginDate > > The [runDate] is replaced by the actual execution date. > > For whatever reason, this picks up entries where > xFunctionBeginDate > [runDate] !?
Also I recommend follow the next rule of building of query:
At first you need specify in WHERE the link conditions
WHERE (tl1.ID = tbl2.Ptr AND ...) AND (fld > x and/or fld2 = 55 ....)
And later specify search conditions.
---- Robert,
Try just WHERE xPositionBeginDate < [runDate]
Does this return correct records? If yes, then most probably you have NOT GROUPED fields of table.
-- Best regards, Ruslan Zasukhin
------------------------- Paradigma.
e-mail: ruslan@paradigmasoft.com web : http://www.paradigmasoft.com
To subscribe to the Valentina mail list send a letter to valentina-on .AT. lists .DOT macserve.net ©2002 Ruslan Zasukhin |