Order By 保存 docx 文件的 varbinary 列

发布于 2024-08-04 11:48:30 字数 297 浏览 2 评论 0原文

我正在使用 MS SQL 2008 服务器,并且有一列存储 Word 文档“.docx”。

单词文档中有一个定义(即:术语)。我需要在返回数据集时对定义进行排序。

所以基本上...

SELECT * FROM DocumentsTable 按定义列 ASC 排序。

所以我的问题是如何实现这一点,二进制列仅对二进制值进行排序,而不对单词文档内容进行排序?

我想知道全文搜索/索引是否有效。我已经可以使用它了,只是不确定是否可以将它与 ORDER BY 一起使用。

-提前感谢大家。

I'm using MS SQL 2008 server, and I have a column that stores a word document ".docx".

Within the word document is a definition (ie: a term). I need to sort the definitions upon returning a dataset.

so basically...

SELECT * FROM DocumentsTable
Order By DefinitionsColumn ASC.

So my problem is how can this be accomplished, the binary comlumn only sorts on the binary value and not the word document content?

I was wondering if fulltext search/index would work. I already have that working, just not sure if I can use it with ORDER BY.

-Thanking all in advance.

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

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

发布评论

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

评论(2

吻风 2024-08-11 11:48:30

我认为您需要添加另一列,并使用 docx 中的术语填充此列。如果完全有可能让 SQL 读取 docx(也许可以使用自定义的 .net 函数?),那么速度将会非常慢。

最好填充并维护另一列。

I think you'd need to add another column, and populate this with the term from inside the docx. If it's possible at all to get SQL to read the docx (maybe with a custom .net function?) then it's going to be pretty slow.

Better to populate and maintain another column.

半枫 2024-08-11 11:48:30

您有几个可能可以接受也可能不可以接受的选择。

  1. 存储字符串定义内容
    旁边字段中的文件的
    中的二进制文件列
    record.

  2. 仅将字符串定义存储在记录中,并构建.docx
    文件在运行时在您的内部使用
    应用程序。

You have a couple options that may or may not be acceptable.

  1. store the string definition contents
    of the file in a field along side
    the binary file column in the
    record.

  2. Only store the string definition in the record, and build the .docx
    file at runtime for use within your
    application.

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