Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

query help.........

Status
Not open for further replies.

21128

Programmer
Aug 27, 2009
36
US
I created this query to get the entry of previous days, last time they entered. i dont know why but it gives me blank. can anyone please help?

select max(decode(sta,2,rd,null)) "MW_Previous",
max(decode(sta,5,rd,null)) "MV_Previous",
max(decode(sta,8,rd,null)) "P2300-3 Previous",
max(decode(sta,11,rd,null)) "P2300-4 Previous"
from history where tour=18 and shift_no=(select max(shift_no) from history where tour=18 and rev_no=1 and dt=( select dt from history where rownum=1 and 'MW_Previous'!='' or 'MV_Previous' != '' or 'P2300-3 Previous' != '' or 'P2300-4 Previous' !='' AND dt<{?SelectDate} and rownum=1 ))
 
Break up the various tests into separate formula fields, 'boolians' that will return 'true' or 'false'. Display them next to the data, shown without selection. That should isolate the bit that is not working.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 10 & 11.5 with Windows XP [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top