摘要: oralce写法: select WM_CONCAT(A.title) as citys from tmpcity A sql server写法: select stuff((select ','+A.title from tmpCity A FOR xml PATH('')), 1, 1, '') 阅读全文
posted @ 2020-12-11 00:43 QAQhong 阅读(317) 评论(0) 推荐(0) 编辑
摘要: Replace函数,Replace(str1,str2,str3) 在字符串str1中,当str2出现,则用str3替代 而要实现SQL数值转固定长度的字符串,且不足长度左补0 如1转为00001,则可以如下: Select Replace(str(1,5),' ',0) 将数值转换为固定长度的字符 阅读全文
posted @ 2020-12-11 00:28 QAQhong 阅读(1624) 评论(0) 推荐(0) 编辑