Viewing 15 posts - 3,256 through 3,270 (of 7,609 total)
right now deletes the current and previous month, where the table holds 2.5 yrs of data. These tables currently do not have any keys, constraints o[r] indexes.
Cluster...
July 17, 2018 at 11:40 am
When you add the keyword, you're probably preventing the physical shrinking. If you really want to shrink, just shrink:
DBCC SHRINKFILE (N'prod1', 0)
I wouldn't use 0 personally...
July 17, 2018 at 11:35 am
set ansi_nulls off
I'm trying to find a way to avoid having to use isnull() or coalesce() everywhere in my script in order to avoid counterintuitive null comparison results...
July 17, 2018 at 11:31 am
July 17, 2018 at 8:18 am
I swear I posted this already (somewhere at least!, another SQL help site perhaps?), but I'll post it here too just in case:
SELECT EmployeeInformationID, COUNT(*)...
July 13, 2018 at 3:37 pm
Thanks for all of your input, folks.
@ScottPletcher , I'm able to somewhat understand your solution,...
July 12, 2018 at 12:53 pm
July 12, 2018 at 12:35 pm
Although not considered "standard", I prefer this approach because (1) the FETCH only has to be written once (can't count the number of times someone changes only one FETCH when...
July 12, 2018 at 11:00 am
Rather than repeatedly having to identity the post code, add an AFTER INSERT, UPDATE trigger that finds the post code and then store its byte location and length in a...
July 12, 2018 at 10:55 am
The way I read it, you could have letters on both the front and the back of the string. This CASE code handles that situation as well:
[code...
July 12, 2018 at 10:25 am
A tightly-written standard scalar function is another option. I'll give you mine. But you'll have to add the UK post code part to it, since this code was not written...
July 12, 2018 at 10:11 am
Did you verify that all the constraints are "trusted"? If not trusted, perhaps that could cause an issue.
July 11, 2018 at 11:13 am
A cross tab will do it nicely.
SELECT
MAX(CASE WHEN rowOrder = 1 THEN xImage END) AS xImage1,
MAX(CASE WHEN rowOrder...
July 10, 2018 at 2:55 pm
If the app/person/whatever doing the UPDATE is not a sysadmin, (or perhaps a dbo, not sure on that one), maybe you can just DENY UPDATE on that column:
July 10, 2018 at 11:43 am
Another option is to create a proc in master named sp_<whatever> (the name must start with sp_), mark it as a system proc, then you can execute from any db...
July 10, 2018 at 11:33 am
Viewing 15 posts - 3,256 through 3,270 (of 7,609 total)