Viewing 15 posts - 586 through 600 (of 13,445 total)
I see your query failed a syntax check; when i reformatted it, i see you got three trailing ,0), as if they were part of NULLIF/COALESCE, but you need only...
February 25, 2017 at 6:48 am
your code, i guess is a web page, script task or application, has to pass the parameters.
here's an untested modification of some code i had to help get you...
February 25, 2017 at 6:37 am
i know power shell has a function FromFileTime that can convert that wierd value( #ticks?) to datetime
i've sued this expression:
Expression={[DATETIME]::fromFileTime($_.accountExpires)}}
$Results = Get-ADUser -Filter...
February 24, 2017 at 2:56 pm
I assume you are running the script in SSMS, right?
I've seen the same behavior in a script that was 46K lines of inserts for a zipcode database.(INSERT...VALUES)
run it...
February 24, 2017 at 1:39 pm
I'd definitely consider moving any file or renaming operations into SSIS and not use TSQL to do it. better error handling occurs there.
i'd think it might be a concurrency...
February 22, 2017 at 7:32 am
the single quote is SQL's delimiter for identifying strings, so you have to escape it by repeating it twice in a row, where you want it to exist inside your...
February 21, 2017 at 2:00 pm
I'm having some trouble with this running it against a SQL2016 server. just limiting it to one specific issue for now, scripting the definitions for the databases themselves, and not...
February 21, 2017 at 9:13 am
LTRIM + RTRIM is your problem.
all those LTRIM + RTRIM force the results to be varchars, regardless of what the original data types are. .
if the values were...
February 21, 2017 at 7:30 am
it's true that SELECT INTO will have the datatypes preserved, but it depends on what the source is doing.
CONVERT functions ,ISNULL, or implicit conversions in a query(due to unions?)...
February 21, 2017 at 6:56 am
use a case statement and don't parse it when the period does not exist.
SELECT MachineName,
CASE
WHEN CHARINDEX('.', MachineName) > 0
...
February 20, 2017 at 2:01 pm
First, change all those table variables to temp tables.
The Query engine assumes that a table variable has one row in it, and builds a plan which assumes that one...
February 20, 2017 at 6:30 am
also i use this proc to update the job description of SSRS subscriptiosn to have the report name; makes it a LOT easier to track down.
it uses dynamic SQL...
February 14, 2017 at 11:44 am
you could also create a subscription in Standard edition, and use a SQL Agent job to call the subscription job if the criteria is met.
so assume you create...
February 14, 2017 at 11:39 am
There's more than one way to do that.
in my case, the convert function would work nicely, if you include the optional code:
SELECT CONVERT(varchar(10),getdate,112) , where you replace getdate()...
February 14, 2017 at 10:56 am
Viewing 15 posts - 586 through 600 (of 13,445 total)