TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
suresh sarda
NA
3
689
Passing Table Parameter to a Table Function in SQL Server
Aug 9 2016 5:49 AM
I have create the table-function with table valued parmaeter. I am able to use it as below code
DECLARE @dimtypetable ddm.[VAR_DIMENSIONDETAILS] ;
INSERT INTO @dimtypetable
SELECT * FROM (VALUES('FAMILY',NULL,NULL,NULL,NULL,NULL),
('SUB_FAMILY',NULL,NULL,NULL,NULL,NULL)
)S(A,B,C,D,E,F)
--SELECT * FROM @dimtypetable
SELECT * FROM DDM.FN_GETDIMENSION_TBL(@dimtypetable);
Now I wan to use this table valued function as select statement using the Table-constructor thru cross apply or simple select statement.
SELECT * FROM DDM.FN_GETDIMENSION_TBL((SELECT * FROM (VALUES('FAMILY',NULL,NULL,NULL,NULL,NULL))S(A,B,C,D,E,F)));
Msg 116, Level 16, State 1, Line 1
Only one expression can be specified in the select list when the subquery is not introduced with EXISTS.
Msg 206, Level 16, State 2, Line 1
Operand type clash: varchar is incompatible with VAR_DIMENSIONDETAILS
Reply
Answers (
2
)
how to calculate all the numbers in a rows under a column
Exact use of Table variable and Temp table