Viewing 15 posts - 1 through 15 (of 160 total)
Probably not what you want to hear, but this is from Books On Line:
Database Mail uses the Microsoft Windows security context of the current user to control access to files....
November 9, 2012 at 4:10 pm
Re: "OpenQuery does not accept variables" --
This runs fine in my set-up:
Select * from OpenQuery(MyLinkedServer,'Declare @name varchar(50) Set @name=''RemoteDB'' Select * from sys.databases where name=@name')
Note the declaration of the...
October 29, 2012 at 8:33 am
I think the problem is that you are declaring the variable outside the query. Try putting everything into the OpenQuery:
Select * from OpenQuery(TestServer,'declare @string varchar(max) Set @string=''abcd'' Select *...
October 26, 2012 at 10:13 am
lex9120,
I'm not sure what you are looking for regarding the circumstance where the end date is earlier than the start date. But here's some code I've used in cases...
October 17, 2012 at 12:30 pm
Doh!
Yes, that's what I meant to say: Remove it from the Catch block and see what happens.
Elliott
August 29, 2012 at 5:20 pm
Eugene,
Nothing was logged into your Error table because the ROLLBACK command in the TRY block cancelled the action. Try removing it and the error will log in your table...
August 29, 2012 at 3:50 pm
Hi Sourav,
Glad that lyou are making progress towards your goal.
I don't have SQL Server open in front of me, so these comments are just observations, maybe correct, maybe...
August 25, 2012 at 10:16 am
A small point, but wouldn't the code by simplified by using the DateDiff function to compare the last backup date to today's date? There's no need to convert from...
August 24, 2012 at 2:03 pm
Here is a general approach, which I'm sure you can improve.
-- Declare variables to set exclusion ranges
Declare @LowerOutlier decimal(4,2)
Declare @UpperOutlier decimal(4,2)
Set @LowerOutlier=0.05 -- adjust as needed
Set @UpperOutlier=0.95 --...
August 3, 2012 at 3:23 pm
I'm a volunteer. I got hooked in my first relational database class in college. The magic of pulling information out of a big pile of data turned me...
July 25, 2012 at 5:12 pm
Hello again,
Just a quick note:
My (quick and dirty) solution does not act to alter the existing data, but to update the new column that the OP intends to add to...
July 20, 2012 at 10:40 am
Or, if you want to revise the view itself, try something like this:
;WITH cte as
(Select [FinancialYr],[FinQtr],Count(FinQtr) as NumCount from vForecast group by [FinancialYr],[FinQtr])
Update vForecast
Set ForecastSpendPerQtr=f.[SpendPerFinYr($)]/cte.NumCount
From vFin f JOIN cte ON...
July 16, 2012 at 3:19 pm
Agreed. That's an important point. If the mirror is going to be down for long, it might be best to remove the mirroring (Alter Database MyDatabase Set Partner...
May 18, 2012 at 12:55 pm
You didn't indicate there was a witness, so this answer applies to a non-witnessed set-up. If the mirroring session is in High Protection mode and the mirror database becomes...
May 18, 2012 at 11:34 am
Viewing 15 posts - 1 through 15 (of 160 total)