Viewing 15 posts - 2,581 through 2,595 (of 7,187 total)
Please post what you've already tried so that we can see what you're struggling with. If it's getting the time difference, use DATEDIFF. If it's getting a corresponding...
May 31, 2016 at 3:00 am
Sysprocesses is a view of the processes that are running on SQL Server. You can't update it. If you want to stop any of those processes running, use KILL....
May 31, 2016 at 2:57 am
So you see that error message when you attempt to do the restore? Please will you post the RESTORE statement that you're running?
John
May 26, 2016 at 9:31 am
Well, you could fiddle about with an SSIS package or linked servers or similar wizardry, but I think the way I'd do it is to build the INSERT script on...
May 26, 2016 at 9:23 am
We can't see your screen, and we can't read your mind, so this is all guesswork, but how about this?
WITH Numbers AS (
SELECT n
FROM (VALUES (1), (2), (3), (4), (5))...
May 26, 2016 at 9:19 am
Something like this?
WITH Numbers AS (
SELECT n
FROM (VALUES (1), (2), (3), (4), (5)) x(n)
)
SELECT n
FROM Numbers n
JOIN T1 s
ON n >= Serial_Number
AND n <= End_Serial_Number
WHERE Serial_Number = 1
John
May 26, 2016 at 9:00 am
If you run a trace to capture failed logins, you'll get all sorts of extra information, such as the name of the application that's trying to connect (if the application...
May 26, 2016 at 8:21 am
DesNorton (5/26/2016)
Depending on your business rules .....If you do fire on UPDATE, you may need to confirm whether NICKNAME has been edited before, and then not change it.
drew.allen (5/26/2016)
May 26, 2016 at 7:41 am
You don't need table1 at all, do you, since everything is contained in table2? You didn't specify expected results, but here's a guess:
WITH Lengths AS (
SELECT
code
,code_name
,ROW_NUMBER() OVER (PARTITION BY...
May 26, 2016 at 7:26 am
DesNorton (5/25/2016)
Create a standard column [NICKNAME]
Create an INSERT trigger that sets [NICKNAME] = [LASTNAME] + ' ' + [FIRSTNAME]
Then the column is available...
May 26, 2016 at 7:09 am
Sergiy (5/26/2016)
Source may be not even needed, if it's a clustered index.
Yes, that's true. You only want the actual key columns.
John
May 26, 2016 at 5:25 am
Sergiy (5/25/2016)
And from looking at the overall design I can conclude the clustered index on ReportItem must be(report_id, flow_name, report_item) INCLUDE (source)
Do you mean (report_id, flow_name, report_item, source)? ...
May 26, 2016 at 4:30 am
onlo (5/26/2016)
I have to run sp_change_users_login, otherwise, I can't add the db_owner right to the user: "user already existed ...."
But the user is dbo already, so you don't need to...
May 26, 2016 at 4:24 am
Yes, you need to reinstall as Standard (or build a new server and install on there) and then restore the databases on it, including the system databases. First, though,...
May 26, 2016 at 3:53 am
If userabc has just restored the database, then it's going to be the database owner (dbo), so you shouldn't need to run sp_change_users_login. Unless I've missed something, that is....
May 26, 2016 at 2:59 am
Viewing 15 posts - 2,581 through 2,595 (of 7,187 total)