Unix Technical Forum

iterating over fetched tablenames ?

This is a discussion on iterating over fetched tablenames ? within the MySQL forums, part of the Database Server Software category; --> Hello, I have a question: I fetch a list of tablenames from table `properties' and I would like to ...


Go Back   Unix Technical Forum > Database Server Software > MySQL

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 11:27 AM
hans christian
 
Posts: n/a
Default iterating over fetched tablenames ?

Hello,

I have a question:

I fetch a list of tablenames from table `properties' and I would like to
execute a select query on the tablenames that are returned. My question
is; is this possible in one querry ?

For example [this doesn't work ] but to illustrate:

mysql> (SELECT tblname FROM properties) UNION (SELECT * from
tblname.afield ORDER BY date DESC LIMIT 1);
ERROR 1146 (42S02): Table 'properties.tblname' doesn't exist

If someone could tell me if this is possible, or should I ? Use multiple
querries ? etc...

Thank you.

hc.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:03 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com