What version of the product are you using? The following information is relevant for v11.0. If you are using an older version, then refer to the Database Reference document for your version.
To find the parent of a given Requirement you need to look at the RQ_FATHER_ID field of the Requirement. This will give you the Requirement ID for the parent of a Requirement.
In the Requirements module a Folder is just another type of Requirement. However, any Type of Requirement can have child requirements. The parent of a given requirement may not be a folder.
To find out if the parent is a folder, you need to call up the Requirement specified by the RQ_FATHER_ID field. Then look at RQ_TYPE_ID field. This cross-reference to the REQ_TYPE table where you can find the Name associated with the type. "Folder" is one of the default types.
You will have to decide if the parent is really a folder or not and then decide how you want to deal with the results.
To find the parent of a given Requirement you need to look at the RQ_FATHER_ID field of the Requirement. This will give you the Requirement ID for the parent of a Requirement.
In the Requirements module a Folder is just another type of Requirement. However, any Type of Requirement can have child requirements. The parent of a given requirement may not be a folder.
To find out if the parent is a folder, you need to call up the Requirement specified by the RQ_FATHER_ID field. Then look at RQ_TYPE_ID field. This cross-reference to the REQ_TYPE table where you can find the Name associated with the type. "Folder" is one of the default types.
You will have to decide if the parent is really a folder or not and then decide how you want to deal with the results.