Viewing 15 posts - 811 through 825 (of 1,468 total)
June 19, 2018 at 10:49 am
Try adding this line ..., AvgSeconds = AVG(IncidentStatusDurationFactvw.TotalTimeMeasure) OVER ()
I do not have access to your data, so anything that I post is simply an...
June 18, 2018 at 1:32 pm
June 13, 2018 at 6:08 am
This should get you the desired resultsSELECT
src.ShipperID
, src.InvtID
, src.CONTAINER_NO
, src.ITEM_CODE
, NetWgt = SUM(src.NET_WEIGHT)
June 12, 2018 at 1:46 pm
ALTER TABLE [YourSchema].[YourTable]
ADD Supplier AS CAST(SUBSTRING([YourStringColumn], CHARINDEX('-', [YourStringColumn]) + 1, 5) AS CHAR(5)) PERSISTED;
Now you can index the [Supplier] field, and join on it directly.
June 12, 2018 at 12:14 pm
This should give you the the AVG per day as well as the AVG for the full result set.SELECT DISTINCT
isdfv.TotalTimeMeasure
, idv.Id
June 12, 2018 at 12:07 pm
June 12, 2018 at 11:41 am
June 12, 2018 at 9:01 am
New to the site and thought this would be the best place to find out...
June 12, 2018 at 5:42 am
Combine your 2 statements like this ....SELECT a = LEFT(a, LEN(a) - CHARINDEX('_',REVERSE(a)))
FROM (
SELECT
REPLACE
(REPLACE
(REPLACE
(REPLACE
...
June 11, 2018 at 1:34 pm
Change the CREATE FUNCTION to ALTER FUNCTION as you are now altering an existing function
June 11, 2018 at 1:09 pm
You can create a function to calculate the durations for you.
The function below will calculate the time in seconds, using Mon-Fri 06h00 to 18h00.
However, it will not...
June 7, 2018 at 12:37 pm
Comparison on NVARCHAR(MAX) is never going to give you good performance.
June 4, 2018 at 11:25 pm
There was no need to move the data.
Option1 - Insert unique values into the original tableCREATE CLUSTERED INDEX CI_Temp ON exportLogTable2(TableID);
WITH cteData as...
June 4, 2018 at 11:28 am
Viewing 15 posts - 811 through 825 (of 1,468 total)