Viewing 15 posts - 556 through 570 (of 7,187 total)
Use the sys.server_role_members (that may or may not be the exact name - I can't remember) catalog view to script out the members of the sysadmin server.
John
January 21, 2019 at 2:05 am
In Object Explorer, navigate to Security -> Logins. Open the Object Explorer Details window. Select all logins, or just those you want to script. Right-click, and choose Script Login as.
January 16, 2019 at 1:50 am
Your INSERT statements will fail unless you turn IDENTITY_INSERT on.
Why don't you just create LogTable as a view, and then it's always correct without your having to update...
January 11, 2019 at 1:46 am
Your SELECT statement is just selecting the dynamic SQL, not setting it. Try changing SELECT to SET @sql =
John
December 27, 2018 at 9:20 am
I'll hit...
December 21, 2018 at 2:00 am
Well, my guess would be yes. But you're the one with the SQL Server 2000 computer - why not try it? You won't break anything.
John
December 17, 2018 at 1:48 am
I think this is what you're looking for.
John
December 14, 2018 at 9:41 am
December 3, 2018 at 8:30 am
No, I agree - it would need to be the first column in the key. But like I said before, it's not needed at all, unless the product ID PD1...
November 30, 2018 at 8:43 am
Danny
Use REPLACE to replace '-00' with '-20'.
Edit: and then change the data type to date so you don't get this happening again.
John
November 30, 2018 at 5:21 am
I'm not sure there's any more efficient way than that. You'll probably need indexes on the columns in the GROUP BY clause and in the join predicates as the number...
November 30, 2018 at 2:15 am
Sam
Looks like you need to do a bit of normalising first - you shouldn't have ProductID and productname in a table of sales. Assuming changing that isn't an option,...
November 29, 2018 at 7:16 am
I would guess that Profit_Percent and Commission_Percent have character data types, and there's values in one or both of them that can't be converted to decimal(10,2).
John
November 28, 2018 at 8:24 am
Thanks again.
I've been trying to find a better way to look at the FROM statement. I've always...
November 27, 2018 at 1:48 am
Might be worth trying querying the plan cache. Have a look at the query on this page, and put total_logical_writes in the query. Then, in the result set, look for...
November 26, 2018 at 9:14 am
Viewing 15 posts - 556 through 570 (of 7,187 total)