Viewing 15 posts - 811 through 825 (of 1,464 total)
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
When looking up the month names, you could also use the CHOOSE function
Replace this large CASE statementcase c.m when 1 then 'January'
May 30, 2018 at 4:01 am
ManicStar - Tuesday, May 29, 2018 2:39 PMWine
Cheese
May 29, 2018 at 10:14 pm
Viewing 15 posts - 811 through 825 (of 1,464 total)