A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Murach's Java Servlets and JSP
this week in the
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
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
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
subject: Complex SQL Statements
Issue with float to binary
sql query error
how to return the index by variable from pl/sql to java
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014