Hi All,
I want to create an Excel report for my new company.
In it I have a complex task, in which i need to join 4-5 tables and also need to pivot a table (Transaction/Detail/Child table) then need to join it to already joined group.Due to this pivot number of out put columns varies (ie,the where clause uses a date range filtration,if the date filtration is bigger results more rows ,when pivot this rows number of columns are increased ,so number of columns are dynamic.) .From this out put, I need to remove the some columns(like primary/foreign keys) from out put.But i can't give the name list of columns in select clause since the number of columns(Also their name) are dynamic.
Even though this is my work, i can successfully handled up to the dynamic column name ,but now i want to remove unwanted columns . I am expecting something like below,
I have a table named MyTable with 5 columns as Column1,Column2,Column3,Column4 and Column5 .
Consider Column1 is primary key and Column2 is foreign key,Also assume i know the name of primary key and foreign key columns only (Column1,Column2)
I want to write a select query as below
Select *,Remove(Column1),Remove(Column2) from MyTable
i need output with 3 columns as Column3,Column4 and Column5
Thanks&Regards,
Aadyakumar.D.V