Viewing 15 posts - 7,291 through 7,305 (of 7,602 total)
SELECT
[Database Name],
[Compression Ratio]
FROM (
SELECT
b.database_name 'Database Name',
...
July 17, 2012 at 3:20 pm
Sounds like RCS (Read-Committed Snapshot) is what you need here.
July 17, 2012 at 12:12 pm
takilroy (7/17/2012)
My intent is to see if anyone has been able to or knows of a way to create a global constant variable or use a sql function to determine...
July 17, 2012 at 11:57 am
I really think you're going to drive people crazy trying to follow this because no one else does it.
Almost universal is to use NULL to mean "no value was passed...
July 17, 2012 at 10:48 am
takilroy (7/17/2012)
July 17, 2012 at 9:04 am
Again, in theory yes.
But in the real world that's often difficult to do and takes a lot of time. And often a change later to the code by someone...
July 16, 2012 at 3:42 pm
You can use a lookup table to store default/control values.
Or, less overhead but more obscure, you can store the default/control values in specific byte positions of CONTEXT_INFO.
July 16, 2012 at 3:38 pm
I'm not familiar with MONTHS_BETWEEN, but IF it does always use 31 days as a "month" in that function, then you can get the same result from SQL Server using:
SELECT...
July 16, 2012 at 3:32 pm
Michael Valentine Jones (7/16/2012)
ScottPletcher (7/16/2012)
SQLKnowItAll (7/16/2012)
ScottPletcher (7/16/2012)
Donald Bustell (7/16/2012)
Database: timetracking
Column: project varchar(50)
Questions:
1. What in the world???
2. How would I craft a trigger to just RTRIM everything on the way in?
Thanks
Donald
CREATE...
July 16, 2012 at 3:02 pm
SQLKnowItAll (7/16/2012)
ScottPletcher (7/16/2012)
Donald Bustell (7/16/2012)
Database: timetracking
Column: project varchar(50)
Questions:
1. What in the world???
2. How would I craft a trigger to just RTRIM everything on the way in?
Thanks
Donald
CREATE TRIGGER dbo.project_trg_ins
ON dbo.project
AFTER INSERT
AS
UPDATE...
July 16, 2012 at 2:18 pm
Something like below should do it:
SELECT
CASE WHEN backup_month IS NULL THEN 'ALL'
ELSE LEFT(DATENAME(MONTH, backup_month), 3) END AS...
July 16, 2012 at 2:13 pm
Donald Bustell (7/16/2012)
Database: timetracking
Column: project varchar(50)
Questions:
1. What in the world???
2. How would I craft a trigger to just RTRIM everything on the way in?
Thanks
Donald
CREATE TRIGGER dbo.project_trg_ins
ON dbo.project
AFTER INSERT
AS
UPDATE p
SET
...
July 16, 2012 at 1:56 pm
JayWinter (7/12/2012)
July 13, 2012 at 4:42 pm
Presumably the ContactID is indexed.
If there can only be single-line gaps, you can do this:
SELECT
c1.ContactID - 1 AS Missing_Number
FROM #Contact c1
WHERE NOT EXISTS...
July 13, 2012 at 4:11 pm
dan-572483
I was surprised to see that the Estimated Execution Plan shows a slightly higher cost for LEFT(LastName,2) over LIKE. The Plan for LIKE recommended creating a nonclustered index...
July 13, 2012 at 3:48 pm
Viewing 15 posts - 7,291 through 7,305 (of 7,602 total)