Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

Deleting values in mutiple cells PLEASE HELP

Discussion in 'Information Technology' started by KateL, Jul 28, 2006.

  1. KateL

    KateL
    Expand Collapse
    Guest

    I am a novice user of Access 2000 and I am desperate for help! I have to
    delete the first 15,000 records of one column only. In excel I would simple
    highlight the cells and press delete but obviously this doesn't work in
    Access; it wants to delet the whole record, not just the one column. Is
    there any easy way of doing this or do I have to do it one by one?????
     
  2. Loading...


  3. John Vinson

    John Vinson
    Expand Collapse
    Guest

    On Thu, 13 Jul 2006 10:09:01 -0700, KateL
    <KateL@discussions.microsoft.com> wrote:

    >I am a novice user of Access 2000 and I am desperate for help! I have to
    >delete the first 15,000 records of one column only. In excel I would simple
    >highlight the cells and press delete but obviously this doesn't work in
    >Access; it wants to delet the whole record, not just the one column. Is
    >there any easy way of doing this or do I have to do it one by one?????


    Excel is a spreadsheet. Access is a database.

    THEY ARE DIFFERENT! and require different logic. For one thing, Access
    tables do not *have* "cells" - they have Records, where each record
    consists of Fields. Secondly, you don't "delete" cells - you change
    the value in the cell, you can only delete entire records.

    It seems that what you want to do is update 15000 existing records to
    replace the current contents of one field with NULL. The appropriate
    tool is an Update Query.

    First, BACK UP YOUR DATABASE - this change is permanent and you don't
    want to lose your data to a mistake in the query!

    Create a new Query based on your table. Apply whatever criteria you
    need to select those records which should be updated (and note that
    there ARE no 'row numbers' - you'll need criteria referencing fields
    in the table). Select the field that you want to blank out.

    Change the query to an Update query using the query type tool, or the
    Query menu option. On the Update To line under the field, type

    NULL

    just like that - no quotes, no punctuation.

    Run the query by clicking the ! icon.


    John W. Vinson[MVP]
     
  4. KateL

    KateL
    Expand Collapse
    Guest

    Thanks John, would you mind helping just a bit more with my query. The
    defintion of what I want to do is "if the value in column X = Null then
    delete the value in column Y. Can you please tell me how I would do this?

    "John Vinson" wrote:

    > On Thu, 13 Jul 2006 10:09:01 -0700, KateL
    > <KateL@discussions.microsoft.com> wrote:
    >
    > >I am a novice user of Access 2000 and I am desperate for help! I have to
    > >delete the first 15,000 records of one column only. In excel I would simple
    > >highlight the cells and press delete but obviously this doesn't work in
    > >Access; it wants to delet the whole record, not just the one column. Is
    > >there any easy way of doing this or do I have to do it one by one?????

    >
    > Excel is a spreadsheet. Access is a database.
    >
    > THEY ARE DIFFERENT! and require different logic. For one thing, Access
    > tables do not *have* "cells" - they have Records, where each record
    > consists of Fields. Secondly, you don't "delete" cells - you change
    > the value in the cell, you can only delete entire records.
    >
    > It seems that what you want to do is update 15000 existing records to
    > replace the current contents of one field with NULL. The appropriate
    > tool is an Update Query.
    >
    > First, BACK UP YOUR DATABASE - this change is permanent and you don't
    > want to lose your data to a mistake in the query!
    >
    > Create a new Query based on your table. Apply whatever criteria you
    > need to select those records which should be updated (and note that
    > there ARE no 'row numbers' - you'll need criteria referencing fields
    > in the table). Select the field that you want to blank out.
    >
    > Change the query to an Update query using the query type tool, or the
    > Query menu option. On the Update To line under the field, type
    >
    > NULL
    >
    > just like that - no quotes, no punctuation.
    >
    > Run the query by clicking the ! icon.
    >
    >
    > John W. Vinson[MVP]
    >
     
  5. KateL

    KateL
    Expand Collapse
    Guest

    Hi John, I can't believe it, I actually got it to work. I can't thank you
    enough!!! I was going to sit here and manually delete 15000 records you have
    saved me a day's work!!

    Kate

    "KateL" wrote:

    > Thanks John, would you mind helping just a bit more with my query. The
    > defintion of what I want to do is "if the value in column X = Null then
    > delete the value in column Y. Can you please tell me how I would do this?
    >
    > "John Vinson" wrote:
    >
    > > On Thu, 13 Jul 2006 10:09:01 -0700, KateL
    > > <KateL@discussions.microsoft.com> wrote:
    > >
    > > >I am a novice user of Access 2000 and I am desperate for help! I have to
    > > >delete the first 15,000 records of one column only. In excel I would simple
    > > >highlight the cells and press delete but obviously this doesn't work in
    > > >Access; it wants to delet the whole record, not just the one column. Is
    > > >there any easy way of doing this or do I have to do it one by one?????

    > >
    > > Excel is a spreadsheet. Access is a database.
    > >
    > > THEY ARE DIFFERENT! and require different logic. For one thing, Access
    > > tables do not *have* "cells" - they have Records, where each record
    > > consists of Fields. Secondly, you don't "delete" cells - you change
    > > the value in the cell, you can only delete entire records.
    > >
    > > It seems that what you want to do is update 15000 existing records to
    > > replace the current contents of one field with NULL. The appropriate
    > > tool is an Update Query.
    > >
    > > First, BACK UP YOUR DATABASE - this change is permanent and you don't
    > > want to lose your data to a mistake in the query!
    > >
    > > Create a new Query based on your table. Apply whatever criteria you
    > > need to select those records which should be updated (and note that
    > > there ARE no 'row numbers' - you'll need criteria referencing fields
    > > in the table). Select the field that you want to blank out.
    > >
    > > Change the query to an Update query using the query type tool, or the
    > > Query menu option. On the Update To line under the field, type
    > >
    > > NULL
    > >
    > > just like that - no quotes, no punctuation.
    > >
    > > Run the query by clicking the ! icon.
    > >
    > >
    > > John W. Vinson[MVP]
    > >
     
  6. John Vinson

    John Vinson
    Expand Collapse
    Guest

    On Thu, 13 Jul 2006 13:00:02 -0700, KateL
    <KateL@discussions.microsoft.com> wrote:

    >Hi John, I can't believe it, I actually got it to work. I can't thank you
    >enough!!! I was going to sit here and manually delete 15000 records you have
    >saved me a day's work!!


    <g> That's a delight to hear. Glad to have been able to trade 30
    seconds of my time for a day of yours!

    Get to know Queries. They are the bedrock of any Access application.

    John W. Vinson[MVP]
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page