tb1810
19th February 2004, 16:09
hallo zusamman,
seit ändern unseres portingsets auf port6.1c.06.01 funktionieren einige unserer dynamischen sql-statements nicht mehr. fehlermeldung:"degree mismatch in reference predicate(tdinv001)
query not correct on select...can not continue.... in folgendem sql-statement
function build.queries()
{
sql$ = "SELECT toitm100.*,"
& "tiitm001.item,tiitm001.dsca,tiitm001.dscb,tiitm001.dscc,tiitm001.dscd,"
& "tiitm001.seak,tiitm001.seab,tiitm001.cups,"
& "tdinv001.stoc,tdinv001.reop,tdinv001.allo,tdinv001.blck,tdinv001.ordr, tdinv001.maxs,"
& "tiitm001.cuni, tiitm001.citg, tiitm001.kitm, tiitm001.csig, tiitm001.ctyp,"
& "tcmcs015.dsca "
& "FROM toitm100,tiitm001,tdinv001,tcmcs015 "
& "WHERE toitm100._index2 inrange {:1} and {:2} "
if (sknr >= 2) then
sql$ = sql$ & " and EXISTS ( select itm100.*"
& " from toitm100 itm100"
& " where itm100._index1 inrange {toitm100.item,:3}"
& " and {toitm100.item,:4}"
& " ) "
endif
if (sknr >= 3) then
sql$ = sql$ & " and EXISTS ( select itm100a.*"
& " from toitm100 itm100a"
& " where itm100a._index1 inrange {toitm100.item,:5}"
& " and {toitm100.item,:6}"
& " ) "
endif
if (sknr >= 4) then
sql$ = sql$ & " and EXISTS ( select itm100b.*"
& " from toitm100 itm100b"
& " where itm100b._index1 inrange {toitm100.item,:7}"
& " and {toitm100.item,:8}"
& " ) "
endif
sql$ = sql$ & "AND toitm100.item refers to tiitm001 "
sql$ = sql$ & "AND tiitm001.ctyp refers to tcmcs015 unref clear "
if isspace(ucwar) then
sql$ = sql$ & "and {:9, toitm100.item} refers to tdinv001 unref clear "
else
sql$ = sql$ & "and {:9,toitm100.item} refers to tdinv001 unref skip "
endif
sql$ = sql$ & "ORDER BY toitm100._index2 "
sql = sql.parse(sql$)
sql.where.bind(sql, 1, sk1)
sql.where.bind(sql, 2, sk1t)
sql.where.bind(sql, 3, sk2)
sql.where.bind(sql, 4, sk2t)
sql.where.bind(sql, 5, sk3)
sql.where.bind(sql, 6, sk3t)
sql.where.bind(sql, 7, sk4)
sql.where.bind(sql, 8, sk4t)
sql.where.bind(sql, 9, ucwar)
sql.exec(sql)
}
hat das auch jemand gehabt? wie müßten wir unsere scripte anpassen.
danke tb1810
seit ändern unseres portingsets auf port6.1c.06.01 funktionieren einige unserer dynamischen sql-statements nicht mehr. fehlermeldung:"degree mismatch in reference predicate(tdinv001)
query not correct on select...can not continue.... in folgendem sql-statement
function build.queries()
{
sql$ = "SELECT toitm100.*,"
& "tiitm001.item,tiitm001.dsca,tiitm001.dscb,tiitm001.dscc,tiitm001.dscd,"
& "tiitm001.seak,tiitm001.seab,tiitm001.cups,"
& "tdinv001.stoc,tdinv001.reop,tdinv001.allo,tdinv001.blck,tdinv001.ordr, tdinv001.maxs,"
& "tiitm001.cuni, tiitm001.citg, tiitm001.kitm, tiitm001.csig, tiitm001.ctyp,"
& "tcmcs015.dsca "
& "FROM toitm100,tiitm001,tdinv001,tcmcs015 "
& "WHERE toitm100._index2 inrange {:1} and {:2} "
if (sknr >= 2) then
sql$ = sql$ & " and EXISTS ( select itm100.*"
& " from toitm100 itm100"
& " where itm100._index1 inrange {toitm100.item,:3}"
& " and {toitm100.item,:4}"
& " ) "
endif
if (sknr >= 3) then
sql$ = sql$ & " and EXISTS ( select itm100a.*"
& " from toitm100 itm100a"
& " where itm100a._index1 inrange {toitm100.item,:5}"
& " and {toitm100.item,:6}"
& " ) "
endif
if (sknr >= 4) then
sql$ = sql$ & " and EXISTS ( select itm100b.*"
& " from toitm100 itm100b"
& " where itm100b._index1 inrange {toitm100.item,:7}"
& " and {toitm100.item,:8}"
& " ) "
endif
sql$ = sql$ & "AND toitm100.item refers to tiitm001 "
sql$ = sql$ & "AND tiitm001.ctyp refers to tcmcs015 unref clear "
if isspace(ucwar) then
sql$ = sql$ & "and {:9, toitm100.item} refers to tdinv001 unref clear "
else
sql$ = sql$ & "and {:9,toitm100.item} refers to tdinv001 unref skip "
endif
sql$ = sql$ & "ORDER BY toitm100._index2 "
sql = sql.parse(sql$)
sql.where.bind(sql, 1, sk1)
sql.where.bind(sql, 2, sk1t)
sql.where.bind(sql, 3, sk2)
sql.where.bind(sql, 4, sk2t)
sql.where.bind(sql, 5, sk3)
sql.where.bind(sql, 6, sk3t)
sql.where.bind(sql, 7, sk4)
sql.where.bind(sql, 8, sk4t)
sql.where.bind(sql, 9, ucwar)
sql.exec(sql)
}
hat das auch jemand gehabt? wie müßten wir unsere scripte anpassen.
danke tb1810