valiate each parent intermediary is also a parent to itself

  • I have a table for which I want to validate where each parent intermediary is also a parent to itself. I want to write a query to validate this...

    COLUMN DATATYPE DESCRIPTION

    IntermediaryPK int

    SourceSystemID tinyint Intermediary source

    IntermediaryID nvarchar(20) Intermediary ID

    IntermediaryName nvarchar(200) Intermediary name

    IntermediaryTypeID nvarchar(1) Intermediary type

    ParentIntermediaryID nvarchar(20) Intermediary parent

    IntermediaryTypePK tinyint Intermediary type

    IntermediaryCategoryPK smallint Intermediary category

    ParentIntermediaryPK int Parent intermediary PK

    GrandParentIntermediaryPK int Grand parent intermediary PK

    I want to write validation Query which should return invalid parents I If any..

  • First, please read this and post enough information: http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

    Second, post in a forum appropriate to your question. T-SQL questions have a forum.

    Note: Moved to 2008 T-SQL forum

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply