I am trying to use the find function using three char expressions and one date expression. I am using PB 6.5 with Oracle as the database. The following is my command string:
ll_RuleRow = dw_rule_modifiers.Find("modifier_code = '" + ls_modifier +"'"+ & "AND state_abbr = '" + ls_state +"'"+ & " AND coverage_type = '" + ls_cov +"'"+ & " AND String(effective_date) = " + & " String(To_Date( '" + ls_Effective_Date + "', 'MM/DD/YYYY HH24:MI:SS'))", +& 1, dw_rule_modifiers.RowCount())
I am having trouble getting the effective_date to work with the function. If I take the lines for the effective_date out, the function works. However, I need the effective_date to be in the function.
The problem you are having is that you are using an Oracle function in your Powerscript. You need to use only PowerScript functions in the find command. Replace the Data portion of the code like:
" AND String( effective_date, 'YYYY/MM/DD' ) = '" + String( ld_Effective_date, 'YYYY/MM/DD' ) + "'"
This should now work.