You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

SQL Server报错:字符串转uniqueidentifier失败,语义搜索属性列表配置求助

Fixing the "Conversion failed when converting from a character string to uniqueidentifier" Error in SQL Server Search Property List Setup

Hey there! Let's get that semantic search setup working smoothly for you. The error you're hitting comes down to an invalid GUID format in your PROPERTY_SET_GUID value—SQL Server is strict about uniqueidentifier strings following the standard 8-4-4-4-12 hex character structure, and your current string is missing a critical segment.

What's Off in Your Original Code?

The GUID you used ('F29F85E0-1068-AB91-08002B27B309') is missing the 4FF9 segment that's required for the System.Title property's property set. This missing part breaks the uniqueidentifier format, triggering the conversion error.

Corrected Working Code

Swap out your existing ALTER statement with this valid version:

ALTER SEARCH PROPERTY LIST DocumentPropertiesTest 
ADD 'Title' 
WITH (
    PROPERTY_SET_GUID = 'F29F85E0-4FF9-1068-AB91-08002B27B3D9', 
    PROPERTY_INT_ID = 2, 
    PROPERTY_DESCRIPTION = 'System.Title = Title of the item' 
); 
GO

Quick Tip for Future GUID Checks

If you ever run into similar issues, you can verify a GUID's validity with this simple test query:

SELECT CAST('F29F85E0-4FF9-1068-AB91-08002B27B3D9' AS UNIQUEIDENTIFIER)

If it returns a value without errors, you know the GUID is formatted correctly for SQL Server.

内容的提问来源于stack exchange,提问作者user7245782

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.20 11:14:41