Quantcast
Channel: TSQL recursive query
Browsing all 6 articles
Browse latest View live

TSQL recursive query

Ideally it should be something like thisWITH Parent AS( SELECT [ParentID],ChildID,Value FROM [DynamicColsValues_TP1] WHERE ParentID IS null UNION ALL SELECT t1.[ParentID],t1.ChildID,T1.Value FROM...

View Article



TSQL recursive query

Hi DBALearner,In which column you are maintaining ChildId, if you are using value column for it then try below       WITH Parent AS( SELECT[ParentID],ValueFROM[DynamicColsValues_TP1]WHEREValue  IS null...

View Article

Image may be NSFW.
Clik here to view.

TSQL recursive query

Hi DBALearner, The problem can be the JOIN ON condition. Please see below correction basing on my assumption.DECLARE @DynamicColsValues_TP1 TABLE(ParentID INT,VALUE INT) INSERT INTO...

View Article

TSQL recursive query

sorry your code has only single field ParentID. Can I ask which field stores the child details?Please Mark This As Answer if it solved your issue Please Vote This As Helpful if it helps to solve your...

View Article

TSQL recursive query

Hi you can check this link for recursive call...

View Article


TSQL recursive query

Hi All,I need to write recursive query to find child of a parent until the last leaf. Below is my code. ;WITH Parent AS( SELECT [ParentID],Value FROM [DynamicColsValues_TP1] WHERE Value IS null UNION...

View Article
Browsing all 6 articles
Browse latest View live




Latest Images