Viewing 15 posts - 2,611 through 2,625 (of 5,394 total)
Please read the first article linked in my signature line and find out how to post to get the best answer from the forums.
We need:
1) Table scripts
2) Sample data
3) Expected...
September 27, 2011 at 6:12 am
jared-709193 (9/26/2011)
September 26, 2011 at 9:03 am
veenavidyakaran (9/26/2011)
Hi,privide me solution for dynamic change of column(Dealer1, Dealer2....) in the previous code i provided
Regards,
Veena Vidyakaran
You could use dynamic sql to build the UNPIVOT/PIVOT trick based on your actual...
September 26, 2011 at 6:31 am
nikethan1985 (9/26/2011)
Further i am planing to log the error , so raise error method will not be much helpful i think so .........
You're catching the error in the...
September 26, 2011 at 5:46 am
You code works only if strategy key is ever-increasing.
This should work regardless of that:
DECLARE @dim_strategy TABLE (
Strategy_id char(9),
efct_start_dt datetime,
efct_end_dt datetime,
strategy_key int
)
INSERT INTO @dim_strategy VALUES ('GT-537791', '2011-01-21 03:11:27.000', '2011-07-02...
September 26, 2011 at 4:40 am
This should do:
SELECT TOP(1) *
FROM publish.dim_strategy
WHERE strategy_id = 'gt-537791'
ORDER BY efct_end_dt DESC
September 26, 2011 at 4:15 am
Try this:
DECLARE @srvname varchar(100)
DECLARE @getDatabase CURSOR
declare @sql varchar(200)
SET @getDatabase = CURSOR FOR
SELECT srvname -- << No need for a variable here, let the cursor fetch it
FROM
master.dbo.sysservers
OPEN @getDatabase
FETCH NEXT
FROM @getDatabase...
September 26, 2011 at 3:58 am
You could also capture the error in the inner CATCH block and throw it again with RAISERROR:
BEGIN TRY
BEGIN TRY
EXECUTE usp_ExampleProc
END TRY
BEGIN CATCH
--SELECT ERROR_NUMBER() AS ErrorNumber
-- , ERROR_SEVERITY() AS ErrorSeverity;
RAISERROR(ERROR_MESSAGE(),ERROR_SEVERITY(), ERROR_STATE());
END...
September 26, 2011 at 3:55 am
In order to start a job, the user must be granted one of the fixed SQLAgent roles in msdb.
See here for more info:
http://msdn.microsoft.com/en-us/library/ms188283.aspx?ppud=4
September 26, 2011 at 3:51 am
vaithi.saran846 (9/25/2011)
Hi,Either through front end or back end query anything is enough.. Please send to me
Regards,
Vaithilingam.K
Based on Gail's suggestion, this should do:
SELECT cntr_value
FROM sys.dm_os_performance_counters
WHERE counter_name =...
September 26, 2011 at 2:14 am
GilaMonster (9/23/2011)
Gianluca Sartori (9/23/2011)
September 26, 2011 at 2:07 am
Jeff Moden (9/24/2011)
Apparently the OP has left the building. 😉
Elvis? 🙂
September 26, 2011 at 1:57 am
Ninja's_RGR'us (9/23/2011)
montyismobile (9/23/2011)
I would like to thank you for all your help with this cursor issue. When tested against the same data set your query produced identical...
September 23, 2011 at 10:58 am
montyismobile (9/23/2011)
I would like to thank you for all your help with this cursor issue. When tested against the same data set your query produced identical results...
September 23, 2011 at 10:56 am
GilaMonster (9/23/2011)
Gianluca Sartori (9/23/2011)
So, why does TaskManager display wrong info for sqlservr.exe? Is there a particular reason?
Yes, it's not a bug (not really)
I could plug Jonathan Kehayias's upcoming book that...
September 23, 2011 at 10:55 am
Viewing 15 posts - 2,611 through 2,625 (of 5,394 total)