In Access SQL, is there anyway to use user input as the field name? -
i have database table field names date (e.g., jan, feb...). there way can ask input users return column?
for example, there pop-up window user can type "jan" in order generate single column name of jan?
thanks!!!
yes, can use switch function this.
select switch ( [select month] = "jan", jan, -- if user enters jan, use column jan [select month] = "feb", feb -- if user enters feb, use column feb ) month yourtable
[select month]
is prompt shown.
running query in access show prompt , select column based on input.
Comments
Post a Comment