Results 1 to 2 of 2
  1. #1
    lln14 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2011
    Posts
    1

    How to select second column based on first column from same table

    Hi, i wanted to run a query to select second column based on first column from same table..



    For example

    Column1 Column2
    1 a
    2 b

    Column2 value should be base on Column1 value, that is Column2 value retrive from <table> based on column1 value

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Not exactly sure what you are asking. Perhaps you could give a little more context.

    Is this what you mean??

    Code:
    SELECT column2 
    FROM YourTABLE
    WHERE column1 = "sometxtValue"

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

Similar Threads

  1. Replies: 1
    Last Post: 09-05-2010, 11:28 AM
  2. Replies: 1
    Last Post: 04-15-2010, 02:07 AM
  3. Replies: 2
    Last Post: 03-03-2010, 07:37 AM
  4. Add new column in a select query
    By ysrini in forum Queries
    Replies: 3
    Last Post: 02-03-2010, 06:58 AM
  5. inserting values in column based another column
    By wasim_sono in forum Database Design
    Replies: 1
    Last Post: 06-27-2006, 05:23 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