cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niclas Hedhman <nic...@localbar.com>
Subject Re: nested SQL queries
Date Sat, 25 Mar 2000 06:47:58 GMT
Donald Ball wrote:

> is there any good reason that one would want to do this using some special
> sql filter/processor/taglib syntax rather than using the xsl:key function?
>
> - donald

I have no clue what you are on about, but something I will need, once I start
using SQL in Cocoon (yeah, one day...)...

In Java it looks like this...

String sql = "SELECT tablename FROM MapIndex WHERE mapname = '" + objectname
+ "' ;";
st = connection.createStatement();
ResultSet rs = st.executeQuery( sql );
rs.first();
String tablename = rs.getString(1);

sql = "SELECT * FROM " + tablename + ";";
:
:
:

I.e. retrieving the tablename from a table to be used in a subsequent query.
Afaiu, SQL doesn't support this directly, so coding is required. Anything
that is or will be supported in the SQL taglib???

Niclas



Mime
View raw message