Viewing 15 posts - 1,786 through 1,800 (of 2,645 total)
This works with your data:SELECT [week],
convert(decimal(9,1),[Truck (Galway)]) [Truck (Galway)],
convert(decimal(9,1),[Trailer (Galway)]) [Trailer (Galway)],
convert(decimal(9,1),[E-Evap (Galway)]) [E-Evap (Galway)]
FROM
(
...
January 18, 2019 at 6:53 am
January 18, 2019 at 5:54 am
January 18, 2019 at 4:44 am
January 18, 2019 at 4:28 am
January 17, 2019 at 10:47 pm
I think someone forgot to carry the 1 or something, because that...
January 17, 2019 at 2:06 pm
January 17, 2019 at 1:48 pm
January 17, 2019 at 1:32 pm
SELECT * datepart(week,t_stamp)[week],
[Line],
[TaktTime]
...
January 17, 2019 at 1:22 pm
January 17, 2019 at 9:07 am
January 17, 2019 at 7:45 am
Function:CREATE FUNCTION dbo.udf(@RowCount int)
RETURNS TABLE
AS
RETURN
WITH X AS (SELECT * FROM (VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14),(15),(16),(17),(18),(19),(20),(21),(22),(23),(24),(25),(26)) T(N))
SELECT TOP(@RowCount)
SUBSTRING('ABCDEFGHIJKLMNOPQRSTUVWXYZ',a.N,1)+SUBSTRING('ABCDEFGHIJKLMNOPQRSTUVWXYZ',b.N,1)+SUBSTRING('ABCDEFGHIJKLMNOPQRSTUVWXYZ',c.N,1) [Value]
...
January 17, 2019 at 6:41 am
You don't need a temporary table to store distinct OperatorIds, you can do it all with CTE. Though sometimes it will give you better performance if you create a temporary...
January 16, 2019 at 6:39 pm
January 16, 2019 at 3:34 pm
Viewing 15 posts - 1,786 through 1,800 (of 2,645 total)