SELECT
STUFF(
(
SELECT
',' + CONVERT ( VARCHAR ( 10 ), ichr_high_risk_item ) --, 合并后的分隔符 ichr_high_risk_item 需要合并的字段
FROM
initialcarehighrisk --Table Name
where woma_healthno='' --condition, if none will to merge all data
FOR xml path ( '' )
),
1,
1,
''
)
Read More:
- SQL Server Group sort de duplication row_ number() over ( PARTITION BY t1.col_ 2 ORDER BY 1 )
- MYSQL gruop by Error: this is incompatible with sql_mode=only_full_group_by
- [Solved] MYSQL 5.7 gruop by eRROR: this is incompatible with sql_mode=only_full_group_by
- SQL Server Deletes a table foreign key constraint Error [Solved]
- [Solved] MySQL Error: ERROR 1055 (42000)sql_mode=only_full_group_by
- Navicat connecting to SQL Server Error [How to Solve]
- Caused by: java.sql.SQLTransientConnectionException: HikariPool-1 – Connection is not available, request timed out after 30005ms.
- Lock request time out period exceeded. (Microsoft SQL Server, Error: 1222)
- [Solved] MYSQL Start Project Error: this is incompatible with sql_mode=only_full_group_by
- [Solved] Caused by: java.sql.SQLException: Access denied for user ‘root‘@‘hadoop102‘ (using password: YES)
- IDEA Database Tool connects to SQL Server 2008 Error [How to Solve]
- [Solved] java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corres
- Bulk Update Error: #Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the m
- Tkmybatis uses Example.SetOrderByClause Use for sorting and multiple sort fields
- Can mybatis prevent SQL injection
- ERROR 1075 (42000) Incorrect table definition; there can be only one auto column and it must be defi
- [Solved] MySQL Error: Client does not support authentication protocol requested by server
- [Linux Docker Mirror] MYSQL Run sql Script Error: Failed to open file ‘/home/mydatabase.sql‘, error: 2
- java.sql.SQLException: Disk full (/tmp/#sql_1eaa2_60.MAI); waiting for someone to free some space
- [Solved] SQL Error: Method queryTotal execution error of sql