DB2中的多行到单行

DB2中的多行到单行,db2,db2-400,db2-luw,Db2,Db2 400,Db2 Luw,我有如下数据 Ins_Ind Dns_IND Mns_IND Fns_IND 1 1 0 0 0 0 1 0 0 1 0 0 Expected Result: Ins_Ind Dns_IND Mns_IND Fns_IND 1 1 1 0 将多行转换为单行看起来您正在尝试查询每列的

我有如下数据

Ins_Ind   Dns_IND  Mns_IND  Fns_IND
  1          1       0        0
  0          0       1        0
  0          1       0        0   

Expected Result:
Ins_Ind   Dns_IND  Mns_IND  Fns_IND
  1          1       1        0

将多行转换为单行

看起来您正在尝试查询每列的最大值:

选择最大值(Ins\U Ind)、最大值(Dns\U Ind)、最大值(Mns\U Ind)、最大值(Fns\U Ind)
从mytable

看起来您正在尝试查询每列的最大值:

选择最大值(Ins\U Ind)、最大值(Dns\U Ind)、最大值(Mns\U Ind)、最大值(Fns\U Ind)
从mytable