Skip to Content
Former Member
Sep 14, 2004 at 03:14 PM

SQLJ statements


When we write a SQLJ statement embedded into Java, does EACH SQLJ statement get translated/ compiled into a separate object? Or can we find a way to group the different SQLJ statements as a method being part of an overall object?

In our project, we have tons of reports. Each report will have at least one SQL statement. Just wondering if we'll end up having One SQLJ OBJECT per report or can we group together all these SQLJ as methods being part of a SINGLE REPORTING OBJECT?

Secondly if we have a complex reporting requirement that needs us to retrieve off multiple tables, is it

a) One SQLJ PER SELECT statement and we use a session bean to collate the data?


b) within ONE SQLJ, we write a complex series of select statements and use the SQLJ to collate the data? Ie like a Join?