从SQL Server数据库中的列有效地访问长文本(Efficiently access long text from a column in a SQL Server database)

编程入门 行业动态 更新时间:2024-10-22 09:26:01
从SQL Server数据库中的列有效地访问长文本(Efficiently access long text from a column in a SQL Server database)

新手问题:我在远程服务器上使用SQL Server,我无法使用任何类型的UDF。 我正在使用一个数据库,其中一列是一个文本列,每个条目包含几段文本。 当我测试我的代码时,我希望有一种方法可以一次有效地访问这些列。

目前,我能找到的唯一方法是使用例如:

SELECT TOP 25 ReportText FROM MyDb.Table1

...当然,它在Results窗口中给出输出,作为单个字符串,我必须继续拖动列宽更宽,更宽和更宽,以便尝试查看。

我错过了什么? 我不需要它看起来漂亮,我只需要能够有效地看到它....

Newbie question: I'm using SQL Server on a remote server where I cannot use UDFs of any type. I am using a database where one column is a text column containing several paragraphs of text per entry. As I test my code, I would like to have a way to efficiently access these columns a few at a time.

Currently, the only way I can find to do this is using eg:

SELECT TOP 25 ReportText FROM MyDb.Table1

...which, of course, gives the output in the Results window, as a single string of characters that I have to keep dragging the column width wider and wider and wider in order to try to see.

What am I missing? I don't need it to look pretty, I just need to be able to see it efficiently....

最满意答案

正如@JohnSpecko在评论中指出的那样,文本的结果正是我所需要的。 在运行查询之前通过按(ctrl + t)打开它。 谢谢!

As @JohnSpecko pointed out in a comment, results to text is exactly what I needed. It is turned on by hitting (ctrl+t) before running your query. Thanks!

更多推荐

本文发布于:2023-07-06 07:32:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1047354.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:有效地   数据库中   文本   SQL   Server

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!