aspose file tools
The moose likes JDBC and the fly likes Problem doing inner select with MySql Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Reply 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: 56529
    
  14

can somoene tell me what I did wrong?

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


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About 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 agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Problem doing inner select with MySql
 
Similar Threads
Hibernate subquery
Need Help in JDBC-Ms access
Looking for Study Material on -Security, Internalization and Messaging
Security manager
JDBC & Oracle