Results 1 to 2 of 2

Thread: SQL query

  1. #1
    Join Date
    Jan 2008
    Posts
    1

    SQL query

    Hi,
    I need to create a query.
    There is a table area which has fields area_id, area_name, parent_area_id, where parent_area_id is any area_id which can be a parent of that area_id.
    I need to pick all those areas and its child areas for a search on name say 'World'
    eg: If I have World as parent area and America, Africa , Asia and America has LA,NY,IN, ect and Africa had Africa1, Africa2 etc, and Asia has India, Nepal,Japan, etc. Please provide me a query which with 'World' would give me all the areas and subareas.
    Please.............some one help me its really urgent.
    Thanks,
    SD

  2. #2
    Join Date
    Feb 2008
    Posts
    1
    select e.area_id,e.area_name,m.area_name
    from area e,area m
    where e.area_id=m.parent_area_id;






    Edit by admin: no contact info permitted on the forum, thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •