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
nitish rai
NA
319
18.5k
Please get the solution on top priority
Jan 18 2018 6:10 AM
ALTER Proc [dbo].[ProCreateBottleline1POSIMATfinal]
@StartDate varchar(50)=null,
@EndDate varchar(50)=null
As
begin
SELECT [0]as [ActivePowerKW],[3]as [PowerFactor],[1]as [CurrentAmp] ,[4] as [VoltageV],[2]as [FrequencyHz],DateAndTime FROM
(
SELECT TagIndex,Val,DateAndTime,Row_Number() Over(partition by TagIndex order by TagIndex,DateAndTime ) As ColumnSeries FROM FloatTable
)Temp
Pivot
(
max(Val) For TagIndex in ([0],[3],[1],[4],[2])
)Piv
select * from FloatTable
where cast(DateAndTime as date) between @StartDate and @EndDate
End
--------exec ProCreateBottleline1POSIMATfinal @StartDate='2018-01-04 16:28:08.000',@EndDate='2018-01-15 16:28:08.000'
Reply
Answers (
1
)
For Connect & get Data using C# and SQL server
How to find SQL Server Locks,Blocked Processes?