Viewing 15 posts - 346 through 360 (of 557 total)
Gazareth (8/4/2015)
For cases where there are children, you can avoid violating constraints by deleting in child -> parent order as I specified.
No date gets deleted. All data has to move...
August 4, 2015 at 3:53 pm
Gazareth (8/4/2015)That's really really easy then, probably the best case scenario. Merge the duplicate top levels based on whatever rules you have for this situation then delete the one with...
August 4, 2015 at 5:26 am
Gazareth (8/4/2015)
Either of these should work, but you're back to the problem of determining column names:
Yes back to the problem of determining the column names. And then de solution becomes...
August 4, 2015 at 5:12 am
ChrisM@Work (8/4/2015)
ScottPletcher (8/3/2015)
You can cancel the identity property by using a union or union all:
select top (0) * into #D from D1 union all select top (0) * from d1
insert...
August 4, 2015 at 2:29 am
Sean Lange (8/3/2015)
In your example of being unable to move data it is easily solved by moving the bottom most level to one of the existing accounts. Do the same...
August 4, 2015 at 1:06 am
Luis Cazares (8/3/2015)
If a constraint prevents actions that are valid, it's a design fault. Can you give an example on a constraint that prevents actions which are functional?
We have clients,...
August 3, 2015 at 8:53 am
Grant and Jeff,
Next to showering this weekend I finished a book, and enjoyed that very much. It does anwser a lot of questions, most questions are anwsered extensively, none of...
August 3, 2015 at 8:32 am
Grant Fritchey (8/3/2015)
Don't get hung too much on PLE.
Thanks for you reply.
I do tend to get hung up to much by 'numbers' in general, and like to understand how these...
August 3, 2015 at 7:12 am
This weekend I have been away from the keyboard. And as often the best idea's occure when away from the keyboard. E.g. on my bike (pushbike) or under the shower....
August 3, 2015 at 1:50 am
Enforcing constriants often prevents actions. Most of the time it prevents 'illegal' actions. But sometimes it prevents actions, which are functional.
In general I am in favor to enforce constraints in...
August 3, 2015 at 1:42 am
Sean Lange (7/31/2015)
July 31, 2015 at 3:02 pm
All thanks for your contributions.
Luis Cazares, thanks for your solution. Next monday I'll study it and try it.
Although not simple, I probably could wrap this up in a stored procedure.
If...
July 31, 2015 at 1:57 pm
;
With
A as (
SELECT
ROW_NUMBER() OVER(PARTITION BY PartNumber, MfgSerialNumber ORDER BY InspectionDate desc) subnumber
,*
FROM TestGroup
WHERE PartNumber...
July 31, 2015 at 9:07 am
Thanks again.
Did not realise that a select top 1 would count as a 'scan'.
I do use the TOP a lot, but not in a production environment. (At least not without...
July 31, 2015 at 7:34 am
GilaMonster (7/30/2015)
A key/rid lookup is done to fetch columns which are not present in the index used. It's not related to a seek, you can get index scans with key...
July 30, 2015 at 10:11 am
Viewing 15 posts - 346 through 360 (of 557 total)