通过 Management Studio 2005 粘贴到 SQL Server 表并保留行结尾

发布于 2024-08-12 05:56:15 字数 154 浏览 2 评论 0原文

我无法让它发挥作用。我在 SQL Server Management Studio 2005 中打开了一个 SQL Server Express 表。当我尝试将多行文本片段粘贴到 NTEXT 字段中时,它会被截断为仅包含第一行。

在 Access 中这些事情有效,我应该做什么?

I cannot get this to work. I have opened a SQL Server Express table in SQL Server Management Studio 2005. When I try to paste a multiline text snippet into an NTEXT field it gets truncated to only include the first line.

In Access these kind of things works, what should i do?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

懷念過去 2024-08-19 05:56:15

将其重写为 UPDATE 或 INSERT INTO 语句。字符串文字可以跨越多行:

declare @t table (d varchar(10))
insert into @t values ('a
b
c')

Rewrite it as an UPDATE or INSERT INTO statement. String literals can span multiple lines:

declare @t table (d varchar(10))
insert into @t values ('a
b
c')
帥小哥 2024-08-19 05:56:15

我们也遇到过同样的问题。

您可以使用和插入语句

INSERT INTO TABLE (Col1,..., Coln)
SELECT  Val1,...,
'MULTILINE
VALUE',...,Valn

或使用 Access 与链接表来插入多行值。

We have had the same issue.

You can either use and insert statement

INSERT INTO TABLE (Col1,..., Coln)
SELECT  Val1,...,
'MULTILINE
VALUE',...,Valn

Or use Access with linked tables to insert the values with multi lines.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文