Viewing 15 posts - 4,336 through 4,350 (of 7,610 total)
Add another temp table to hold the Project & Packages you want to list. Then run the SELECT below.
Btw, you should add a clustering key to the #DateHr table...
April 7, 2016 at 2:24 pm
Not sure which ClientId column is in Temp_Client, so change if needed:
SELECT [AssigneeID]
FROM [dbo].Assignee
LEFT OUTER JOIN Temp_Client ON Clientid = Client_ID
WHERE @clientid = 'ALL' OR Temp_Client.Clientid IS NOT...
April 7, 2016 at 10:01 am
CREATE TRIGGER %%
ON ALL SERVER
WITH EXECUTE AS 'sa'
AFTER
CREATE_TABLE,ALTER_TABLE,DROP_TABLE,CREATE_VIEW, ALTER_VIEW, DROP_VIEW
, CREATE_FUNCTION, ALTER_FUNCTION, DROP_FUNCTION
, CREATE_PROCEDURE, ALTER_PROCEDURE, DROP_PROCEDURE
AS
SET ANSI_PADDING ON;
SET ANSI_WARNINGS ON;
SET ARITHABORT ON;
SET CONCAT_NULL_YIELDS_NULL ON;
SET NOCOUNT ON;
SET NUMERIC_ROUNDABORT...
April 7, 2016 at 9:57 am
DesNorton (4/6/2016)
Hi Scott
This is certainly fast, with similar I/O to the other solutions, but very low CPU numbers. However, I am unable to wrap my head around the math...
April 6, 2016 at 12:25 pm
Rather than using a gui, use a SQL RESTORE command to do the restore. Then the new files can be specified using the "WITH" clause.
And here's a function I...
April 6, 2016 at 9:21 am
I think you can use the (old) view "sysusers", "WHERE isaliased = 1" to find any aliases.
April 5, 2016 at 4:07 pm
Another possibility is to leave the main table alone, and create a separate table to hold the partial partids to match on. Use a trigger on the main table...
April 5, 2016 at 3:35 pm
MS provides tablediff.exe for free. It works ... but it is a command-line tool and, like bcp, takes a bit of time/work to get used to and get it...
April 5, 2016 at 2:31 pm
No, a stop / start of SQL Server will not cause an identity value to go down. Your code must be resetting it for that to happen.
April 5, 2016 at 2:04 pm
Yes, creating a non-clustered index on the clus index column(s) can indeed help performance for certain queries. It's a valid thing to do when that situation exists.
April 5, 2016 at 9:57 am
You could also consider using an A/B table approach. That is, the nightly load goes into a different table name. When the load process is complete, either the...
April 1, 2016 at 10:24 am
Most likely a LOOP join will be used. That is not guaranteed, of course, but it is likely.
If you want to be sure what join algorithm will be used,...
April 1, 2016 at 10:18 am
Look at the tempdb log file size and growth amount, particularly if it is a % (which you should change to a fixed amount: never use %, no matter what...
April 1, 2016 at 10:08 am
Alan.B (3/31/2016)
1. Nothing I posted uses recursion. Look again.
2. People should put unique nonclustered indexes on their dim_date or calendar but dont. It's not like it gets modified all...
April 1, 2016 at 9:02 am
We don't really know why MS chose to make the PK by default also the clustering index.
Personally I think it was more about making it "easy to use" so it...
March 31, 2016 at 10:51 am
Viewing 15 posts - 4,336 through 4,350 (of 7,610 total)