Neal Matthews
21st June 2003, 15:45
Hello,

I've ran into a problem in a script where I want to check for the transaction time in table tdinv700 to avoid duplicate records (just in case)

The compiler accepts date.num() for the date but doesn't like time.num().

See code below

select tdinv700.item,tdinv700.cntr,tdinv700.cwar,tdinv700.trdt,tdinv700.trtm,tdinv700.sern
from tdinv700 where tdinv700._index1 = {:m_item,"","W01",date.num(),time.num(),0}
selectdo
selectempty

How do I need to refer to the time in this statement ?

Thanks
Neal Matthews
Intier Automotive - IT Support Analyst

zacharyg
21st June 2003, 23:27
Hello Neal,

I would recommend you assign time.num() value to another variable and use it in the where clause

or

the use of embedded sql. In this case the where clause would resemble the following:

where tdinv700._index1 = {:m_item,"","W01",date.num(),:1,0}
wherebind(1,time.num())
selectdo

Best Regards

Neal Matthews
23rd June 2003, 10:16
Used seperate variable.

Seems to behave ok.

Thanks
Neal Matthews
Intier Automotive - IT Support Analyst