Microsoft Dynamics CRM在SQL Server中存储OptionSet值的位置在哪里?

时间:2022-01-20 07:15:48

I'm doing a data migration in to Microsoft Dynamics CRM 2011 and need to perform reconciliations against the source to ensure that everything loaded successfully.

我正在进行数据迁移到Microsoft Dynamics CRM 2011,并且需要对源进行对帐以确保所有内容都成功加载。

To do this I am querying the SQL directly in SQL Server, but I can't seem to find where the OptionSet data is stored. Does anyone know what table(s) it's stored in?

为此,我直接在SQL Server中查询SQL,但我似乎无法找到OptionSet数据的存储位置。有谁知道它存储在哪个表中?

3 个解决方案

#1


24  

These are all stored in the StringMapBase table. You'll query via object type code of the entity, attribute name, option set value and language and that'll give you the display value of the attribute.

这些都存储在StringMapBase表中。您将通过实体的对象类型代码,属性名称,选项集值和语言进行查询,并为您提供属性的显示值。

#2


10  

Just a reminder! Use FilteredStringMap to continue to be 'supported' by Microsoft!

只是提醒!使用FilteredStringMap继续被Microsoft“支持”!

#3


6  

Here is an SQL Server function to query the stringmap

这是一个用于查询stringmap的SQL Server函数

CREATE FUNCTION fn_new_GetStringMapValue 
(
    @AttributeName nvarchar(100),
    @AttributeValue int
)
RETURNS nvarchar(4000)
AS
BEGIN
    DECLARE @Result nvarchar(4000)
    SELECT @Result = Value
    FROM dbo.FilteredStringMap
    WHERE AttributeName = @AttributeName AND AttributeValue = @AttributeValue

    RETURN @Result
END
GO

#1


24  

These are all stored in the StringMapBase table. You'll query via object type code of the entity, attribute name, option set value and language and that'll give you the display value of the attribute.

这些都存储在StringMapBase表中。您将通过实体的对象类型代码,属性名称,选项集值和语言进行查询,并为您提供属性的显示值。

#2


10  

Just a reminder! Use FilteredStringMap to continue to be 'supported' by Microsoft!

只是提醒!使用FilteredStringMap继续被Microsoft“支持”!

#3


6  

Here is an SQL Server function to query the stringmap

这是一个用于查询stringmap的SQL Server函数

CREATE FUNCTION fn_new_GetStringMapValue 
(
    @AttributeName nvarchar(100),
    @AttributeValue int
)
RETURNS nvarchar(4000)
AS
BEGIN
    DECLARE @Result nvarchar(4000)
    SELECT @Result = Value
    FROM dbo.FilteredStringMap
    WHERE AttributeName = @AttributeName AND AttributeValue = @AttributeValue

    RETURN @Result
END
GO