vamsi_gujjula
12th August 2014, 22:57
My requirement is to fetch records from table form both archiving company and live company and write it to a file.
But i have encountered strange problem , if i execute the extraction session straight away after log on ... its extraction the data but after that session does not extract the data at all ... ( after log on i am trying to execute the session 2nd or 3rd time)
i have debugged it ... and found that that the query is not fetching the data set
can anyone let me know what might be the issue ?
select tfacp200.*
from tfacp200
where tfacp200._index4 = {:year.f}
and (tfacp200.prod >= :prod.f and
tfacp200.prod <= :prod.t)
and tfacp200._compnr = :live.comp
UNION
select tfacp200.*
from tfacp200
where tfacp200._index4 = {:year.f}
and (tfacp200.prod >= :prod.f and
tfacp200.prod <= :prod.t)
and tfacp200._compnr = :arch.comp
selectdo
I know i can go with individual company .... but if UNION works out that would be gr8
But i have encountered strange problem , if i execute the extraction session straight away after log on ... its extraction the data but after that session does not extract the data at all ... ( after log on i am trying to execute the session 2nd or 3rd time)
i have debugged it ... and found that that the query is not fetching the data set
can anyone let me know what might be the issue ?
select tfacp200.*
from tfacp200
where tfacp200._index4 = {:year.f}
and (tfacp200.prod >= :prod.f and
tfacp200.prod <= :prod.t)
and tfacp200._compnr = :live.comp
UNION
select tfacp200.*
from tfacp200
where tfacp200._index4 = {:year.f}
and (tfacp200.prod >= :prod.f and
tfacp200.prod <= :prod.t)
and tfacp200._compnr = :arch.comp
selectdo
I know i can go with individual company .... but if UNION works out that would be gr8