Hey Nick, please try:
CALL SQL select .... from .... AS foo.bar isn't it what you are looking for? regards Ralf ----- Original Message ----- From: "Nick Stuart" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, April 30, 2004 4:22 PM Subject: [castor-dev] Disconnected Record Idea.... > > Ok, just had an idea here and wanted to bounce if off you guys. If this already > exists please yell at me and point me in the right direction. :) > > I was thinking that it would be handy to have a way to marshal straight > RecordSets/Querys that get pulled from regular SQL. The reason I came about this was because I'm trying to do a query that requires a certain date (month/year), and OQL (as far as I know) doesn't support any date functions such as MONTH() or YEAR(), but almost every database I know of has this and would be trivial to pull the data out in a SQL query instead of a OQL query. There are other reasons that you may want to use SQL instead of OQL and vice versa, but you get the idea. > > So with this there would be obvious limitations, constrictions. The result set would > have to have all the columns, with the correct names/types, that match up to the mapping file object. You also shouldn't be able to do any updates on the object because you can rename columns in the SQL with 'as'. > > Just an idea, not sure where this would fit in the whole scheme of things, but it > would be handy to have. > > Also, if you guys think this is reasonable I'll file an official bug/enhancement in > bugzilla. > > Nick Stuart > Computer Systems Analyst > > Vortechnics, Inc. > 200 Enterprise Drive > Scarborough, Maine 04074 > > P.S. Also, looking through the API things are either out of date or something in > regards to the Query object and stuff. The API example has: > Query oql; > QueryResults results; > > // Construct a new query and bind the id value > oql = db.getQuery( "SELECT ... WHERE id=$" ); > oql.bind( 5 ); > results = oql.execute(); > > But there is not db.getQuery(String query) method available :( Was it there at one > time and taken out? Also, there doesn't seem to be any way to set your Query once you get it from db.getQuery(). (I guess I'm just confused) > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.672 / Virus Database: 434 - Release Date: 4/28/2004 > > > >