How can we help you today? How can we help you today?

Version 6.4.0.478 qualify object name issue for user defined

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:
    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, '');    

jsreynolds1
0

Comments

2 comments

  • Aaron L
    Hi jsreynolds1,

    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
    Aaron L
    0
  • jsreynolds1
    Wow that was fast. Thanks!
    jsreynolds1
    0

Add comment

Please sign in to leave a comment.