Friday, December 30, 2016

SQL Store Procedure sample

ALTER PROCEDURE Proc_Test
       -- Add the parameters for the stored procedure here
       @name varchar(50),
       @trns_dt datetime
AS
BEGIN
       -- SET NOCOUNT ON added to prevent extra result sets from
       -- interfering with SELECT statements.
       SET NOCOUNT ON;
    -- Insert statements for procedure here
       SELECT * from AdventureWorks2012.Sales.SalesOrderDetail D
       print @name
       --where convert(varchar(10),D.ModifiedDate,120)=convert(varchar(10),@trns_dt,120)
END
GO
--Select getdate()
--Select convert(varchar(10),GETDATE(),105)

No comments:

Post a Comment

Copy Markup charges while posting purchase invoice using X++

 Copy Markup charges while posting purchase invoice using X++ Class: Important: Code logic is just for Reference.  New class => Duplicate...