I am choosing posts in one table and want to choose all values of the column from the related table once the two tables possess a matching value, separate them by commas, and display these questions single column with my is a result of table one.
I am a newcomer for this and apologize in advance if I am not wording it properly.
It may sound like what you are attempting to do would be to take multiple rows and aggregate them right into a single row by concatenating string values from a number of posts. Yes?
If that is the situation, I will tell you it's a harder problem of computer appears if you wish to get it done using portable SQL - particularly if you have no idea in advance the number of products you might get.
The Oracle-specific solution frequently used in such instances would be to implement a custom aggregate function -
STRAGG(). Here is a link to an article that describes just how to do this and it has good examples of it's usage.
If you are on Oracle 9i or later and are prepared to accept using undocumented functions (that may change later on), you may also consider the [cde] function - which does very similar factor.
You'll need a row aggregation or concatenation function, options are:
If you work with Oracle 11gR2, there's a built-in function to aggregate strings having a delimiter known as [cde].
If you work with any earlier discharge of Oracle database, you should use
WM_CONCAT()function, however you've got no selection of delimiter and will need to use something similar to [cde] function to alter the delimiter later on in case your data doesn't contain commas.
As pointed out by LBushkin, you may create a custom function inside your schema to do row aggregation for you personally. Here's PL/SQL code example for just one: http://www.oracle-base.com/articles/misc/StringAggregationTechniques.php#user_defined_aggregate_function