Hi,I've had a search around the web, forums and everywhere else I can think to get a solution to this and I'm sure I've just missed the obvious so I apologise if I have.Basically I'm messing around with the Tree's and Hierachy code from Seventh Knight and would like to use the results to get all the relevant categories from the results but whatever I try I get "An INSERT EXEC statement cannot be nested"Here's what I've got so far:CREATE TABLE #temptable( PlaceID int, URLPath nvarchar(1000), PlaceName nvarchar(255) default(''))insert into #temptable EXEC Places_Get_ByURLString_Children_NextLayer 'TestArea/TestSubArea/'select * from #temptable --join to records table... etcdrop table #temptableThen the SProc (for completeness)CREATE PROCEDURE Places_Get_ByURLString_Children_NextLayer( @URLPath nvarchar(1000))AS--Set @URLPath = 'England/GreaterLondon/'CREATE TABLE #paths( path nvarchar(1000), URLPath nvarchar(1000), ParentID int, PlaceID int, PlaceName nvarchar(255) default(''))--Insert the path dataINSERT INTO #paths EXEC Places_Get_AllDeclare @nodeId int, @pad nvarchar(100), @lastCnt intSet @Pad = '0000'Set @nodeId = 0IF EXISTS(SELECT PlaceID FROM #paths WHERE URLPath = @URLPath)Begin SELECT @nodeId = PlaceID FROM #paths WHERE URLPath = @URLPathEnd--Select the children of the current locationSelect distinct B.PlaceID, A.URLPath, B.PlaceNameFrom #paths as AInner Join Places as B On A.PlaceID = B.PlaceIDWhere A.ParentID = @NodeIdDROP TABLE #pathsNow am I right in saying that this error is coming about because I'm using temp tables within the SProc to build the results and the only way around this is to include all that code in my new SProc (so duplicating the work and maintenance) surely thats not right is it?Thanks for your advice in advance.Tim