I have a function called getList (date) ". This function returns me a list of elements (with multiple columns) from the date entered in the parameter.
If I call:
SELECT * FROM getList('12/31/2014');
It works great. It returns me a list with the date, item name and price.
Something like that:
date item_description price ----------------------------------------------- 12/31/2014 banana 1 12/31/2014 apple 2.5 12/31/2014 coconut 3
But I have another table with dates that I want to find.
So, I want to select all dates from this table, and for each row returned, I want my getList function to get this result:
date item_description price ----------------------------------------------- 12/28/2014 banana 0.5 12/28/2014 apple 1.5 12/28/2014 coconut 2 12/31/2014 banana 1 12/31/2014 apple 2.5 12/31/2014 coconut 3
I donβt know exactly how to do this. Of course, my data is not a list of fruits. This is just to make it all easier.
Thank you very much.
source share