MySQL Forums
Forum List  »  Partitioning

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
3794
May 07, 2015 06:21PM


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.