I want to exec my procedure from sql, but I don’t know how.
Here is my code:
CREATE TYPE [dbo].[ListCrc32] AS TABLE(
[crc32] [int] NULL
)
GO
CREATE procedure [dbo].[UpdateAdsList]
@tvp ListCrc32 readonly
as
update tb
set a_update=CONVERT(date,GETDATE(),101)
from Ads tb
join @tvp t on t.crc32 = a_crc32
I want to exec the proc from sql, but I don’t know how to create an object type of UpdateAdsList, and send it to the procedure to – @tvp
Easy ..
Or not to create confusion, you can declare @varname and insert into it and call with it.