I need to populate an excel template using pentaho kettle. I am Retrieving data from sql server & oracle DB. but my template is in row vise, like I have to retrieve name and ID columns from a table and put it into 2 rows. for that I am using 2 separate select sqls and UNION. I need to know is there any other simple way instead of using UNION because there are almost 200 rows and i need to use 200 select sqls, even though I am retrieving data from just 4 or 5 tables.
below is the sample select i have used,
SELECT EMP_COMMON_NAME "EmpDetail" FROM TBL_Emp WHERE emp_modified_Date = getdate() AND emp_id = '11' UNION ALL
SELECT EMP_UWI FROM TBL_Emp WHERE emp_modified_Date = getdate() AND emp_id = '11' UNION ALL
SELECT EMPBORE_NAME FROM TBL_EmpBORE WHERE emp_modified_Date = getdate() AND emp_id = '11' UNION ALL
SELECT TO_CHAR(EMPBORE_NO) FROM TBL_EmpBORE WHERE emp_modified_Date = getdate() AND emp_id = '11' UNION ALL
SELECT DESIGNATION FROM TBL_Emp WHERE emp_modified_Date = getdate() AND emp_id = '11' UNION ALL
SELECT TO_CHAR(GEO_LATITUDE) FROM TBL_Emp WHERE emp_modified_Date = getdate() AND emp_id = '11' UNION ALL
SELECT TO_CHAR(WATER_DEPTH) FROM TBL_Emp WHERE emp_modified_Date = getdate() AND emp_id = '11'
