提前致谢。
编辑以保持更具体:
例:
Select guia, convenio, nome, trim (matricula) from table where guia = '142'
Group by guia, convenio, nome, trim (matricula)
结果
142 | 1 | Name of patient | 111222
142 | 1 | Name of patient | 111222
但是,如果我删除了注册字段,这是一个带有标签的varchar(40):
Select guia, convenio, nome, matricula from table where guia = '142'
Group by guia, convenio, nome
结果是:
142 | 1 | nome do paciente
当我发现问题是注册时:
借助此功能:Char_Length(matricula)
Select guia, convenio, nome, matricula, Char_Length (matricula) from table where guia = '142'
Group by guia, convenio, nome, matricula
结果:
142 | 1 | nome do paciente | 111222 | 6
142 | 1 | nome do paciente | 111222 | 10
答案 0 :(得分:1)