Viewing 15 posts - 61 through 75 (of 78 total)
One more option is to use CTE to generate dates
Declare @StartDt as Date,
@EndDt as Date
Set @StartDt = '2017-07-01'
Set @EndDt= '2017-07-31'
;WITH CTE_DatesTable
August 25, 2017 at 12:40 pm
CTE and cross apply looks good option
with CTE as
(
SELECT
GroupVal,
(
SELECT MAX(v)
FROM (VALUES (Val2), (Val3), (Val4)) AS VALUE(v)
) val
FROM #Temp
)
select...
August 25, 2017 at 11:03 am
BCP error output file (.err) is the best place to start the analysis.
August 25, 2017 at 8:50 am
My understanding is you need to aggregate data and then do some calculation on top.
You can use CTE for your below group by query. this will not optimize your...
August 25, 2017 at 8:09 am
GilaMonster - Wednesday, August 16, 2017 1:27 PM
Nice article.
For that reason, we run stats on some of the tables nightly...
August 24, 2017 at 2:30 pm
Did you ran that script in all DBs? your proc may in different DB .
you can search in SQL jobs
select * from msdb..sysjobs j
inner join...
August 24, 2017 at 2:05 pm
August 24, 2017 at 1:41 pm
You can use variable as numeric number and it should work, and for else part use some higher number. With this you can avoid dynamic query
declare @i int...
August 24, 2017 at 11:37 am
You can use STRING_SPLIT function to split the values and use outer apply to join with function. I have used 100 in the FieldVal column to parse to avoid one...
August 23, 2017 at 1:02 pm
There are 2 issues
1. You can not create a function with SCHEMABINDING which reference function which is not SCHEMABINDING. so function 2 cant be created since function 1 is not SCHEMABINDING.
August 23, 2017 at 10:39 am
Nice one... Initially I thought it is true, but good one the way you turned it down. But of course hope will get something similar in near future. It...
April 1, 2014 at 5:24 pm
Tricky one.
But answer should be raleatd to either Login created or fail. we can not have both. like falied, but if created policy would ignore.
March 28, 2014 at 12:13 pm
if both differnt sessions/ activities are going to update both tables TableA and TableB, then ofcourse locking will heppan. based on number of rows, DB isolation level, processing time of...
March 27, 2014 at 10:21 pm
Viewing 15 posts - 61 through 75 (of 78 total)