6 Replies Latest reply on Nov 8, 2007 5:30 AM by dmh5

    Select Column using Session Variable

      I have set a session variable to hold the name of a column dependent on who the user is. Is it possible to use a session variable to select a column in a database table? If so, how? Does it need a where statement?

      Something like this?:

      <cfquery name="rsSelectColumn" datasource="Test">
      SELECT Column 1, Column 2, Column 3 = Session Variable
      FROM tbl_data