Don Benson sends in some T-SQL code he came across while hunting a bug:

If @Build = 1 and @Prop = 0
    Begin
        If @NonPropLev >= @BOMLevel
            Begin
                set @NonPropLev = @BOMLevel
                set @NonPParentMode = 1
            End
    End    
If @Build = 1 and @Prop = 0
    Begin
        If @NonPropLev >= @BOMLevel
            Begin
                set @NonPParentMode = 1
                set @NonPropLev = @BOMLevel
            End
End

Made ya look twice, didn't it? But, atleast we can be rest assured that @NonPParentMode and @NonPropLev will be properly set.

[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!