Viewing 15 posts - 1,276 through 1,290 (of 13,460 total)
I have this old snippet form a post from years ago.
both this and your example are non-sargable, meaning it's going to table scan for the values, which is what full...
Lowell
February 18, 2016 at 6:22 am
I've used the answer below to get the Active Directory password policy via powershell:
import-module ActiveDirectory
Get-ADDefaultDomainPasswordPolicy
PS H:\> Get-ADDefaultDomainPasswordPolicy
ComplexityEnabled : True
DistinguishedName ...
Lowell
February 15, 2016 at 10:30 am
also, does the table inside follow some sort of naming convention, but is dynamic?
for example a table named [Invoices_2016-02_14] from yesterday, but it's [Invoices_2016-02_15] from today?
if you can determine...
Lowell
February 15, 2016 at 5:27 am
mw112009 (2/12/2016)
Lowell:The one I picked ( I did a quick search ) uses the following objects.
You mentioned stuff from INFORMATION_SCHEMA is lacking some info.
Can you mention a few ?
INFORMATION_SCHEMA.TABLES
INFORMATION_SCHEMA.COLUMNS
INFORMATION_SCHEMA.COLUMNS
sys.identity_columns
sys.columns
information_schema.table_constraints
sys.indexes
it's in...
Lowell
February 12, 2016 at 8:37 am
I went deep, deep down this rabbit hole, and built a procedure that i can call from tsql .
tin the long run, you have to use the sys. schemas and...
Lowell
February 12, 2016 at 8:11 am
not suspicious; it sounds like a missing GO statement between drop create procedure and drop/create function in someones script.
it happens to us all at some point
IF OBJECT_ID('[dbo].[sp_Bad]') IS NOT NULL...
Lowell
February 11, 2016 at 11:49 am
if not too much time has passed, the default trace would have the DROP FUNCTION event, complete with whodunnit information; you might have an automated process, or someone may just...
Lowell
February 11, 2016 at 7:22 am
easy fix.
if the function has no parameters, you still need the parenthesis for the parameter list.
alter FUNCTION [dbo].[fnPressGaneyDownload] ()
your function could easily be converted to an inline table value function,...
Lowell
February 9, 2016 at 6:20 am
I'm on the SQL cruise with limited internet, but i'll put together an article;
I tend to shy away from articles, hate getting criticism.
At my job, we just joined two AD...
Lowell
January 31, 2016 at 4:46 am
in my case, I remove the users and logins from SQL Servers, but they stay forever in Active Directory.
I've got a nifty powershell i wrote that imports Active directory data...
Lowell
January 28, 2016 at 10:32 am
there is a neat opportunity here to use the OUTPUT clause;
it allows you to capture things like new guids or identities into a table, and then consume it on a...
Lowell
January 27, 2016 at 12:12 pm
hlrx (1/25/2016)
GilaMonster (1/23/2016)
hlrx (1/22/2016)
For example, this compiles and runs fine in one batch:[font="Courier New"]CREATE TABLE test1 (col1 INT NOT NULL)
ALTER TABLE test1 ALTER COLUMN col1 INT NULL
INSERT test1 VALUES (NULL)
GO[/font]
Yes...
Lowell
January 25, 2016 at 9:09 am
vsamantha35 (1/25/2016)
Today came across an issue. Database mail alerts on job failures was not been sent. Checked the dbo.sysmail_faileditems and found that it was failing with authentication error.
Basically,...
Lowell
January 25, 2016 at 6:22 am
if you added a table named Customer_Invoice, you would get the error
Conversion failed when converting the nvarchar value 'Invoice' to data type int.
Luis hit the nail on the head: you...
Lowell
January 22, 2016 at 10:58 am
untested, but this might give you an idea.
percentage is # ontime / Total,typically limited by a period of time (a month?)
due to integer division in SQL, you need to convert...
Lowell
January 22, 2016 at 7:15 am
Viewing 15 posts - 1,276 through 1,290 (of 13,460 total)