given this static query
def var vDelimiter as char initial ",".
find first foo no-lock where entry(2,foo.fld1,vDelimiter) eq "blah" no-error.
how can I translate into dynamic query?
e.g.
h_foo = buffer foo:handle.
h_foo:find-first(" where entry(2,foo.fld1,vDelimiter EQ 'blah' ",no-lock) no-error. /* this does not work */
/* update */
figured it out - this seems to work
h_ediDetail:FIND-FIRST(
"WHERE icControlNum EQ 7156158 AND txSeqNum EQ 1 " + "AND entry(2,segment," + QUOTER(vDelim) + ") EQ '834' ",NO-LOCK)
NO-ERROR.
h_foo:find-first(substitute("where entry(2, foo.fld1, &1) EQ &2“, quoter(vDelimiter), quoter(‘blah’)), no-lock) no-error.
Excellent. Thanks. Forgot about the substitute command...