Results 1 to 2 of 2
  1. #1
    access is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2009
    Posts
    28

    Query to get column names in a table


    Hi,

    I have a table "Student" with fields and entries as below

    StudentName Year Class Subj1 Subj2 Subj3

    I want to write a query to display the list of entries as below

    StudentName Year Class Course Marks
    ... ... .... Subj1 <Value in Subj1 record>
    ... ... .... Subj2 <Value in Subj2 record>
    ... ... .... Subj3 <Value in Subj3 record>

    ie. I want to get the column names from the table. Can any one help me out in this regard. Thanks.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    In a normalized table the records would look more like what you need than what you have. Repeating fields is a dead giveaway. Any chance to restructure that table?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 03-31-2009, 09:16 PM
  2. Replies: 3
    Last Post: 02-20-2009, 02:28 PM
  3. Adding new column to make-table query
    By dtn118 in forum Access
    Replies: 2
    Last Post: 08-03-2008, 06:51 AM
  4. inserting values in column based another column
    By wasim_sono in forum Database Design
    Replies: 1
    Last Post: 06-27-2006, 05:23 AM
  5. 2 different fields into 1 column by query?
    By rainxking in forum Queries
    Replies: 1
    Last Post: 06-04-2006, 09:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums