Viewing 15 posts - 16 through 30 (of 67 total)
I always use the list provided by SSC. Just search "20xx Build List"
April 11, 2018 at 1:54 pm
Check out the ROW_NUMBER() function in BOL
April 4, 2018 at 7:24 am
check out this article:
March 30, 2018 at 9:45 am
Actually, I think the problem is your dynamic SQL doesn't recognize the variable (@Loop)
[code language="SELECT @cmd = 'use AEC_BPCS; IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE Type...
March 23, 2018 at 8:10 am
So your code now looks like this?:
[code language="SELECT @cmd = 'use AEC_BPCS IF EXISTS (SELECT 1 FROM sys.objects WHERE Type = ''U''' +
'AND name = '''...
March 23, 2018 at 8:04 am
Remove the single quote around @Loop = @Loop + 1
AND name = ''' + @TB + ''') BEGIN SET '@Loop = @Loop + 1' END' + ' ELSE '+
March 23, 2018 at 7:29 am
What is the source of data for this table? Look at INSERT BULK
March 23, 2018 at 7:07 am
SELECT REPLACE(CAST(FORMAT(CAST('123456789012345678901234567890123456789012345678901234567890' AS float),
'### | ###...
February 8, 2018 at 2:13 pm
replace(cast(FORMAT(cast(Column1 as float), '### | ### | ### | ### | ### | ### | ### | ### | ### | ### | ### | ### | ###...
February 8, 2018 at 1:41 pm
I'm not fond of the static years in this code. Perhaps it could be converted to a dynamic pivotdeclare @t table (
startdate date,
enddate date
)
February 8, 2018 at 12:41 pm
Trust is a hard thing to get back once it's lost. If I were given the freedom to try, I'd start with a handful of smaller "wins". If that doesn't...
February 7, 2018 at 9:05 am
In our case, we have two databases on the same instance. DB1 has encrypted data. DB2 accesses DB1 data via a view. The above code allowed for the retrieval of...
February 7, 2018 at 8:21 am
if your database has already been restored you should be able OPEN MASTER KEY DECRYPTION...
February 7, 2018 at 7:36 am
select
OrderID,
Items,
GroupID,
RunningTotalInGroup,
SUM(IncrBasket) OVER(ORDER BY groupID ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) as BasketID
from (
select
OrderID,
Items,
GroupID,
case lag(groupid) over (order...
February 6, 2018 at 12:41 pm
If you've got the default trace running and it hasn't rolled off yet, it might give you what you're looking for:
SELECT i.*
FROM sys.traces T
CROSS Apply ::fn_trace_gettable(T.path,...
February 2, 2018 at 12:39 pm
Viewing 15 posts - 16 through 30 (of 67 total)