Viewing 15 posts - 16 through 30 (of 5,393 total)
One more thing: what happens when a row is updated in purchasedetail? Does that quantity have to be updated in products too?
And what happens when you insert a new...
-- Gianluca Sartori
October 14, 2016 at 2:14 am
Here is an example that you can use:
-- This is going to be your database
-- I'm using tempdb for this example
USE tempdb;
GO
-- I will create the tables for the sake...
-- Gianluca Sartori
October 14, 2016 at 2:06 am
Instead of selecting the MAX(id) and then allocating it by insertin a row with that id, insert the row directly.
-- Gianluca Sartori
October 12, 2016 at 6:53 am
richard.gardner 6009 (10/11/2016)
Obvs this is unsupported, but does it strike anyone immediately that this is a really dumb idea?
As long as it works, you should be fine. Things get compicated...
-- Gianluca Sartori
October 11, 2016 at 4:25 am
You'll need to remove any foreign key constraint on the detail table, add a new column with the new primary key on the master table, then update the foreign key...
-- Gianluca Sartori
October 10, 2016 at 2:55 am
Sure! Please post table scripts, sample data and expected output. See http://spaghettidba.com/2015/04/24/how-to-post-a-t-sql-question-on-a-public-forum/ for guidance.
-- Gianluca Sartori
October 7, 2016 at 6:58 am
Here is a script that does exactly that: http://www.replicationanswers.com/powershell.asp
-- Gianluca Sartori
October 6, 2016 at 4:29 pm
You SQL has already been converted to SQL Server: the ssma_oracle.trunc function seems to indicate that you used the SQL Server Migration Assistant (SSMA) for Oracle.
The function is erroring...
-- Gianluca Sartori
October 4, 2016 at 2:43 am
The (+) you had in your code seems to suggest thta you're attempting to outer join using the old style join syntax that has been deprecated since forever. Change that...
-- Gianluca Sartori
October 4, 2016 at 2:11 am
It groups by filegroup, sothe sum of all files in your case.
-- Gianluca Sartori
September 30, 2016 at 4:37 am
You can use my script here: https://spaghettidba.com/2014/09/05/database-free-space-monitoring-the-right-way/
It can be used in a SQL Agent job step, scheduled to run every 5 minutes (or whichever interval is appropriate for you) and...
-- Gianluca Sartori
September 29, 2016 at 4:32 pm
You're not running the latest build for SQL 2014. You're missing SP2 and CU1. Maybe the fix you're referring to is included in one of those.
I would test in a...
-- Gianluca Sartori
September 29, 2016 at 3:43 am
You can always PIVOT your results after splitting. Would that work for you?
-- Gianluca Sartori
September 29, 2016 at 3:09 am
You can use a splitter function like this one: http://www.sqlservercentral.com/articles/Tally+Table/72993/
-- Gianluca Sartori
September 29, 2016 at 2:34 am
No, sorry, it's not possible. What you want to grant is a database level permission and you'll need to add a user to each database for that, with the appropriate...
-- Gianluca Sartori
September 29, 2016 at 2:31 am
Viewing 15 posts - 16 through 30 (of 5,393 total)