473,382 Members | 1,622 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

derived tables

I would like to select data from a table where the table name is located
in another table, and I am using the following query:

select t1.* from (select tbl_name from user_table where user="guy") t1;

This should return the data from table 'tbl_name', but I only get
results from the subquery (ie. the query as a whole returns 'tbl_name',
not it's contents) Where am I going wrong?

I am using version 4.1.0-alpha-standard.

Shawn
--
Shawn McGinn <sh***@unb.ca>
UNB
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/my***********...ie.nctu.edu.tw

Jul 19 '05 #1
0 2604

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: kattukuyil | last post by:
Guys, this is what I want to do. How can I do this ? Select employid, Gross=( Select sum (uprtrxam) from Fleet..upr30300 where pyrlrtyp=1), DedofWages=( Select sum (uprtrxam) from...
6
by: calan | last post by:
Relative SQL newbie here......this is probably easy, but.... Lets say I have a table (MainTable) that stores a list of input table names, a primary key (PKey), and a field called "Configured" for...
2
by: Keith B via SQLMonster.com | last post by:
Hi! I want to return a derived table along with 4 simple tables in a stored procedure as follows: Input parameter: @FtNum (==Order Number, selects one Order and all associated data)...
1
by: cindy | last post by:
Get data into datatable, add to dataset dsSearch " Get data into datatable, add to dataset dsSearch Using In-Memory SQL Engine join the tables and select the filenames from the join, add to...
0
by: Deepak C.G via .NET 247 | last post by:
I want to dispose the image object in my child form, unless I won't dispose this object i can't delete the image file in my folder. I get this error in MDIparent form "An unhandled exception...
1
by: Ruediger Herrmann | last post by:
Hello again, as I am new to PostgreSQL (great pice of softwork btw) this probably won't be the last question. I access PostgreSQL from Java via the PostgreSQL JDBC driver. I am currently...
1
by: CSN | last post by:
Just wondering - does PG support derived tables? I'm not really sure what the difference is between them and subqueries. http://www.mysql.com/news-and-events/press-release/release_2004_32.html...
8
by: rbg | last post by:
I did use query plans to find out more. ( Please see the thread BELOW) I have a question on this, if someone can help me with that it will be great. In my SQL query that selects data from table,...
12
by: bgold | last post by:
Hey. I have a base class (SPRITE), and using this base class I have derived a large number of derived classes (PERSON, BULLET, MISSILE, etc.). Now, at a certain point in my program, I have a pair...
6
by: Bhawna | last post by:
I am into c++ code maintenance for last 3-4 years but recently I am put into design phase of a new project. Being a small comapany I dont have enough guidance from seniors. Currently I am into a...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.