Hot answers tagged

3

You can simply do it in PL/SQL in a loop: begin for c in (select distinct profile from dba_profiles) loop execute immediate 'alter profile ' || c.profile || ' limit password_life_time unlimited'; end loop; end; /


1

DECLARE v_query varchar2(1024) := ''; BEGIN FOR x IN (SELECT DISTINCT PROFILE FROM dba_profiles) loop v_query := 'alter profile ' || x.PROFILE || ' limit password_life_time unlimited'; execute immediate v_query; end loop; END; /


1

I don't really understand why you're trying to pivot anything, so maybe I'm missing your point. But try this: select id, name , regexp_replace(metadata, '.*"a":"([^"]+)".*', '\1') m_a , regexp_replace(metadata, '.*"b":"([^"]+)".*', '\1') m_b from foo; Doesn't rely on the order of the JSON attributes to always be the same. It's not completely safe - ...



Only top voted, non community-wiki answers of a minimum length are eligible