Hi,
I have a table contains :
ID , AccountParentID , AccountNumber , AccountName
this table is self-refrenced , I want to populate data of this table in treeview .
the most important thing is that the root ID = 1 and the root AccountParentID = 1 too .. and I cant change its parent to 0 or something else because of the group I work with ..
So, I want a way to populate the treeview in this case THE ROOT NODE IS PARENT OF ITSELF.
Thanks in advance...
Loading
naura paxPosted Jun 26, 2009, 8:03 AM
As far as I understand you can bring the desired resultset in the query.
Select ID , AccountParentID , AccountNumber , AccountName
Where AccountParentID=1 and ID=1
Union All
Select ID.. your query goes here
where ID>1
Please correct me if i'm wrong.