Viewing 15 posts - 661 through 675 (of 7,191 total)
SQL Server Reporting Services (SSRS) will do this for you. Other similar products are available. Even Excel could do it, although I don't necessarily recommend using that.
John
September 25, 2018 at 8:29 am
SELECT TOP 1 PERCENT h.SKU
...
John
September 25, 2018 at 8:17 am
Did you try running that? It won't work, because you don't have a GROUP BY. You shouldn't need the self-join, either.
SELECT name, sponsor, MIN(Date_of_call)
FROM MyTable
September 17, 2018 at 4:23 am
And your question is?
Allow me to preempt. You don't need a cursor - instead, use the MIN function with GROUP BY. Give it a go, and post back...
September 17, 2018 at 1:49 am
If you do an outer join between the source table and the target table, you can insert only the rows that don't already exist.
John
September 7, 2018 at 9:19 am
I'm guessing blocking. Is anything else running on the server when you do this? Try capturing sys.dm_os_waiting tasks as frequently for lock-related wait types as you can, and see whether...
September 6, 2018 at 7:21 am
You can adapt the query on this page to return queries that took more than 20 seconds. Create a job to run regularly (maybe every five minutes) and...
September 6, 2018 at 2:02 am
It should all be taken care of. If you've got any locations for backups or file exports, for example, that are outside the core folders, then you may need to...
September 5, 2018 at 9:59 am
I don't know what you mean by "truncate". Truncating the transaction log is deprecated and in any case would only be a temporary solution. Set the database to Simple recovery,...
August 23, 2018 at 2:22 am
Either back up the transaction log of msdb regularly, or (preferably) set the database to Simple recovery. It should then be safe to implement whatever method you use to purge...
August 23, 2018 at 1:56 am
Have you tried some of the parameters described here? INSTALLSHAREDDIR and INSTANCEDIR look as if they may be what you're looking for?
John
August 22, 2018 at 1:57 am
Just add a unique constraint on c_id, month and year. If you've got identity columns throughout your database then you'll want to look at putting a unique constraint on the...
August 20, 2018 at 9:10 am
Oh rats - forgot to post the script!
It's my script that will mangle stuff, not yours. However, it'll do it all in one go instead of using a...
August 17, 2018 at 9:37 am
Try this. Run the query, then copy and paste the results into another query window, inspect, then run. You may find it mangles "&" or "<" or ">" signs, so...
August 17, 2018 at 8:50 am
Viewing 15 posts - 661 through 675 (of 7,191 total)