» Quick Links
You can make money on these forums
We Share profits with you
Google
Google Adsense
Google Adwords
YPN
Yahoo
MSN Search
Web Directories
Web Hosting
Web Hosting Offers
Hosting News
Suggestions
Link Building
Domain Names
PHP Forums
MySQL Forums
» More Links
OSP News
Reseller Hosting
Shared Hosting
Dedicated Servers
Google Adsense
Search Engine Marketing
Link Development
Affiliate Marketing


» Advertising
Multiple DC PR Check

Free SEO Tools


Go Back   Webmaster Forums > Website Developement / Programming > MySQL Forums

MySQL Forums Share Your Ideas and Tips about MYSQL. Ask questions about MYSQL. Table Design and Much More...

Reply
 
Thread Tools Display Modes
  #1  
Old 03-09-2007, 03:42 AM
Worlord Worlord is offline
Junior Member
 
Join Date: Nov 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Worlord is on a distinguished road
Default 1054 Unknown column....

Hi guys,
I want to do a query like this:
SELECT value1+value2 AS result, SQRT(result) FROM example_table;
I wana construct a new column 'result' and continue to work with this new value in the same query. It should be possible to achieve this somehow, but the way I put it above didn't work. The MySQL Query Browser shows "1054 Unknown column 'result'". Can anyone give me a hint?
Thanks a lot! -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Revenue Sharing Ads ( ?):
  #2  
Old 03-09-2007, 08:32 AM
rian rian is offline
Senior Member
 
Join Date: Jul 2006
Posts: 135
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 16
rian is on a distinguished road
Default

Try this:

select SQRT(value1+value2) from example_table; -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a column.... refik MySQL Forums 1 12-18-2006 03:44 AM
Unknown column 'pm_read.userid' ... bilget MySQL Forums 1 11-21-2006 03:55 AM
putting data from rows into column? Zogen MySQL Forums 1 11-17-2006 03:55 AM
to pick column from meta table? Misael MySQL Forums 1 08-25-2006 09:19 AM
column display... Jaydon MySQL Forums 1 08-02-2006 09:22 AM


All times are GMT. The time now is 02:34 AM.