Powered By Blogger

মঙ্গলবার, ১৭ জানুয়ারি, ২০১৭

Aggregate data from a number of rows into a single row by Function WM_CONCAT

The Oracle PL/SQL WM_CONCAT function is used to aggregate data from a number of rows into a single row, giving a list of data associated with a specific value. In effect, it cross-tabulates a comma delimited list.

 select uc.table_name, uc.constraint_name, wm_concat(column_name) column_name
 FROM user_cons_columns ucc, user_constraints uc
   WHERE uc.constraint_name = ucc.constraint_name
     AND uc.constraint_type IN ('P', 'U')
     group by uc.table_name, uc.constraint_name
ORDER BY 1, 2;

কোন মন্তব্য নেই:

একটি মন্তব্য পোস্ট করুন

Row-level “Add” icon using a virtual column (APEX-safe)

1️⃣ Enable Insert in the Interactive Grid IG → Attributes Edit → Allowed Add Row → Yes 2️⃣ Add a New Column (Icon column) Column...