0
Insert into ocs_trn_tverticalscorecardgrouptitle(
    application_gid,
    vertical_gid, 
    grouptitle_gid,
    grouptitle_name,   
    created_by, 
    created_date
    )  
select 'SEGM2021061648',
       'SEGM2021061648', 
       grouptitle_gid, 
       grouptitle_name,  
       'SERM2011020103', 
       now()   
from ocs_mst_tverticalquestionrule   
where vertical_gid='SEGM2021061648'
group by grouptitle_gid  
order by CAST(group_order AS UNSIGNED ) asc, 
         CAST(question_order AS UNSIGNED ) asc 
;

Can anyone please tell, how to solve this issue?

Akina
  • 39,301
  • 5
  • 14
  • 25
  • Provide `CREATE TABLE` for both tables and `INSERT INTO ocs_mst_tverticalquestionrule` with sample data. – Akina Dec 01 '22 at 16:42

0 Answers0