Viewing 15 posts - 541 through 555 (of 1,468 total)
It's the law of home ownership, Steve... all 10 minutes jobs take at least 6 hours to complete. 😀
Aint that the truth
July 3, 2019 at 5:42 pm
Thanks for posting your issue and hopefully someone will answer soon. This is an automated bump to increase visibility of your question.
I'm sorry, but this amused me...
July 3, 2019 at 3:29 pm
The following code is based on a solution previously provided by Drew Allen
https://www.sqlservercentral.com/Forums/FindPost2025579.aspx
WITH cteStart AS (
SELECT aa.account_id, aa.active_date
...
July 3, 2019 at 3:22 pm
You can use a CASE statement
CREATE VIEW [dbo].[GCDFview]
AS
SELECT p.FirstName, p.LastName, c.city, p.instructorInt as 'Instructor'
, s.stateAbbrveation AS 'State', 'USA' AS Country, 'GCDF' AS Certifications
, p.PeopleID + CASE WHEN...
July 2, 2019 at 8:11 pm
Use this pattern to pad your values
DECLARE @PaddingChar char(1) = 'x'; -- Change your padding character here
DECLARE @RequiredLen int = 7; -- Change the padded length here
SELECT...
July 1, 2019 at 6:09 am
You can add padding to the start/end of the value, then use left/right to get the required length
DECLARE @AccountNumber2 varchar(20) = '8063#018375';
DECLARE @PaddingChar char(1) = 'x'; --...
June 28, 2019 at 10:41 am
In the absence of better code, this is what I came up with. I'm assuming you have a table of holidays like #Holidays table. Then you just check for...
June 28, 2019 at 5:37 am
Do you guys run EVERYTHING that goes into production through QA/UAT, or do you trust some users if they have a proven track record of high scores, and only...
June 27, 2019 at 4:21 am
At a guess, this *MIGHT* have improved performance.
WITH cteData AS (
SELECT p.party_id, p.consolidation_ind
FROM ...
June 24, 2019 at 3:25 pm
Thanks for your help. I want to show only the columns City and Company Name. I dont want to show column City with a count of the Cities per...
June 24, 2019 at 1:23 pm
Thank you, Desnorton. We run in Azure SQL on a low end service tier so we don't use temp tables much. I will look into the other possibility.
The temp...
June 22, 2019 at 4:38 am
With a small structure change
ALTER TABLE #TItems ADD
AutoReorder bit
, isFavorite bit
, IsControlled bit;
UPDATE i
SET AutoReorder = a.AutoReorder
, isFavorite ...
June 21, 2019 at 11:02 am
Perfect, suits my needs perfectly thanks. Just to expand for anyone reading this in future: Whilst in my example the result of ROW_NUMBER can not be greater than the...
June 14, 2019 at 1:08 pm
This is a classic (Gaps and) Islands problem. The following will not give you sequential group numbers, but it will give you unique group numbers.
GroupNum = SequenceNumber...
June 14, 2019 at 12:12 pm
Hi DesNorton, Thank you so much for this! It's a massive help and works when creating the task temp table. I am not able to get the script working...
June 14, 2019 at 11:48 am
Viewing 15 posts - 541 through 555 (of 1,468 total)