I see, you are right, it doesn't work.
Seems like EA is doing something with the query before it is passed to the database.
I think you better ask Sparx support for help, I'm interested in seeing the solution as I'll probably need it in the near future.
We have just upgraded our database from SQL2000 to SQL2008, so I was never able to do CTE before.
As a dirty workaround I used a query with "enough" self joins to t_package to be reasonably sure I had all levels.
Something like this:
SELECT o.Object_ID as ID,o.Object_Type as Type,isNull(o.Name,'') as Name,ISNULL(t.value,0) as ImportanceLevel,isnull(o.Author,'') as Author,o.CreatedDate as Created,o.ModifiedDate as Modified,isnull(o.Note,'') as Documentation,isnull(o.Package_ID,'') as ParentID,isnull(p.name,'') as ParentName
,isnull(p9.Name +'.','') + isnull(p8.Name+'.','')+ isnull(p7.Name+'.','')+ isnull(p6.Name+'.','') +
+ isnull(p5.Name+'.','')+ isnull(p4.Name+'.','')+ isnull(p3.Name+'.','')+ isnull(p2.Name+'.','')+ isnull(p.Name,'') as QualifiedName
FROM t_object as o
left join t_objectproperties t on t.Object_ID = o.Object_ID
left join t_package p on o.Package_ID = p.Package_ID
left join t_package p2 on p.Parent_ID = p2.Package_ID
left join t_package p3 on p2.Parent_ID = p3.Package_ID
left join t_package p4 on p3.Parent_ID = p4.Package_ID
left join t_package p5 on p4.Parent_ID = p5.Package_ID
left join t_package p6 on p5.Parent_ID = p6.Package_ID
left join t_package p7 on p6.Parent_ID = p7.Package_ID
left join t_package p8 on p7.Parent_ID = p8.Package_ID
left join t_package p9 on p8.Parent_ID = p9.Package_ID
under the motto
10 levels of nesting packages should be enough for everyone Geert