locked
How to Retrieve value from a UDT RRS feed

  • Question

  • Goal:
    I want to reach and display the value of @data inside if [wwtest].

    Problem:
    The UDT is from the database [test] and I retrieve an error message "The type name 'test.dbo.tvf_id' contains more than the maximum number of prefixes. The maximum is 1.".

    I don't know how to retrieve the data from the database test inside of the query document for [wwtest]?

    create table datatable (id int,
                            name varchar(100),
                            email varchar(10),
                            phone varchar(10),
                            cellphone varchar(10),
                            none varchar(10)                        
                           );
    
    insert into datatable values
      (1, 'productname', 'A', 'A', 'A', 'A'), 
      (2, 'cost', '20', 'A', 'A', 'A'),
      (3, 'active', 'Y', 'A', 'A', 'A');
    
    insert into datatable values
      (4, 'productname', 'A', 'A', 'A', 'A'), 
      (5, 'cost', '20', 'A', 'A', 'A'),
      (6, 'active', 'Y', 'A', 'A', 'A');
    
    
    insert into datatable values
      (7, 'productname', 'A', 'A', 'A', 'A'), 
      (8, 'cost', '20', 'A', 'A', 'A'),
      (9, 'active', 'Y', 'A', 'A', 'A');
    
    
    
    
    CREATE TYPE [tvf_id] AS TABLE
    (
        [id] [int] NULL
        ,[OrdCol] [INT] NOT NULL    
    )
    GO
    
    
    
    DECLARE @data tvf_id INSERT INTO @data([id],[OrdCol]) 
    VALUES (8,1), (2,2), (4,3), (1,4), (3,5);

    Tuesday, June 23, 2015 11:09 AM

Answers

All replies