Viewing 15 posts - 76 through 90 (of 90 total)
Hi, Try something like this.
SELECT DbBsName = mf.name
,PhysicalName = mf.physical_name
,LogicalName = db.name
FROM sys.master_files mf
JOIN sys.databases db ON db.database_id=mf.database_id
WHERE db.state = 0
AND mf.file_id = 1
November 16, 2016 at 10:54 am
Nice Start, however.
SELECT TOP(1)
-- Get the path location by trimming the file name and file extension.
LEFT(physical_name,LEN(physical_name) - (LEN([name]) + 4) )
FROM sys.database_files
WHERE...
November 16, 2016 at 8:26 am
While an ORDER BY clause will guarantee an order of results, I thought I read somewhere (long ago) that with out ORDER BY, the order or results can be influenced...
November 15, 2016 at 7:01 am
Interesting Question, but you can't say that
NULL
0
1
2
NULL
is a wrong answer.
I tested this using SSMS 2016, and 2008R2 and both provided the same order of results. Perhaps the...
November 15, 2016 at 6:21 am
Thanks very much Drew.
In regards to my collation usage, and the COALESCE in the WHERE clause you are so right !! This was written Months ago and I didn't even...
October 19, 2016 at 11:50 am
Very interesting.
A little additional research shows that the 3rd parameter can be anything other than the default of zero will cause the round function to truncate at the location specified...
October 5, 2016 at 6:25 am
Thank you Alan.
"Not Replicating Triggers" the trigger itself, or the results after a triggered event?
I have just completed the install of my 2 test servers SQL 2016 DEV, Will I...
September 8, 2016 at 10:30 am
What is the purpose of this part of the script ?
-- Enable the OLE automation on the server
EXEC sp_configure 'Ole Automation Procedures', 1;
May 19, 2016 at 6:57 am
Yes, I understand that separating the transactions with a GO will make it work, however this is but one part of a larger transaction that I was trying to complete...
February 16, 2016 at 2:32 pm
Don't you need to create a linked server first ?
February 15, 2016 at 8:08 am
OUTSTANDING !!
ALL of this is VERY helpful,
Thank you all
October 12, 2015 at 7:45 am
FOLLOW-Up Question..
Are there any other objects that could be used in this situation?
July 10, 2014 at 8:23 am
Simply looking for alternatives and better performance.
I have gotten myself into a bad habit of only using UNION to avoid duplicates and had quickly brushed that thought away. As...
May 9, 2014 at 8:50 am
OK, I should not have suggested the possibility of using PIVOT for this, I just did not know what to put in the subject line, and maybe this was Not...
May 9, 2014 at 7:41 am
Try this
SELECT CarID, MAX(ColorID) FROM @ColorList GROUP BY CarID
May 6, 2014 at 10:47 am
Viewing 15 posts - 76 through 90 (of 90 total)