Hi,
I'm trying to formulate a dynamic sql string to search for values in a VARCHAR2 column if the column contains an empty string. In SQL*PLUS I can do the following:
SQL> SELECT COUNT(*) FROM PART WHERE PRODUCT_NAME LIKE ' ';

COUNT(*)
----------
1

But what's the right syntax for this dynamic SQL version...
I'm getting weird compile errors with the following:
v_sql_stmt := 'SELECT count(*)
FROM ' || p_table_name ||
' WHERE '|| p_col_name || ' LIKE '' '';
EXECUTE IMMEDIATE v_sql_stmt INTO v_cnt_empty;

Thanks,