Skip to Content
-2
May 18, 2020 at 09:48 AM

how to create a dynamic field sql?

43 Views

I want to query data from faglflext table by given accounting period. In this table each month is a column. like HSL01,HSL02,HSL03....I wonder is it possible to dynamcie create a SQL like select HSL01,HESL02,...from select-options. Such as if I enter accounting period as 3 to 5, then the SQL is select HSL03,HSL04,HSL05...like. I wonder can EXEC be used for that? Thx.