Hi,
I know very little about sql and Toad, so this will most likely sound like another stupid question.
I'm trying to run the following query:
SELECT * FROM FA_CATEGORIES_VL, FA_CATEGORY_BOOKS WHERE ENABLED_FLAG <> 'N'
My problem is that the FA_CATEGORIES_VL table has one column called CATEGORY_ID, and if I run the query I get multiple rows for the same category_ID.
I know how to use "DISTINCT" when I check a single column or a specific list of columns (e.g. SELECT DISTINCT FROM FA_CATEGORIES_VL.CATEGORY_ID FROM FA_CATEGORIES_VL, FA_CATEGORY_BOOKS WHERE ENABLED_FLAG <> 'N'), but not when I want to see all the columns in both tables.
Could someone suggest a solution, please? Any other way to streamline the query would also be helpful, I know that tables can be joined but I have no idea how to do it, I'm afraid.
Many thanks.
I know very little about sql and Toad, so this will most likely sound like another stupid question.
I'm trying to run the following query:
SELECT * FROM FA_CATEGORIES_VL, FA_CATEGORY_BOOKS WHERE ENABLED_FLAG <> 'N'
My problem is that the FA_CATEGORIES_VL table has one column called CATEGORY_ID, and if I run the query I get multiple rows for the same category_ID.
I know how to use "DISTINCT" when I check a single column or a specific list of columns (e.g. SELECT DISTINCT FROM FA_CATEGORIES_VL.CATEGORY_ID FROM FA_CATEGORIES_VL, FA_CATEGORY_BOOKS WHERE ENABLED_FLAG <> 'N'), but not when I want to see all the columns in both tables.
Could someone suggest a solution, please? Any other way to streamline the query would also be helpful, I know that tables can be joined but I have no idea how to do it, I'm afraid.
Many thanks.