Viewing 15 posts - 16 through 30 (of 167 total)
I've got a Stored Procedure some what like this but I've also added:
DBCC InputBuffer(<SPId Variable>);
for each SPId in the result set. It helps to know what command was/is executing.
One of...
January 23, 2014 at 8:33 am
[h4]DateDiff tricks and the missing 147 years[/h4]
Data-type DateTime has the following properties:
It can represent any valid date/time between 1753-01-01 00:00:00.000 and 9999-12-31 23:9:59.998.
Declare
@st DateTime,
@et DateTime;
Select
@st='1753-01-01 00:00:00.000',
@et='9999-12-31 23:59:59.998';
Mess with the dates...
January 20, 2014 at 6:14 pm
[h4]More DateTime info...[/h4]
This time I teased out the internal representation of the DateTime data type. First I ran the following:
Declare @d DateTime;
Set @d='1753-01-01 00:00:00.000';
Select Cast(@d as VarBinary),Cast(@d as BigInt);
And received:
0xFFFF2E4600000000...
January 18, 2014 at 12:40 am
Another bit of SQL weirdness with the DateTime datatype.
[h4]Setup...[/h4]
According to BOL a DateTime variable will hold dates ranging from 1753-01-01 through 9999-12-31.
By not also specifying the time component they judiciously...
January 17, 2014 at 4:43 pm
So many competing issues; and there always will be.
As the amount data increases and the depth of historical context deepens I find the shops I work in to be moving...
January 17, 2014 at 8:47 am
Thanks Jeff for the performance analysis. The two main reasons that it is slower are:
1) Its coded as a scalar function
2) It also handles days, i.e., it outputs a string...
January 16, 2014 at 10:43 pm
[h4]Try this...[/h4]
Create Function dbo.ElapsedTime
(
@StartTime DateTime,
@EndTime DateTime
)
Returns VarChar(20)
As
Begin
Declare
...
January 16, 2014 at 1:45 pm
If by "scheduled jobs" you are referring to work-load that is using non-SQL mediated disk-space on the same volume containing TempDB, then I'd say your request is just a band-aid...
January 8, 2014 at 12:41 pm
The sproc only has access to its value of @@NestLevel; there is no "external" or other context to compare it to so it doesn't know about any differential (magnitude of...
January 7, 2014 at 8:57 am
Dense_Rank() would be a better choice for your windowing function as it would permit duplicate values to exist in your data islands.
December 2, 2013 at 12:14 pm
A simple analysis of the file path as a string won't always work. File paths can be constructed such that directory components have periods in them, e.g.,
C:\MyDirectory\LooksLikeAFileNameButIsReallyADirectory.txt
A simple string analysis...
July 3, 2013 at 8:27 am
okbangas (6/26/2012)
T-SQL type Int is storage-equivalent to VarBinary(4).
T-SQL type BigInt is storage-equivalent to VarBinary(8).
This is definitely not so, as varbinary require a VLB (Variable Length Block), whereas int and bigint...
June 26, 2012 at 11:15 am
Do you really need to use separate batches for your script?
If not, remove the GOs and use Return and/or conditional Goto's to strategically placed labels.
August 9, 2011 at 9:16 am
Wow, thanks! Gotta new title to add to my resume!
Data Scientist... has a certain ring to it, doesn't it!
I've been doing this for years now on data tables with over...
August 2, 2011 at 11:54 am
Viewing 15 posts - 16 through 30 (of 167 total)