Viewing 15 posts - 256 through 270 (of 2,458 total)
I did this on my phone and cant test this but i think this is what you need.
With yourData (rn, Emp_ID, Hour_Type, Start_Date, Hours, End_Date
AS
(
...
-- Itzik Ben-Gan 2001
May 21, 2017 at 7:18 pm
First for some sample data
USE tempdb
GO
IF OBJECT_ID('tempdb.dbo.cannedPhrases') IS NOT NULL DROP TABLE dbo.CannedPhrases;
IF OBJECT_ID('tempdb.dbo.GS') IS NOT NULL DROP TABLE dbo.GS;
GO
-- Itzik Ben-Gan 2001
May 19, 2017 at 4:56 pm
Joe Celko
Please read a book on RDBMS. The identity column is not a column! It's a table property imposed by physical storage...
-- Itzik Ben-Gan 2001
May 18, 2017 at 3:25 pm
-- Itzik Ben-Gan 2001
May 17, 2017 at 3:57 pm
Without Execution plans (you can just post them here, BTW, using the "Add File" link below) it's impossible to determine why each query is performing differently. In SQL server 2014...
-- Itzik Ben-Gan 2001
May 17, 2017 at 3:50 pm
I posted this function about a year ago here. It takes for parameters:
@low = represents the lowest value for n1.
@high = represents the highest...
-- Itzik Ben-Gan 2001
May 16, 2017 at 9:05 am
-- Itzik Ben-Gan 2001
May 10, 2017 at 2:01 pm
Yes, SSIS is the best tool for this.
Depending on your SSIS skill level , you can also use the SQL Server Import/Export wizard (which uses SSIS). You would...
-- Itzik Ben-Gan 2001
May 10, 2017 at 1:35 pm
When moving need to perform insert/update based on primary key value.
This sounds like a job for MERGE to me; there's no need for a loop...
-- Itzik Ben-Gan 2001
May 9, 2017 at 12:27 pm
Well, if you have to use a function to strip the non-numeric characters then DigitsOnlyEE is the best way to go (something I was going to say until...
-- Itzik Ben-Gan 2001
May 8, 2017 at 4:47 pm
If Serv.ID is numeric then you would have to convert it to a string first: -- Itzik Ben-Gan 2001 Then 'Assessment' + ' - ' + CAST(Serv.ID AS varchar(10))
Or, my favorite, CONCAT:
May 4, 2017 at 5:58 pm
A general observation is that the overal quality and consistency of Microsoft online documentation is declining. I digress.
Raiserror has been on the chopping block for some time and...
-- Itzik Ben-Gan 2001
May 4, 2017 at 5:11 pm
-- Itzik Ben-Gan 2001
May 4, 2017 at 4:52 pm
I love this series Brian, its very informative. Well done, 5 stars!
-- Itzik Ben-Gan 2001
May 4, 2017 at 6:34 am
Well done. It's always nice to see a RBAR-free, set-based approach to building tables like this. A few things I would change to improve performance:
1. Make all the...
-- Itzik Ben-Gan 2001
May 3, 2017 at 1:47 pm
Viewing 15 posts - 256 through 270 (of 2,458 total)