title: Got an ORA-01788 error without using level or start with
body: <p>I have just started to learn PL/SQL. Following a post in stackoverflow, I have written a script to search a certain value in Oracle as below:</p>
  
  <pre><code>DECLARE
    match_count INTEGER;
    v_owner VARCHAR2(255);
    v_search_value NUMBER;
  BEGIN
    v_owner:='USERA USERB';
    v_search_value:=4823.0;
    EXECUTE IMMEDIATE
    'INSERT INTO TMP SELECT owner, table_name, column_name FROM all_tab_cols WHERE instr(:1, owner)&gt;0 AND data_type like ''%NUMBER%''' USING v_owner;
    commit;
    FOR t IN (SELECT owner, table_name, column_name FROM TMP) LOOP
      EXECUTE IMMEDIATE 
      'SELECT COUNT(*) FROM '||t.owner||'.'||t.table_name||' WHERE '||t.column_name||'= :1'
      INTO match_count
      USING v_search_value;
      IF match_count &gt; 0 THEN
        EXECUTE IMMEDIATE
        'INSERT INTO RESULT VALUES(:1, :2, :3, :4)'
        USING t.owner, t.table_name, t.column_name, match_count;
        commit;
      END IF;
    END LOOP;
  END;
  </code></pre>
  
  <p>The table TMP and RESULT have been properly created before executing the script. However, when I run the script, I get an ORA-01788 error saying that "connect by clause required" on line 12. I wonder why the code cause this error and how to change the script to be executed properly. Thanks!</p>