Viewing 15 posts - 946 through 960 (of 2,645 total)
WHERE (Insert_date > @LastJobRun OR Last_Updated > @LastJobRun)
November 4, 2020 at 3:30 pm
CASE
WHEN Phone IS NOT NULL OR MobilPhone IS NOT NULL THEN
CONCAT(CONCAT(LEFT(COALESCE(Phone,MobilPhone),3),'-'),
CONCAT(CONCT(RIGHT(LEFT(COALESCE(Phone,MobilPhone),7),3),'-'),
RIGHT(LEFT(COALESCE(Phone,MobilPhone),12),4)))
ELSE ''
END As PhoneNumber
That's very odd code. It looks like whoever wrote it didn't know you...
November 3, 2020 at 11:42 pm
https://support.microsoft.com/en-us/help/3177312/kb3177312-sql-server-2016-build-versions
SQL Server 2016 Service Pack 1 (SP1) Cumulative Update (CU) Builds
SP1 13.0.4001.0 KB3182545 November 16, 2016
October 29, 2020 at 4:59 pm
Do you have any indexes on the table you are inserting into?
If there are and it's loading into an empty table then it would be faster to disable all indexes...
October 29, 2020 at 4:49 pm
If possible I always revert to standard UPDATE and INSERT instead of using a MERGE, this will give better performance. This is also the recommendation from Microsoft: "Performance Tip: The...
October 21, 2020 at 10:11 pm
I was thinking more about this - realized we can do this:
SELECT weekend_day_count=y/7-x/7+(y+1)/7-(x-1)/7
FROM (VALUES(DATEDIFF(DAY,-53690,'1899-01-01') + 1,DATEDIFF(DAY,-53690,'1900-01-14') + 1))x(x,y)
We can specify the anchor date...
October 20, 2020 at 10:13 pm
How is a DiagnosisCode flagged as special in dim_OHADiagnosis?
How is a row in dim_Mapping identified as a Cancer Site diagnosis?
Which columns are used to join the tables together?
October 14, 2020 at 5:48 pm
if you output onto a file or to text it should give you the desired result
if you are querying on SSMS to the grid it will remove those.
If you...
October 9, 2020 at 8:53 pm
You start with
Select Sell * FeeMargin as Fee from TEST
Select Sell - Cost - Fee as Nett from TEST
Select Nett / Cost as NettMargin from TEST
If...
October 1, 2020 at 2:34 pm
view attached. It takes 2 hours to run. I'll try to run when there is not much activity in the server.
Nothing attached.
Can you paste in the whole query and...
September 25, 2020 at 1:57 pm
I can't see the full SQL query text. Can you paste the full query in this thread?
Also, how many rows are on EDW.dbo.DimInvoice?
September 25, 2020 at 1:46 pm
I think these 3 queries will do the same thing
SELECT t1.CATEGORY, t1.ITEMID
FROM ecomm.Promo_Items t1
CROSS APPLY (SELECT NESTEDSETLEFT,
...
September 23, 2020 at 11:39 pm
I've had to vertically split a dimension table on a data warehouse. It had over 500 columns, almost any update was causing a page split so splitting the table into...
September 15, 2020 at 4:24 pm
You can use MAXDOP on an individual query e.g.
SELECT ProductID, OrderQty, SUM(LineTotal) AS Total
FROM Sales.SalesOrderDetail
WHERE UnitPrice < $5.00
GROUP BY ProductID, OrderQty...
September 15, 2020 at 4:14 pm
It doesn't sound like a memory issue, but if you are sure it is you could reduce the memory SQL Server uses just before the SSIS packages run...
September 14, 2020 at 5:02 pm
Viewing 15 posts - 946 through 960 (of 2,645 total)