I have a simple table with 3 columns
PageDescription(varchar(50)) | ParentID (int) | CategoryID (int)
Here is the table data
Fruit||1 Apples|1|2
here is the query i’m running
SELECT PageDescription,(SELECT PageDescription
FROM tblpages a
WHERE a.ParentID = tblpages.CategoryID)
AS 'Page Parent'
FROM tblpages
This query does not stop processing, is there a better way to handle this query?
What you need is a join.