Hi,
This is my result set from which I would like to show an indented hierarchy:
Emp_Name Indent Mgr_ID Sub_ID Lft Rgt
William McMonigal 4 862336 862336 604 617
David Block 5 862336 627298 605 606
Joseph Hennessy 5 862336 862337 607 608...
Using this query, I got the indentation of everybody in the orgstructure. I just showed the data for one top level manager - W. McMonigal so that you can see the indentation for him and his subordinated who have the indentation of 5.
The query I made to get this indented Org Structure is...
Hi,
This question is related to AJAX. I am trying to display a list of products for the category "Beverage" using the Northwind database.
When I click on the link "Beverage", I get thie error - "Unknown runtime error". In the code below, I made the error line bold.
What is causing it?
My...
Hi,
I have 2 seperate queries from a nested table structure.
This query returns the emp and his subordinates.
SELECT s2.*, dbo.Employee.FirstName + ' ' + dbo.Employee.LastName AS Emp_Name
FROM dbo.Stack1 s1 INNER JOIN
dbo.Employee ON s1.employee =...
Hi,
I built indentation that would show the the hierarchy of the people in the org structure in the SQL Server database. So I have got rows with values like this:
Indentation Employee
1 4655
2 5623
2 8956
2...
Hi,
In the process of building a nested table from a adjancency table, I built indentation that would show the the hierarchy of the people in the org structure. So I have got rows with values like this:
Indentation Employee
1 4655
2 5623
2...
Hi,
I am trying to get a list of subordinates from a nested table model. What is the meaning of the bold part in the SQL query below?
SELECT P2.*
FROM Personnel AS P1, Personnel AS P2
WHERE P1.lft BETWEEN P2.lft AND P3.rgt
AND P2.emp = :myEmployee;
Thanks.
Hi,
Hi,
I have link on which I click and I am able to see all the products for the link. However when I refresh it, I need to click on the link 2 times and it displays and hides the products below the category link. Thereafter when I click on the link once, I get to show and hide the products...
Hi,
I built a small ASP page which pulls the top level category "Beverage" from Northwind database. When I click on the link, Beverage, I can see all the products that fall under the category "Beverage". However I would like to click on the link again to hide the products and click on the link...
Hi,
Can you please let me know what I am doing wrong in the ASP and AJAX part because I do not seem to be calling the AJAX function properly...
What I would like to see is onload of the page, I see only the top level category "Beverage" which is a link. When I click on the "Beverage", then I...
Is Row_Number() a function within SQL Server 2000?
I guess not, because it errs.
My code is:
INSERT INTO chain1(seq, emp, chain)
SELECT row_number() Over (order by chain) as seq,
emp,
chain
from Organization
Hi,
I get the error:
No column was specified for column 4 of 'organization'.
in the following code:
select * from
( select 1 as depth,
emp,
boss,
cast(rtrim(emp) as varchar (400))
from tree
where boss is null
union all
select a.depth + 1 as depth...
What is the syntax error near the WITH statement?
Thanks.
with organization (depth, emp, boss, chain)
as
( select 1 as depth,
emp,
boss,
cast(rtrim(emp) as varchar (400))
from tree
where boss is null
union all
select a.depth + 1 as depth,
b.emp...
Hi,
I request for form variables. I would like to grab all the values and dump into an array. How can I do that?
I am trying to modify this part of the code to my case. I request from another form. I do not request from a URL.
'/// Collect the Values wanted into the dictionary object
for i =...
I have a simple table Tree which has 6 rows of data. I want to convert this data to nested table Stack. But it seems that I am entering into an infinite loop. Any ideas what I am doing wrong...
--select member_subordinate, member_manager
--from amp_allmysubordinates_postings
--WHERE...
Hi,
Can anybody point me why I get the error
"Invalid Column Name - emp" error.
Thanks.
Table structures are:
Tree
create table tree
(emp Char(10) Not Null,
Boss Char(10));
Stack
CREATE TABLE Stack
(Stack_top INTEGER Not Null,
emp Char(10) Not Null,
Lft Integer NOT NULL UNIQUE CHECK (Lft...
Hi,
I would like to convert my adjancey set model to a nested set model with a left and right.
I understood this part.
Root Node is always with a a Left = 1, right = 2*(Select Count(*) from Table)
How do the leaf node get the left and right numbers.
I was reading an article of Joe Celko...
Hi,
I am building a sample ASP page which pulls from the Northwind database where I display the category Beverage and on click of the "Beverage" link, I can pass the category id to the sql statement to display the products which fall under the "Beverage" category. Now I want to include AJAX to...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.