ultimategc3
Programmer
Dear all,
I've tried to modify a datawindow sql with number array argument, it always return "Incorrect syntax near '('" . I've performed the next statement:
Long ll_cd2[]
String ls_sql, ls_ext
ls_sql = dw_1.describle('datawindow.table.select')
// this datawindows contains number array "slo_cd2[]" argument defined in the datawindow painter with syntax as follows:
// SELECT order_line.slo_cd2,
// order_line.slo_prc,
// order_line.slo_cur,
// FROM order_line,
// WHERE order_line.slo_cd2 in ( :slo_cd2 )
// dw_1.retrieve(ll_cd2)
// this statement works fine without modifying
ls_ext = ' and ' + ' order_line,slo_prc > ' + '"' + String(ddlb_1.text) + '"'
ls_sql = ls_sql + ls_ext
ls_sql = dw_1.modify('datawindow.table.select = "' + ls_sql + '"' )
dw_1.settransobject(sqlca)
dw_1.retrieve(ll_cd2)
// the new sql appears like:
// SELECT order_line.slo_cd2,
// order_line.slo_prc,
// order_line.slo_cur,
// FROM order_line,
// WHERE order_line.slo_cd2 in ( :slo_cd2 )
// AND order_line.slo_prc > 100
// returns incorrect syntax near '(' line 5
// how to modify a datawindow with array arguments
Thank you...
I've tried to modify a datawindow sql with number array argument, it always return "Incorrect syntax near '('" . I've performed the next statement:
Long ll_cd2[]
String ls_sql, ls_ext
ls_sql = dw_1.describle('datawindow.table.select')
// this datawindows contains number array "slo_cd2[]" argument defined in the datawindow painter with syntax as follows:
// SELECT order_line.slo_cd2,
// order_line.slo_prc,
// order_line.slo_cur,
// FROM order_line,
// WHERE order_line.slo_cd2 in ( :slo_cd2 )
// dw_1.retrieve(ll_cd2)
// this statement works fine without modifying
ls_ext = ' and ' + ' order_line,slo_prc > ' + '"' + String(ddlb_1.text) + '"'
ls_sql = ls_sql + ls_ext
ls_sql = dw_1.modify('datawindow.table.select = "' + ls_sql + '"' )
dw_1.settransobject(sqlca)
dw_1.retrieve(ll_cd2)
// the new sql appears like:
// SELECT order_line.slo_cd2,
// order_line.slo_prc,
// order_line.slo_cur,
// FROM order_line,
// WHERE order_line.slo_cd2 in ( :slo_cd2 )
// AND order_line.slo_prc > 100
// returns incorrect syntax near '(' line 5
// how to modify a datawindow with array arguments
Thank you...