Viewing 15 posts - 526 through 540 (of 7,191 total)
I'd start by asking why he needs it. In an ideal world, developers wouldn't have any access to live systems, and certainly not elevated permissions like he's asking for.
John
April 18, 2019 at 11:40 am
DECLARE @TimeReported datetime = '1899-12-30 09:12:32.000';
DECLARE @NewTime time;
SET @NewTime = CAST(@TimeReported AS time);
SELECT @NewTime;
John
April 17, 2019 at 1:24 pm
Too many stalls - please flush the log. Maybe the mirror is out of sink - or could it be the operating cistern?
John
April 15, 2019 at 3:54 pm
Claude
A service pack includes all the service packs and cumulative updates before it. A cumulative update includes all cumulative updates before it since the previous service pack, if any.
John
April 15, 2019 at 7:41 am
You need a parenthesis to close your first CTE definition, and you need to separate it from the second one with a comma, not a semi-colon.
John
April 12, 2019 at 2:51 pm
An ETL operation? What does that look like - simple query with linked servers, an SSIS package, a custom application, something else? Is it possible that some non-SQL component is...
April 11, 2019 at 3:55 pm
Take the MAX and MIN status, grouped by ID. You can then write your CASE expression similar to how you've done above.
John
April 11, 2019 at 3:53 pm
I don't think you can get column headers natively in T-SQL. You'd need to use sqlcmd to do the export and then PowerShell or your favourite scripting language to add...
April 11, 2019 at 7:43 am
Just put SET QUOTED IDENTIFIER ON at the top of the command in your job step.
John
April 8, 2019 at 7:42 am
If you work out what the last Monday was, and what the first Monday in August was, you can do a datediff in weeks to get the week number There's...
March 29, 2019 at 9:42 am
You said you ran it in sqlcmd - that's effectively the same as running it in an SSMS query. Run the cmd utility in Windows, and execute the command there.
March 15, 2019 at 10:58 am
bcp is a command-line utility. Run it from a Windows command prompt, not as a T-SQL query.
John
March 15, 2019 at 10:52 am
I don't really know, but here's a guess:SELECT
'North Central' AS Region
, nh.Grouping_Level AS Grouping_Level
, (COALESCE(nh.MTDValue,0) - COALESCE(nn.MTDValue,0) ) AS MTDValue
, (COALESCE(nh.MTDTarget,0) - COALESCE(nn.MTDTarget,0)...
March 15, 2019 at 9:42 am
Create a user for the login in the same database as the stored procedures. Grant EXECUTE permission on the stored procedures to the user. If the stored procedures are all...
March 11, 2019 at 10:40 am
Check whether the SQLPS Powershell module is located in the folder specified in the PSModulePath environment variable. If it isn't, either change the environment variable to the actual path of...
March 11, 2019 at 7:37 am
Viewing 15 posts - 526 through 540 (of 7,191 total)