I have two tables. One is parent and another is children.Below is Schema and Data of Parent.ID RootDirectory1 ah2 201007143 ahcmsmp.fof4 00050355.bat5 00050356.bat6 00050357.bat7 ahcmsnsp.fof8 00050347.bat9 ahcmssp.fof10 00050346.bat
Below is schema of childrenID ParentDirectoryID ChildrenDirectoryName1 1 201007142 2 ahcmsmp.fof3 3 00050355.bat4 4 00001.tif5 4 00002.tif6 4 00050356.bat7 5 00001.tif8 5 00002.tif9 5 00050357.bat10 6 00001.tif
these two tables hold my directory which is as follows ah ->20100714->ahcmsmp.fof->00050537.bat->1.tif. So i need a query such that i can display ah as root group then 20100714 as next group then .fof folders as next group then .bat folders as next group and finally the count of tif in each .bat folders.Please not AH root dir can have multiple directories , then child of AH that is 20100714 can also have multiple .fof directories and .fof can have multiple .bat directoriesAH 20100714 ABC.FOF 1.BAT 33 2.BAT 44 3.BAT 45 DEF.FOF 1.BAT 1
I want above as out put. so ineed query for the same amit Ranjan