1. Welcome to Chandoo.org Forums. Short message for you

    Hi Guest,

    Thanks for joining Chandoo.org forums. We are here to make you awesome in Excel. Before you post your first question, please read this short introduction guide. When posting or responding to questions please remember our values at Chandoo.org are: Humility, Passion, Fun, Awesomeness, Simplicity, Sharing Remember that we have people here for whom English is not there first language and we need to allow for this in our dealings.

    Yours,
    Chandoo
  2. Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  3. When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

MS Access - How to get only few columns from the table

Discussion in 'The Lounge' started by ThrottleWorks, Apr 3, 2018.

  1. ThrottleWorks

    ThrottleWorks Excel Ninja

    Messages:
    1,879
    Hi,

    I am using below mentioned query to get the data from table.

    SELECT *
    FROM [Employee Directory]
    WHERE ((([Employee Directory].[Dept])='Services'))
    ORDER BY [Full Name];

    In the original table, I have 13 columns.
    How do I get only 4-5 required column from this table.

    How do I edit this query.
    For example, I need columns Full Name, DOB, Dept, and DOJ how do I do this.

    Can anyone please help me in this.
  2. GraH - Guido

    GraH - Guido Well-Known Member

    Messages:
    811
    I think, replace select * with

    select [Employee Directory].[Full Name],
    [Employee Directory].[DOB],
    [Employee Directory].[Dept],
    [Employee Directory].[DOJ]

    Perhaps it also needs a comma at the end. Actually do not remember that detail.

    or even simply
    select [Full Name],
    [DOB],
    [Dept],
    [DOJ]
    Last edited: Apr 3, 2018
    ThrottleWorks likes this.
  3. ThrottleWorks

    ThrottleWorks Excel Ninja

    Messages:
    1,879
    Hi @GraH - Guido thanks a lot for the help. It is working fine.
    Good night. :)

Share This Page