Viewing 15 posts - 19,396 through 19,410 (of 59,072 total)
Not sure about SSIS but it's mostly a breeze in T-SQL.
SELECT CAST(CAST(20151020 AS CHAR(8)) AS DATETIME)
--Jeff Moden
Change is inevitable... Change for the better is not.
October 21, 2015 at 4:15 pm
Jayanth_Kurup (10/20/2015)
--Jeff Moden
Change is inevitable... Change for the better is not.
October 21, 2015 at 10:13 am
From the article
--Jeff Moden
Change is inevitable... Change for the better is not.
October 21, 2015 at 8:24 am
Jayanth_Kurup (10/20/2015)
It doesnt 🙂 i figured the random data is generated row by row and not from a set
Even then, the set based method will work for a single...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 21, 2015 at 7:58 am
Not enough coffee, yet. Made a Copy/Paste mistake.
Here's my shot at it. I'll do a performance test tonight (on my way to work just now).
--===== Build a long...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 21, 2015 at 6:52 am
Post removed. I made a mistake.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 21, 2015 at 6:12 am
Alvin Ramard (10/20/2015)
Lynn Pettis (10/20/2015)
Alvin Ramard (10/20/2015)
Or:
set @testTime = '23:45';
SELECT @testTime = cast(dateadd(minute, 15, cast(@testTime as time) ) as char(5));
SELECT @testTime;
Remember, the OP is working with SQL Server 2005...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 20, 2015 at 12:06 pm
Lynn Pettis (10/20/2015)
Alvin Ramard (10/20/2015)
Or:
d eclare @testTime char(5);
set @testTime = '23:45';
SELECT @testTime = cast(dateadd(minute, 15, cast(@testTime as time) ) as char(5));
SELECT @testTime;
But with the above, the following will also...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 20, 2015 at 12:04 pm
This problem deserves "KISS". 😀
--===== Setup the test. This is NOT a part of the solution.
DECLARE @testTime CHAR(5);
SELECT @testTime = '23:45';
--===== Exploit the simplicity of implicit conversions of the...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 20, 2015 at 12:00 pm
nadersam (10/19/2015)
Unfortunately the lag function is not supported on the servers on site, they have SQL Server 2008.Any other option please?.
In future posts, I recommend you post to the correct...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 19, 2015 at 3:12 pm
Kim Crosser (10/19/2015)
Jeff Moden (10/17/2015)It's no wonder C-Level types think they don't need a DBA.
But doesn't Microsoft sell SQL Server against Oracle by telling everyone they don't need a DBA...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 19, 2015 at 3:05 pm
I realize this post should probably be under "Jobs" but I thought I'd give the dedicated denizens of the thread first crack at it.
Any "hybrid" DBAs that have a good...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 18, 2015 at 4:50 pm
Kristen-173977 (10/18/2015)
--Jeff Moden
Change is inevitable... Change for the better is not.
October 18, 2015 at 4:22 pm
nadersam (10/18/2015)
I need a neat way please guys to write a function to remove duplicated characters only if they come in sequence.
Examples
darrk should return dark
eeagle should return eagle
redd should...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 18, 2015 at 11:47 am
TheSQLGuru (7/7/2010)
Jeff Moden (7/2/2010)
TheSQLGuru (7/2/2010)
--Jeff Moden
Change is inevitable... Change for the better is not.
October 17, 2015 at 9:37 pm
Viewing 15 posts - 19,396 through 19,410 (of 59,072 total)