I am attempting to create a table valued parameter for input into an MS SQL Server stored proc. My create statement:
CREATE TYPE dbo.tvt_AbusedBy AS TABLE
( Assessment_Behavorial_AbusedID int, Assessment_BehavorialID int,
Ref_Abuse_TypeID int, Abuser_Name varchar(50), GenderID int,
Relationship_TypeID int, Age int)
When attempting to add as a parameter into the proc:
CREATE PROCEDURE [dbo].[qryAddUpdateMultipletblAssessment_Behavorial_Abused]
@prm_Assessment_Abused AS dbo.tvt_AbusedBy READONLY,
I get an error reading "The parameter @prm_Assessment_Abused cannot be declared READONLY since it is not a table valued parameter".
It does not seem to recognize it as a table valued parameter.
If I remote the READONLY stipulation, it gives me an error "Parameter or variable @prm_Assessment_Abused has an invalid type.
Must be an issue with how I am attempting to create the table valued parameter type.
Any ideas?
ASin the parameter declaration.