Hi,
Currently we requires database Expert ( long term) for our project/business database.
Responsibility :
1- Continuous upgrade the database.
2- Update the query/datas.
3- Optimize the procedures etc
All payment is made monthly basis.
But , it is essential that , the provider we select for this task must have proper knowledge of SQL SERVER 2000/ 2005(most preferable).
To make the selection , please go through following sample question,and submit the result/[login to view URL] me very clear, no provider is selected/entertained over PMB who NOT submitted this question [login to view URL] is [login to view URL] selected Provider receive more details as well as contract copy for further [login to view URL] take it seriously.
QUESTION :
------------------------------------------------------------------------------------------------------------------------------------------
There are two tables, NAMES (ID INT IDENTITY(1,1), NAME VARCHAR(255)) and RELATIONSHIPS(NAMEID INT , PARENT_NAMEID INT) linked via
NAME.ID=[login to view URL] and where top-most name has a PARENT_NAMEID=0.
Show a nested list of names including LEVEL, NAMEID and NAME, where LEVEL indicates the nest level(or depth) from the top, as indicated in the expected output(below).You may use functions, stored procedures views and other Transact SQL commands compliants with Microsoft SQL 2000 / 2005 (prefered).Use the Sample data (below) for
your convenience.
SAMPLE DATA
NAMES table content:
ID NAME
--------------
1 Frank
2 Jo
3 Mary
4 Peter
5 Amy
RELATIONSHIPS table content:
NAMEID PARENT_NAMEID
-----------------------------
1 0
2 1
3 1
4 1
5 2
Expected Output:
LEVEL ID NAME
---------------------
0 1 Frank
1 2 Jo
2 5 Amy
2 3 Mary
1 4 Peter
------------------------------------------------------------------------------------------------------------------------------------------
Thank you