Solved

access sql query

Posted on 2013-01-29
5
202 Views
Last Modified: 2013-01-30
I need to create a query that would delete all data in a table minus one field that needs to stay.  Not deleteing rows. just the data in them
0
Comment
Question by:aplona
  • 2
  • 2
5 Comments
 
LVL 61

Accepted Solution

by:
mbizup earned 250 total points
ID: 38832511
That would be an update query...

Update yourtable
Set fld1 = null, fld2= null etc
0
 

Expert Comment

by:Laurianne
ID: 38832522
You could try a "set column_name = null" for all the columns except for the one that you do not wish to blank?

update tablename
set tablename_field2 -= null,
     tablename_field3 = null,
..... and so on blanking all the columns with nulls except for the one you will not list here.  

Tablename being your table's name and tablename_field# being the columns you wish to blank.. just leave the one you do not want blanked alone.  

Hope this helps!
0
 
LVL 3

Author Comment

by:aplona
ID: 38832562
I figured it out.  I can do the update through design view.
0
 
LVL 3

Author Comment

by:aplona
ID: 38832591
I've requested that this question be deleted for the following reason:

completed through design view.
0
 
LVL 61

Expert Comment

by:mbizup
ID: 38832592
The original question didn't specify design or sql view.

The sql generated by this query created in design view is going to be basically what we responded with here.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Input box criteria 3 19
How to get the MS access function DSUM to work? 4 31
DCount using "OR" 4 17
Max per month 3 14
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now