rwhisenant
13th May 2014, 17:33
Hi all,

I am writing a script using a table that has a customer defined field tdsls401.cdf_rqdt in the where clause. It is at this point my query is not retrieving any records. If I comment it out it works, but I need to be able to select on that field if possible. Here is my code:

select
tdsls401.orno,
tdsls401.pono,
tdsls401.sqnb,
tdsls401.item,
tcibd001.dsca,
tdsls401.txta,
tdsls401.qoor,
tdsls401.cdf_rqdt, tdsls401.ddta,
tdsls401.prdt,
tdsls401.ofbp,
tdsls401.citt,
tdsls401.corn,
tccom100.nama

from tdsls401,
tcibd001,
tccom100

where
tdsls401.orno >= :so.f and
tdsls401.orno <= :so.t and
tdsls401.ofbp >= :sld.bp.f and
tdsls401.ofbp <= :sld.bp.t and
tdsls401.ddta >= :deldat.f and
tdsls401.ddta <= :deldat.t and
tdsls401.prdt >= :recdat.f and
tdsls401.prdt <= :recdat.t and
tdsls401.cdf_rqdt >= :reqdat.f and
tdsls401.cdf_rqdt <= :reqdat.t and
tdsls401.corn >= :cust.po.f and
tdsls401.corn <= :cust.po.t and
tdsls401.item >= :item.f and
tdsls401.item <= :item.t and
tdsls401.oltp = tdsls.oltp.detail and
tdsls401.item = tcibd001.item and
tdsls401.ofbp = tccom100.bpid

order by tdsls401.orno,
tdsls401.ofbp

I have tried tdsls401.cdf_rqdt :cust.reqdat and using that in the where clause but I get an incompatible types error there on the compile.

Any help/suggestions would be appreciated

Thanks,

R

ulrich.fuchs
13th May 2014, 19:34
Using CDFs in Queries is simply not supported. Up to now, CDFs are implemented so crappy that they are basically useless. There are rumors that it's getting better with 10.4., but even then, from my point of view I would never recommend to use them. If you have development licensed, add the fields in maintain tables defintions and get full integration. In terms of software maintainance, adding fields to tables is the CHEAPEST of all possible customizations/developments you can do.

(If you do not have development licensed, purchase it; from my point of view it's a must-have in any LN environment).

rwhisenant
13th May 2014, 19:58
Ok, great. Thanks for the information. After posting my issue, I found that it was a data issue as for comparison purposes, wouldn't find the particular record for that cdf_rqdat.

JaapJD
13th May 2014, 22:01
The 10.3 porting set (8.9a) does support usage of CDF in 3GL and 4GL programs.