Viewing 14 posts - 16 through 29 (of 29 total)
It's working
August 30, 2021 at 7:58 am
Adelia, what are you're struggling with?
You've been given a function which gives you all the right numbers, all you need is to incorporate those numbers into a string of...
August 30, 2021 at 6:17 am
Calculate the minutes and seconds the same way you did the years, months and days - using DATEDIFF. Formatting of the type you describe is best done in the...
August 30, 2021 at 4:34 am
This should show you how:
Hi Sergiy,
Just created your Tally Generator. Consider this,
DECLARE @date1 datetime, @currentDate1 datetime
SET @date1 = '8/26/2019 06:23:45 PM'
Set @currentDate1...
August 26, 2021 at 1:50 pm
SQL Server doesn't store, and thus doesn't know, the "last accessed date" for each db.
After SQL starts, when any index is accessed, an entry for that db and index...
March 23, 2021 at 2:46 am
The SQL would look like the following... 😀
WITH ctePreAgg AS
(--==== Pre-aggregate the relevant columns to make display easier.
SELECT DBName ...
March 22, 2021 at 3:20 am
Both of you is correct. I'm wrong giving an output of explanation
December 13, 2019 at 12:37 am
I don't understand what you're asking here. PST is a column already.
Sorry. PST row become column
December 12, 2019 at 6:53 pm
Hi Lowell,
I execute as follow
insert into [dbo].[master_profile]([profile_name], [profile_ic_no])
select [NAMA], [NOKP_NEW]
from [dbo].[EMPMAS_DATA]
insert into [dbo].[master_individual]([profile_id], [identification_no])
select
MyLookup.profile_ic_no,
MySource.[NOKP_NEW]
from [dbo].[EMPMAS_DATA] MySource
INNER JOIN [dbo].[master_profile] MyLookup...
December 5, 2019 at 2:27 pm
Hye all,
My below T-SQL is that accurate calculation?
SELECT
get_customeVal_3 = ISNULL( SUM( CASE WHEN year_num = 2015 AND chart_code <> '36101' AND chart_code <> '39102' AND...
November 7, 2019 at 9:06 pm
SELECT
[WeightDte],
[WhatWeight],
LEAD([WhatWeight],1) OVER (
ORDER BY [WeightDte] desc
) LastWeight
FROM
[dbo].[WeightStory]
Order by [WeightDte] desc
WeightDteWhatWeightLastWeight
-----------------------------------------------------
2019-10-17 08:00:00.00097.90098.600
2019-10-16 06:57:00.00098.60098.400
2019-10-15 07:58:00.00098.40099.500
2019-10-14 16:00:00.00099.50099.200
2019-10-12 11:00:00.00099.200NULL
Yippieeeeeeeeee. Thanks John...
October 17, 2019 at 3:14 pm
Hello John,
SELECT
[WeightDte],
[WhatWeight],
LEAD([WhatWeight],1) OVER (
PARTITION BY WhatWeight
ORDER BY [WeightDte] desc
) LastWeight
FROM
[dbo].[WeightStory]
Order by [WeightDte] desc
WeightDteWhatWeightLastWeight
--------------------------------------------------------
2019-10-17 08:00:00.00097.900NULL
2019-10-16 06:57:00.00098.600NULL
2019-10-15 07:58:00.00098.400NULL
2019-10-14 16:00:00.00099.500NULL
2019-10-12...
October 17, 2019 at 2:58 pm
Your writing is valuable. Thanks
May 15, 2019 at 7:40 am
Viewing 14 posts - 16 through 29 (of 29 total)