Version 6.4.0.478 qualify object name issue for user defined
jsreynolds1
Posts: 91 Silver 1
Version 6.4.0.478 qualify object name issue for user defined table type and table value parameter (TVP).
I applied "qualify object names" to some SQL which contained a user defined table type, and a declared table value parameter.
When I asked it to qualify, it removed the TVP and replaced it with the name of the user defined table type.
The name of our user defined data table is, "HRG_Integers". The name of the parameter is, "@RequiredTypes".
You can see below there the inner join on clause gets messed up.
It went from this:
to this:
I applied "qualify object names" to some SQL which contained a user defined table type, and a declared table value parameter.
When I asked it to qualify, it removed the TVP and replaced it with the name of the user defined table type.
The name of our user defined data table is, "HRG_Integers". The name of the parameter is, "@RequiredTypes".
You can see below there the inner join on clause gets messed up.
It went from this:
DECLARE @RequiredTypes HRG_Integers, @IncludedTypeList NVARCHAR(MAX); INSERT INTO @RequiredTypes ([Value]) VALUES (16); SELECT @IncludedTypeList = STUFF( (SELECT ', ' + [Types].[TypeName] FROM @RequiredTypes INNER JOIN [Types] ON [@RequiredTypes].[Value] = [Types].[TypeID] ORDER BY [Types].[TypeName] FOR XML PATH(''), TYPE).value('.[1]', 'nvarchar(max)'), 1, 1, '');
to this:
DECLARE @RequiredTypes HRG_Integers, @IncludedTypeList NVARCHAR(MAX); INSERT INTO @RequiredTypes ([Value]) VALUES (16); SELECT @IncludedTypeList = STUFF( (SELECT ', ' + [Types].[TypeName] FROM @RequiredTypes INNER JOIN [Types] ON [HRG_Integers].[Value] = [Types].[TypeID] ORDER BY [Types].[TypeName] FOR XML PATH(''), TYPE).value('.[1]', 'nvarchar(max)'), 1, 1, '');
Comments
I can recreate this here and should get a fix for you shortly, thanks for letting us know!
Thanks,
Aaron.
Edit: This should now be fixed in 6.4.0.500