Viewing 15 posts - 61 through 75 (of 670 total)
I'm not sure that will work. The CloseDatabase command takes source_database_name and target_database_name as parameters, so it creates a read-only copy on the same server.
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
November 30, 2020 at 9:50 pm
144 million reads and 70 million reads??!! How many rows are returned? Have you looked at the execution plan? This hits allresults twice, so doing rowcount twice
SELECT results.*,
(SELECT Count(*)
FROM...
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
November 23, 2020 at 2:25 pm
can you provide DDL and sample data to help. If they have multiple addresses but the same acct_id, then you can do something like
select Acct_id, count(1) from my_table group by...
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
November 13, 2020 at 1:56 pm
sounds like the volume has increased and they need to be rebuilt more often
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
November 4, 2020 at 9:22 pm
I would look here too
(convert(varchar, dateadd(hour, -6, sk.CreationDate),0) between @StartDate and @EndDate)
why converting dates to varchar? This will not use an index. I see @StartDate and @EndDate, but don't know...
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
November 4, 2020 at 7:40 pm
what is the compatibility level of the db?
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
November 3, 2020 at 7:13 pm
I think you're going to need a master proc that has this logic or SSIS. Then the proc could call the procedure 4 times and pass in the TransactionIDs that...
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
October 26, 2020 at 7:43 pm
If you provide DDL, samples data and expected results, we can help. Not sure what you have and what you are looking for in your description
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
October 26, 2020 at 1:43 pm
why would you need extra field in the join? Shouldn't the primary key and Record Source be enough?
Target.[HistoryDataPrimaryKey] = Source.[HistoryDataPrimaryKey] AND --
Target.RecordSource = Source.RecordSource AND
then
when matched and Target.LastSeenDate > @LastSeenDate...
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
October 21, 2020 at 6:04 pm
You can put it in a variable. Just not sure why you would need the NotExists part. What are you trying to accomplish? I don't know how you would get...
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
October 20, 2020 at 2:29 pm
Your SQL look right, but we don't have your data set, so it's hard to troubleshoot
Create table #t (ListDesc varchar(20), WeekOfMonth int, RecordCount int, MonthYearOf varchar(20))
insert into #t values
('EXP_PKG_1',1,100, 'April...
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
October 19, 2020 at 6:42 pm
Is it going to be impossible to discuss without sample data? If so, let me know and I will create a spreadsheet. If you have a test data generator...
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
October 14, 2020 at 3:10 pm
do you have any sample data and expected results?
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
October 14, 2020 at 2:17 pm
Please provide DDL and sample data. Pictures are great, but we cannot readily consume them to help with your query
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
October 14, 2020 at 1:45 pm
Your example works because it can convert it to Decimal (32,6). It rounded the last value. The try convert will return null if it can't convert it. ...
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
October 6, 2020 at 7:28 pm
Viewing 15 posts - 61 through 75 (of 670 total)