csphard
Posting Yak Master
113 Posts |
Posted - 2005-11-18 : 17:34:25
|
I am getting different results when it comes to getting data randomly.using asp I get similiar results.using enterprise manager it is randomThe statment is the following. Can anyone tell me if using order bynewid() works different in one environment vs the other.select l.lname,l.fname,l.empid,l.item,l.pay_location,l.sub, l.bureau,l.division,l.eval_type, l.begindate,l.enddate,l.bname,l.dname from ( select top 200 e.lname,e.fname,e.empid,e.item,e.pay_location,e.sub,e.bureau,e.division,d.eval_type, convert(varchar,d.fromdate,101) as begindate, convert(varchar,d.todate,101) as enddate, o.org_name as bname, n.org_name as dname from emp_information_test e,due_evals d,new_organization o,new_organization n WHERE e.item Not in (0845,1004,1060,2574,8008,8013,8014,8015,8016,8017,8019,8023,8645,9421) and e.deptno <> '999' and e.empid = d.empid and d.eval_type <> 'Probation'and e.bureau is not null and e.bureau = o.org_id and o.type = 'BUREAU' and e.division = n.org_id and n.type = 'DIVISION' and datepart(yyyy,d.datetobefiled ) = '2005'and e.empid LIKE '_[45]%' order by NEWID() ) L order by L.bureau,L.division,L.pay_location,L.empid |
|