In query mode, when user enters null in a date field, I want to change the DW select from date = 'null' to date is null. The former give a db errror. I've tried modify('DataWindow.Table.Select=..., but before the actual retrieval, date = 'null' is still in the select.
Any help is appreciated.
string ls_select
int li_pos, li_return
// Modify Select when user enters null in process date
ls_select = sqlsyntax
li_pos = pos(ls_select,"(((mic_dt_process = 'null')))")
if li_pos > 0 then
ls_select = replace(ls_select, li_pos, 29, "mic_dt_process is null")
li_return = this.SetSQLPreview(ls_select)
end if
return 0
li_pos = pos(ls_select,"mic_dt_process = 'null'")
if li_pos > 0 then
ls_select = replace(ls_select, li_pos, 23, "mic_dt_process is null")
li_return = this.SetSQLPreview(ls_select)
end if