文件名称:行转列sql_server
文件大小:2KB
文件格式:TXT
更新时间:2021-12-30 18:06:01
sql
sql server 用于行转列,省得各位去找语句,select to_char(wm_concat('''' || valuelabel || '''')) name from (select distinct t.valuelabel from structuredrecruit t) select * from (select t.uhid, t.form_name, valuelabel, max(valuedata) valuedata from structuredrecruit t group by t.uhid, t.form_name, valuelabel) pivot(max(valuedata) valuedata