Re: Select from a today_table_name

From: quasi <quasi_at_kc4.so-net.ne.jp>
Date: 17 Sep 2002 07:45:29 -0700
Message-ID: <ccaf80ba.0209170645.662ca1b0_at_posting.google.com>


the.clansman_at_eudoramail.com (David) wrote in message news:<95e48c3a.0209160135.5caa7bb3_at_posting.google.com>...
> How have I to do to make a Select from a tabla that its name is today
> date. I need to put this in a stored procedure.
>
> It's not possible to use a function in from.
> SELECT 'TABLE_' || TO_CHAR(SYSDATE,'YYYYMMDD') into cot From DUAL

Hi.
If you want to change a target table dynamically, you have to use dynamical sql.
For dynamical sql, you generate sql as string, and execute it. see dbms_sql package.

quasi(DBA & PL/SQL Developer & Java Developer) Received on Tue Sep 17 2002 - 16:45:29 CEST

Original text of this message