wood burning stoves
The moose likes JDBC and Relational Databases and the fly likes Problem doing inner select with MySql Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Problem doing inner select with MySql" Watch "Problem doing inner select with MySql" New topic
Author

Problem doing inner select with MySql

bob morkos
Ranch Hand

Joined: Oct 06, 2003
Posts: 56
I have the following code, can somoene tell me what I did wrong? Thanks in advance.
Select ProfitLoss, Name, DatePosition
FROM interestprofit
Where Security = '13508754'
And TraderName = 'CAN'
GROUP BY TraderName, Security
Having DatePosition IN (Select DatePosition FROM interestprofit WHERE DatePosition = MAX(DatePosition))
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 63224
    
  69

can somoene tell me what I did wrong?

Yes, you didn't tell us what the problem was.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Jason Steele
Ranch Hand

Joined: Apr 25, 2003
Posts: 100
Haven't tried it but shouldn't it be:


An egg is a chicken's house!
bob morkos
Ranch Hand

Joined: Oct 06, 2003
Posts: 56
Yes, that would do it. Thanks
Originally posted by Jason Steele:
Haven't tried it but shouldn't it be:
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Problem doing inner select with MySql
 
It's not a secret anymore!