Viewing 15 posts - 6,706 through 6,720 (of 59,070 total)
You said that the files that are missing columns are the same except for the missing columns. With that in mind, it's a whole lot easier if you make...
July 22, 2020 at 5:12 am
You said that the files that are missing columns are the same except for the missing columns. With that in mind, it's a whole lot easier if you make multiple...
July 22, 2020 at 5:11 am
Here's my attempt:
;with TestData as
(
SELECT *
FROM (VALUES ('A[kfg]'),
...
July 22, 2020 at 1:46 am
Not sure if i read it correctly but look into STRING_AGG or STRING_SPLIT
Got code?
July 22, 2020 at 12:28 am
In addition to Jeff's good comments, another (and in my own opinion better) solution would be to normalize the table and split that column into a completely different table,...
July 22, 2020 at 12:26 am
Hi Friends,
I have a table which has DateTime, IsWeekend, IsHoliday fields in my DB.
I have another table which has the list of tickets logged with columns like
Select TicketID, Status,CreatedDate,ResolvedDate,...
July 22, 2020 at 12:17 am
Hi,
Please refer below code snippet -
;WITH DateTable AS (
SELECT * FROM (VALUES
('2020-07-01',0,0),
('2020-07-02',0,0),
('2020-07-03',0,1),
('2020-07-04',1,0),
('2020-07-05',1,0),
('2020-07-06',0,0),
('2020-07-07',0,0),
('2020-07-08',0,0)
) AS t(DateValue,isWeekEnd,isHoliday)
),
TicketTable AS (
SELECT * FROM (VALUES
('Ticket1','2020-07-01','2020-07-06'),
('Ticket2','2020-07-07','2020-07-08'),
('Ticket3','2020-07-07',NULL)
) AS t(Ticket,CreateDate,ResolvedDate)
)
SELECT t.Ticket,t.CreateDate,t.ResolvedDate,
DATEDIFF(DAY,t.CreateDate,t.ResolvedDate) - SUM(d.isWeekEnd)-SUM(d.isHoliday) AS TicketAge...
July 22, 2020 at 12:15 am
Have you actually check what code is running on the server during this problem?
July 21, 2020 at 11:43 pm
I have a Use case like.
We migrated around 1000 millions of rows into around 5-6 tables.
client requirement frequently change to update some columns. Is there any best way to...
July 21, 2020 at 11:20 pm
So I am trying to get the datediff for parameters selected, even though the 2 dates could span 60 days, for an example I have 2 dates available(2018-01-05 11:08:00)...
July 21, 2020 at 11:17 pm
Congratulations on the improvement you made but I don't believe your job is complete yet. My biggest concern would be to find out exactly why a single package is consuming...
July 21, 2020 at 11:12 pm
There is a job that runs every 2 hours, it grabs the last 10k records, truncates and loads those records back with fresh new IDs.
To what end? What is...
July 21, 2020 at 11:08 pm
I was reading one of Brent Ozar's posts about SSMS, and he was talking about "never use the sa/admin account unless you need to", so I was wondering if...
July 21, 2020 at 11:05 pm
Wouldn't it be easier to take a snapshot of sys.dm_db_index_usage_stats from one day till the next and do a comparison? The added benefit here is that it includes indexes from...
July 21, 2020 at 11:00 pm
CREATE TABLE dbo.t
(
TxtVARCHAR(8000)
);
INSERT dbo.t (Txt) VALUES
('A[CL]'),
('B[HQUW]'),
('C[1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ]'),
('D2'),
('E[1]');
GO
WITH Result
AS
(
SELECTLEFT(Txt, 1) AS Constant,-- all strings with [...]
SUBSTRING(Txt, 3, 1) AS Variable,
SUBSTRING(Txt, 4, LEN(Txt) - 4)...
July 21, 2020 at 7:36 pm
Viewing 15 posts - 6,706 through 6,720 (of 59,070 total)