select from dynamic table names

From: Dinesh Kumara <dinesh(at)rezgateway(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: select from dynamic table names
Date: 2011-11-08 09:17:47
Message-ID: 4EB8F3BB.5010406@rezgateway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have 16 tables which created according to generated MD5 hash.
At the time of execution i tried to retrieve data from a table where
table name id dynamic.

table name can be expertdb.rate_AVAIL_[0 to F]

I tried to get this from ;
SELECT * FROM expertdb.rate_AVAIL_ ||
upper(substring(md5('2011-11-10')from 1 for 1))

but it is giving an error that is error with '||' appender. please
someone give me an idea..

--

*Thanks and Regards,*
Dinesh Kumara,
Software Engineer,
Reservation Gateway Inc,
Email:dinesh(at)rezgateway(dot)com <mailto:dinesh(at)rezgateway(dot)com>
www.rezgateway.com

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ondrej Ivanič 2011-11-08 09:49:48 Re: Postgres vs other Postgres based MPP implementations
Previous Message Craig Ringer 2011-11-08 07:21:44 Re: Postgres vs other Postgres based MPP implementations