Viewing 15 posts - 1,381 through 1,395 (of 2,645 total)
Can you wrap the entire job in a TRY CATCH blocks?
In the try block begin and commit the transaction
In the catch block rollback and re-throw the error.
This would...
September 28, 2019 at 5:55 pm
Can you wrap the entire job in a TRY CATCH blocks?
In the try block begin and commit the transaction
In the catch block rollback and re-throw the error.
I don't...
September 28, 2019 at 12:46 am
Can you wrap the entire job in a TRY CATCH blocks?
In the try block begin and commit the transaction
In the catch block rollback and re-throw the error.
September 27, 2019 at 8:08 pm
SQL Server caches the execution plan of queries, it may recompile a query a different way if it is executed at different times.
If there is any difference in the text...
September 27, 2019 at 7:54 pm
CREATE VIEW [dbo].[vwstudent]
AS
SELECT STD.ID,
STD.StudentId,
CASE WHEN STD.EfDate <= c.value THEN DATEADD(MONTH, -2, STD.EfDate)
...
September 27, 2019 at 7:50 pm
That seems a very odd requirement. Are you sure your users really know what they want?
September 27, 2019 at 4:19 pm
If you are using SQL 2008 you can't use LEAD and LAG. I think you might be able to use the windowed SUM function though.
;WITH Data AS
(
...
September 27, 2019 at 1:42 pm
CREATE PROCEDURE #TestDW
(
@CheckDayOfWeek bit = 0
) AS
IF @CheckDayOfWeek = 0 OR DATEPART(dw,GETDATE()) IN (3,6) BEGIN
PRINT 'Hello'
...
September 27, 2019 at 12:25 pm
UPDATE a
SET a.invalid = 1
FROM aaaMyTable a
WHERE EXISTS(SELECT *
...
September 26, 2019 at 10:53 am
1. Does Rebuilding a clustered index, will rebuild all non-clustered indexes as well on that table?
After rebuilding a clustered index you might also need to rebuild all the non-clustered...
September 26, 2019 at 10:29 am
This is equivalent SQL to yours, but instead of checking the left join column in the WHERE to be NULL or equal to something else, you might as well check...
September 24, 2019 at 4:52 pm
;WITH x AS
(
SELECT *
FROM (VALUES ('Flat 1','25 My Street',''),
('33...
September 22, 2019 at 6:37 pm
Where you have:
Convert(CHAR(4),row_number() over (partition by Reg_Type order by PolicyRef@))
replace it with:
RIGHT('0000'+Convert(VARCHAR(4),row_number() over (partition by Reg_Type order by PolicyRef@)),4)
September 16, 2019 at 3:29 pm
As this occurred on the Production Server,I am unable to provide the sql plan.
Then there's not much we can do for you.
If the OP runs the query...
September 14, 2019 at 1:43 am
As this occurred on the Production Server,I am unable to provide the sql plan.
Then there's not much we can do for you.
If the OP runs the query I provided...
September 13, 2019 at 7:04 pm
Viewing 15 posts - 1,381 through 1,395 (of 2,645 total)