MySQL Forums :: Partitioning :: Select using partition dynamically


Advanced Search

Select using partition dynamically
Posted by: Jose Lima ()
Date: May 07, 2015 06:21PM

Hi everybody,

I'm trying to put on my Store Procedure the following statement:

Select a, b, c, d
from <table name> partition (<partition name>)

The problem I'm facing is to put the <partition name> dynamically.
I can't use PREPARE STATEMENT.

Are ther any way to do it?
I tried it but do not work;

Select a, b, c, d
from <table name> partition (concat( 'p_', format_date( '%Y%m%d') ) )

Any help will be wellcome.

Regards,

José Lima

Options: ReplyQuote


Subject Views Written By Posted
Select using partition dynamically 1591 Jose Lima 05/07/2015 06:21PM
Re: Select using partition dynamically 820 Rick James 05/11/2015 12:53PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.