Hi again,
I have it working, but I could not figure this part out. Query Analyzer throws an exception for XQUERY on this line of code:
SELECT
@max-2 = @x.query('
{ count(/Employees/Employee) }
').value('e[1]','int')
Right now I am passing the count but would like to dynamically obtain based on your example.
Thanks,
Alan