April 5, 2011 at 3:50 pm
Can you use a table valued input parameter to a stored procedure without having to create a user defined data type first?
April 5, 2011 at 4:14 pm
Khades (4/5/2011)
Can you use a table valued input parameter to a stored procedure without having to create a user defined data type first?
First off all Why? you need to avoid the user defined data type.
Table-Valued Parameters : is defined as
Table-valued parameters are a new parameter type in SQL Server 2008. Table-valued parameters are declared by using user-defined table types. You can use table-valued parameters to send multiple rows of data to a Transact-SQL statement or a routine, such as a stored procedure or function, without creating a temporary table or many parameters.
After this i think you might have get some idea what is Table-Valued Parameter.
Thanks
Parthi
April 5, 2011 at 4:50 pm
parthi-1705 (4/5/2011)
First off all Why? you need to avoid the user defined data type.
Why?
Table-Valued Parameters : is defined as
Table-valued parameters are a new parameter type in SQL Server 2008. Table-valued parameters are declared by using user-defined table types.
You tell him that he should avoid user-defined types, then you tell him that he needs to use a user-defined type.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 5, 2011 at 10:22 pm
It's a "language barrier" thing, Gail. Replace the question mark with the word "do" and you'll see what I mean.
Lot's of folks automatically put a question mark after the word "why" and they don't really mean for it to be the end of the sentance. Yeah... it took me a while to get used to it, too.
--Jeff Moden
Change is inevitable... Change for the better is not.
April 6, 2011 at 9:28 am
GilaMonster (4/5/2011)
parthi-1705 (4/5/2011)
First off all Why? you need to avoid the user defined data type.Why?
I think you have missunderstand what i have asked.I asked him why you need to avoid user defined data type.
Why you need to avoid the user defined data type ?
Thanks
Parthi
April 6, 2011 at 9:32 am
Khades (4/5/2011)
Can you use a table valued input parameter to a stored procedure without having to create a user defined data type first?
Nope.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
April 6, 2011 at 11:47 am
Thanks everyone!
It wasn't an absolute requirement to avoid creating a new data type. I just wanted to avoid it if I could.
Apparently I had table variables and table valued input types mixed up.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply