File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
JDBC and Relational Databases
Complex SQL Statements
Joined: Nov 16, 2004
May 08, 2009 11:11:52
I have a report using jasperreports(itext)
Is there any way to have a function in the SQL statement as a column and have that function run a seperate SQL statement?
Somthing like "Select f1, myfunction(f1) As f2 From mytable"
Joined: Oct 27, 2005
May 08, 2009 14:12:20
I have done similar things quite often:
SELECT somefield, (SELECT MAX(otherfield) FROM othertable WHERE othertable.x = thistable.y) AS max_otherfield FROM thistable
Of course this function can have only a single row in the result set.
Moving to the
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions
How To Answer Questions
Joined: Dec 20, 2006
May 10, 2009 15:18:24
What is your database? Oracle has stored functions that can be used in queries.
OCUP UML fundamental and ITIL foundation
subject: Complex SQL Statements
sql query error
how to return the index by variable from pl/sql to java
Issue with float to binary
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015