File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Complex SQL Statements Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Complex SQL Statements" Watch "Complex SQL Statements" New topic
Author

Complex SQL Statements

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1390
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"
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19538
    
  16

I have done similar things quite often:
Of course this function can have only a single row in the result set.

Moving to the JDBC forum.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2476
    
    7

What is your database? Oracle has stored functions that can be used in queries.


OCUP UML fundamental and ITIL foundation
youtube channel
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Complex SQL Statements
 
Similar Threads
increment field...
access control
how to return the index by variable from pl/sql to java
Issue with float to binary
sql query error