Viewing 15 posts - 1,171 through 1,185 (of 6,679 total)
Simple - by default when SQL Server is installed (all Editions) only those members added during the install are granted sysadmin rights to the SQL instance. Unless someone with permissions...
April 8, 2021 at 3:32 pm
We can brute force this using CHARINDEX:
Declare @pDelimiter char(1) = ',';
Select a.TreePath
, Level1 = ltrim(substring(v.treePath, 1, p01.pos - 2))
...
April 7, 2021 at 6:37 pm
Not sure where you got that code - but it is not something I would recommend using. There is no reason to build up the SQL connection when we have...
April 7, 2021 at 6:14 pm
Using Invoke-SqlCmd you specify the server instance, the database, the authentication (defaults to windows authentication), the query and the variables. Fixing up your SQL code - here is how that...
April 6, 2021 at 9:03 pm
Yes - you can use SSRS 2019 and connect to your 2012 instance as well as any other instance in your domain. Create a new server, install the database engine...
April 1, 2021 at 2:43 pm
Yes - Windows Update does include SQL Server updates. Normally they are optional - but it all depends on how you have this setup and configured in your environment. It...
March 31, 2021 at 5:07 pm
The DNS CNAME only references the IP address - which is the SQLA to SQLB portion of an instance name. To resolve the instance name change you will need to...
March 31, 2021 at 5:03 pm
Interesting - you must have started SQLCMD window and not a DOS command window. That isn't an option on my Windows 10 system - but doesn't really matter.
Download...
March 31, 2021 at 3:49 pm
If you are able to run SQLCMD and login - then you should be able to download SSMS and use that to access the system. You said you were able...
March 31, 2021 at 2:35 pm
SO I created a table in SQL that has many of the key fields
doc_bu doc_tp doc_filename doc_date doc_type
The doc_filename has the file name that the PS script found, and...
March 30, 2021 at 7:49 pm
So now you want a column named 'User' with the value 'Total Minutes' - where before it was 'Report' and in your original code is was the user name. I...
March 30, 2021 at 3:27 pm
I don't understand what results you want. Please provide sample data and expected results.
If you have a question on the code, then show which code and your question.
March 29, 2021 at 10:45 pm
A single query can't return a variable number of columns. It would have to reflect one column for every month of the year and a total at the...
March 29, 2021 at 10:02 pm
This is what you had in your original query:
SELECT ISNULL([User],'UNKNOWN') as td,''
That is not a 'dummy' value...but if you really just want a dummy value - then use this:
March 29, 2021 at 8:49 pm
You could change your function to this:
CREATE FUNCTION [dbo].[fnGetSeconds]
(
@TimeFormatted varchar(10)
)
RETURNS Table
WITH schemabinding
AS
RETURN
SELECT (LEFT(@TimeFormatted,2)*3600) +
ROUND(DATEDIFF(MS, 0, '00'...
March 29, 2021 at 8:41 pm
Viewing 15 posts - 1,171 through 1,185 (of 6,679 total)