Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个输出文本文件,其中包含数百万个电子邮件地址。我需要一个 sql 函数来将每个电子邮件地址作为输入并对其进行格式化以向它们添加'和',字符。举个例子:
'
',
输入是:
joe.bloggs@test.com dan.bloggs@test.com
预期输出:
'joe.bloggs@test.com', 'dan.bloggs@test.com',
select ''''+replace('joe.bloggs@test.com dan.bloggs@test.com', ' ', ''', ''')+''''
因此,要在我的登录名下回答我的一位初级开发人员 - 一个快速解决方案:
从 [表]中选择 distinct(',''' + 电子邮件 + '''')