Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

invalid data types when I try an call upon a table

Tags:

sql

sql-server

Using SQL server 2012 and Management Studio, I have a variable that currently states: declare @OutputList Support.RollbackOutputList

I want to add a schema in front, so I tried to add the database name at the start (DB1) so it reads @OutputList DB1.Support.RollbackOutputList.

However it gives me an error stating:

Parameter or variable @OutputList has an invalid data type.

Now the Support.RollbackOutputList is actually a user defined table which can be viewed in the object explorer if you select the:

Database > Programmability > Types > User Defined Table Types and it's there.

How can I call upon this table using the database schema?

like image 689
BruceyBandit Avatar asked Mar 09 '26 00:03

BruceyBandit


1 Answers

have a line like this before the current statement

USE DB1
GO
DECLARE @OutputList Support.RollbackOutputList
like image 150
DhruvJoshi Avatar answered Mar 10 '26 14:03

DhruvJoshi