Комментарии:
Hey Anthony nice video. What do I need to do if instead of details I want to do pivot table representation? meaning I want to do all this, but then data needs to be transformed to a pivot table without user interaction.
Ответитьthanks for the video, please can share this file with us so we can edit it according to our need or share the code you pasted. I will be much greafull thank you sir
ОтветитьThank you for this video it works perfectly, but i have the error 438 when we run this macro in an other PC
ОтветитьFollowed everything. Runs great on mine but some other users get runtime error 1004 on the refresh line of the macro. Thoughts?
Ответитьhow to create stored procedure please give me a video step by step .....
ОтветитьJust in case someone need the code
create procedure sp_SampleOrderReport
@OrderState as varchar(100),
@OrderStartDate as Date,
@OrderEndDate as Date
as
declare @SQLString nvarchar(1000)
--statement for the procedure
SET @SQLString =
N'select
o.OrderID,
o.OrderDate,
ci.CityName as City,
ci.StateProvinceName,
cu.CustomerName as Picker,
o.Description,
o.Quantity,
o.UnitPrice
from Sales.Customers cu
inner join Application.Cities ci
on cu.DeliveryCityID = ci.CityID
inner join Sales.Orders o
on o.CustomerID = o.CustomerID
where
ci.StateProvinceName = @OrderState
and OrderDate between @OrderStartDate and @OrderEndDate
order by OrderDate'
/*exec dbo.sp_executesql @SQLString
N'@OrderState as Nvarchar(100),
@OrderStartDate as Date,
@OrderEndDate as Date',
@OrderState,
@OrderStartDate,
@OrderEndDate
go*/
exec dbo.sp_SampleOrderReport 'Georgia', '01.01.2013', '10.01.2013'
Thank you very much. 👍🏼
Ответить