ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michal Malecki" <misie...@poczta.onet.pl>
Subject Re: Dynamically passing the name of schema to select statement
Date Fri, 11 Mar 2005 11:48:31 GMT
RE: Dynamically passing the name of schema to select statementselect count(RECORD_ID) from
$source_schema$.$source_table_name$
source_schema and source_table_name are normal bean properties/map keys but are inserted into
sql the hard way (just like you written it down), not using prepared statement
you can also use ${xxx} but its only for keys from property files
Michal Malecki
  ----- Original Message ----- 
  From: Rajiv Kumar 
  To: ibatis-user-java@incubator.apache.org 
  Sent: Friday, March 11, 2005 5:46 AM
  Subject: RE: Dynamically passing the name of schema to select statement


  In Addition .. I have another sql query . 

  String query = "; 
  The value of both source_schema and source_table_name is known at run time. 

  How can I accomplish this in iBatis? 

  Rajiv 




  _____________________________________________ 
  From:   Rajiv Kumar  
  Sent:   Thursday, March 10, 2005 7:43 PM 
  To:     'ibatis-user-java@incubator.apache.org' 
  Subject:        Dynamically passing the name of schema to select statement 

  Hello, 

  I have very simple select statement 
  select * from Level_1_Rules where RULE_ACTIVE=1 

  All I want to do is qualify table name with schema name. 

  For every run of my program this schema name is different. 



  Regards, 
  Rajiv Kumar 

Mime
View raw message