Search

SQL 2012 SP1 schema version 11.1.0.0 Staging Stored Proc for Entity setting Name to NULL by Olof Szymczak

Active

1
0
Sign in
to vote
Type: Bug
ID: 772302
Opened: 11/26/2012 8:18:58 PM
Access Restriction: Public
0
Workaround(s)
1
User(s) can reproduce this bug
Hi,

Using the staging stored proc entity you cannot set the name attribute to null.
Details (expand)

Product Language

English

Version

SQL Server 2012 - Developer Edition

Category

Master Data Services

Operating System

Not Applicable

Operating System Language

Not Applicable

Steps to Reproduce

Create Model: SandBox
Create Entity: ChangeTrackingTest,
Staging Table: SandBox_ChangeTrackingTest
Create Code values Automatically: Yes
Start with: 1
Enable explicit hierarchies and collections: No

Add Attribute
ChangeTrackingTest.TestAttribute
Free-From
DataType: Text
Enable change tracking: Yes
Change tracking group 1

Edit
ChangeTrackingTest.Code
Enable change tracking: Yes

Run the following Script
--Load Value
DECLARE @BatchTag NVARCHAR(50)
SELECT @BatchTag = REPLACE(CAST(NEWID() AS VARCHAR(40)), '-', '') + '_' + CONVERT(VARCHAR(8), GETDATE(), 112) + '_' + REPLACE(CONVERT(VARCHAR(8), GETDATE(), 108), ':', '')
INSERT INTO [stg].[SandBox_ChangeTrackingTest_Leaf]
(
[ImportType],[ImportStatus_ID],[BatchTag],[Code],[Name]
)
SELECT 0 AS 'ImportType', 0 AS 'ImportStatus_ID', @BatchTag AS 'BatchTag', '8' AS 'Code', 'Test' AS 'Name'

EXEC stg.udp_SandBox_ChangeTrackingTest_Leaf 'VERSION_1', 0, @BatchTag
GO
--Set To NULL
DECLARE @BatchTag NVARCHAR(50)
SELECT @BatchTag = REPLACE(CAST(NEWID() AS VARCHAR(40)), '-', '') + '_' + CONVERT(VARCHAR(8), GETDATE(), 112) + '_' + REPLACE(CONVERT(VARCHAR(8), GETDATE(), 108), ':', '')
INSERT INTO [stg].[SandBox_ChangeTrackingTest_Leaf]
(
[ImportType],[ImportStatus_ID],[BatchTag],[Code],[Name]
)
SELECT 0 AS 'ImportType', 0 AS 'ImportStatus_ID', @BatchTag AS 'BatchTag', '8' AS 'Code', '~NULL~' AS 'Name'

EXEC stg.udp_SandBox_ChangeTrackingTest_Leaf 'VERSION_1', 0, @BatchTag
GO
--Set To NULL this should ignore based on ImportType
DECLARE @BatchTag NVARCHAR(50)
SELECT @BatchTag = REPLACE(CAST(NEWID() AS VARCHAR(40)), '-', '') + '_' + CONVERT(VARCHAR(8), GETDATE(), 112) + '_' + REPLACE(CONVERT(VARCHAR(8), GETDATE(), 108), ':', '')
INSERT INTO [stg].[SandBox_ChangeTrackingTest_Leaf]
(
[ImportType],[ImportStatus_ID],[BatchTag],[Code],[Name]
)
SELECT 0 AS 'ImportType', 0 AS 'ImportStatus_ID', @BatchTag AS 'BatchTag', '8' AS 'Code', NULL AS 'Name'

EXEC stg.udp_SandBox_ChangeTrackingTest_Leaf 'VERSION_1', 0, @BatchTag
GO

Actual Results

Name == '~NULL~'

Expected Results

Name = NULL

Platform

X64

Virtualization

 
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 1/9/2013 at 8:41 PM
Sorry, Olof, this was closed by mistake. I have reactived the bug.
Posted by Olof Szymczak on 1/6/2013 at 8:19 PM
Hi,

Can you give a reason as to why you wont fix this issue? I can set any text attribute to null why not name?

Olof
Sign in to post a workaround.