shazone Posted December 12, 2011 Share Posted December 12, 2011 is it possible to run a simple db2 command "set schema mydbschema;" in ireport tools? or it has the option to set schema out of the box? Link to comment Share on other sites More sharing options...
cbarlow3 Posted December 14, 2011 Share Posted December 14, 2011 I use DB2 all the time in my iReports, and I just use the name of the schema(s) in my FROM clause, e.g. here I am using the CORE schema:SELECT ACCOUNT.ACCOUNT_NUMBER || ' L ' || LOAN.ID AS ACCT, COALESCE(PERSON.LAST_NAME, '') || COALESCE(',' || PERSON.FIRST_NAME, '') AS PERSON_LAST_FIRST, LN_TYPE.DESCRIPTION AS LOAN_TYPE, LOAN.BALANCE AS LOAN_BALANCE,FROM CORE.ACCOUNT AS ACCOUNT INNER JOIN CORE.PERSON AS PERSON ON ACCOUNT.PRIMARY_PERSON_SERIAL=PERSON.SERIAL INNER JOIN CORE.LOAN AS LOAN ON LOAN.PARENT_SERIAL=ACCOUNT.SERIAL INNER JOIN CORE.LN_TYPE AS LN_TYPE ON LOAN.TYPE_SERIAL=LN_TYPE.SERIALWHERE LOAN.CLOSE_DATE IS NULL AND LOAN.CHARGE_OFF_DATE IS NULL AND $X{ IN, LN_TYPE.DESCRIPTION, LoanTypeList }ORDER BY ACCTOf course, the schema(s) you use have to be defined in the Data Source that your report points to.Hope that helps.Carl Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now