ltannous
31st January 2005, 19:00
I have an exchange script that is getting data from a few tables.
The problem is if a field in the record is empty, and the prior record contains a value, that value is carried forward into the record where no data is to be found.
How do I clear the values?
I tried to set the field to 0 to start, but no luck (wtqms002.dfcd = 0)

This is my condition script
table twtqms003
extern domain tcdsca defect


Select *
from wtqms002, wtqms003
where wtqms002.idno = :wtqms002.idno
and wtqms003.dfcd = :wtqms002.dfcd
selectdo
defect = wtqms003.dfds
selectempty
endselect


return(defect)

mark_h
31st January 2005, 19:13
Have you tried something like this?

Select *
from wtqms002, wtqms003
where wtqms002.idno = :wtqms002.idno
and wtqms003.dfcd = :wtqms002.dfcd
selectdo
return(wtqms003.dfds)
selectempty
return(0)
endselect
return(0)


Actually I think at the start of the script you could set defect to 0.

Mark

ltannous
31st January 2005, 21:20
That worked...Thanks for your quick response