Sorry CK,
Actually the opposite is happening..i will just explain the whole thing again....
Cont_ID FName Address
BCF01 Sajit XYZ
BCF02 ABC MNO
BCF03 EFG XXX
BCF04 sdd dddd
BCF05 DDD WWW
The structure of Node_Dtls is as follows
Cont_ID Node_ID Parent_ID
BCF01 52 50
BCF02 53 52
BCF03 54 51
BCF04 56 53
BCF05 57 56
So what i want from an SQL is, if the user selects the Parent_ID = 52 then the corresponding Cont_ID details would be displayed. in this case the CONT_ID BCF02 is displayed. Now, if the same Node_ID (i.e 53) is present in the Parent_ID then the details of that record would also be displayed. So this query should display the records of BCF02, BCF04, BCF05. The search will stop here because the Node_ID (57) is not present in the Parent_ID.
Sorry for the confusion....wud be grateful if the you could help me in writing the SQL.
Thanks / Sajit
Quote:
Originally Posted by ck9663
Use JOIN to "join" the two tables.
Happy coding
---- CK