Click here to Skip to main content
15,912,400 members
Home / Discussions / Database
   

Database

 
AnswerRe: sql querry Pin
Colin Angus Mackay14-Jan-07 22:36
Colin Angus Mackay14-Jan-07 22:36 
AnswerRe: sql querry Pin
asoooool15-Jan-07 2:06
asoooool15-Jan-07 2:06 
AnswerRe: sql querry [modified] Pin
PavanPareta18-Jan-07 19:03
PavanPareta18-Jan-07 19:03 
Questioncopy a column from one table to another [modified] Pin
rzvme14-Jan-07 2:18
rzvme14-Jan-07 2:18 
AnswerRe: copy a column from one table to another Pin
Elina Blank14-Jan-07 10:25
sitebuilderElina Blank14-Jan-07 10:25 
Questionoracle9i Pin
pradeep kulkarni12-Jan-07 22:02
pradeep kulkarni12-Jan-07 22:02 
AnswerRe: oracle9i Pin
ChandraRam13-Jan-07 1:20
ChandraRam13-Jan-07 1:20 
QuestionGetting Children of Parent Within a table Pin
May Thu san12-Jan-07 19:56
May Thu san12-Jan-07 19:56 
I have a table Named 'Roles' which contains 'ID' and 'ParentID' fields.

Some Sample Data is

ID ,Name ,ParentID
1 ,Admin ,0
2 ,Manager ,1
3 ,Front Office User ,1
4 ,Supervisor ,2
5 ,Inventory User ,0
6 ,Human Resource User ,4

I would like to extract data of Parent and all children.

SELECT b.[ID] as 'Parent', a.[ID] as 'Role'
FROM Roles a
INNER JOIN Roles b
ON a.ParentID = b.[ID] and a.ParentID=1

which can return only.

ID ,ParentID
1 ,2
1 ,3

My wanted form is

ParentID ,ID
1 ,2
1 ,3
2 ,4
4 ,6

Like an organization tree, the top parent level can access all lower level nodes.
Sql 2005 support that feature.
How can I access them in Sql2000 recursive function or store procedure?

Thanks

May Thu San.

AnswerRe: Getting Children of Parent Within a table Pin
WoutL12-Jan-07 22:47
WoutL12-Jan-07 22:47 
GeneralRe: Getting Children of Parent Within a table Pin
May Thu san12-Jan-07 22:58
May Thu san12-Jan-07 22:58 
GeneralRe: Getting Children of Parent Within a table Pin
Colin Angus Mackay13-Jan-07 9:27
Colin Angus Mackay13-Jan-07 9:27 
GeneralRe: Getting Children of Parent Within a table Pin
WoutL13-Jan-07 22:42
WoutL13-Jan-07 22:42 
Questionhow to get the records in between dates Pin
Rmesh12-Jan-07 19:36
Rmesh12-Jan-07 19:36 
AnswerRe: how to get the records in between dates Pin
May Thu san12-Jan-07 20:25
May Thu san12-Jan-07 20:25 
Questionembedded sql Pin
veeresham12-Jan-07 19:06
veeresham12-Jan-07 19:06 
AnswerRe: embedded sql Pin
Colin Angus Mackay13-Jan-07 9:25
Colin Angus Mackay13-Jan-07 9:25 
Questionhow to display all tables from any single database in sql server 7.0? Pin
sathyan_829412-Jan-07 19:01
sathyan_829412-Jan-07 19:01 
AnswerRe: how to display all tables from any single database in sql server 7.0? Pin
Rmesh12-Jan-07 22:14
Rmesh12-Jan-07 22:14 
QuestionLock Types Pin
Rahithi12-Jan-07 18:50
Rahithi12-Jan-07 18:50 
QuestionSQL Query help Pin
Irshad Ahmed12-Jan-07 4:03
Irshad Ahmed12-Jan-07 4:03 
AnswerRe: SQL Query help Pin
Michael Potter12-Jan-07 4:20
Michael Potter12-Jan-07 4:20 
GeneralRe: SQL Query help Pin
Irshad Ahmed23-Jan-07 16:51
Irshad Ahmed23-Jan-07 16:51 
Questionaspnet_regsql - Unable to connect Pin
stuf9911-Jan-07 21:30
stuf9911-Jan-07 21:30 
QuestionHow to make access to SQL 2000 from WAN only for one login? Pin
yarns11-Jan-07 20:58
yarns11-Jan-07 20:58 
AnswerRe: How to make access to SQL 2000 from WAN only for one login? Pin
Mark J. Miller12-Jan-07 8:28
Mark J. Miller12-Jan-07 8:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.