My Assistant
![]() ![]() |
|
|
Jan 28 2006, 03:36 PM
Post
#1
|
|
|
UtterAccess Guru Posts: 877 |
I haven't used action queries very much, but I want to confirm that if I create a delete query, that I can't just delete a field in the selected row. The delete query will delete the entire row, even if I just include one field in the SQL construct.
Example: strSQLDELETE = "DELETE FIELD1 FROM [TABLEA] WHERE FIELD1 = 'SomeValue' CurrentDb.Execute strSQLDELETE This will in fact delete the entire row and not just Field1 (assuming that there is more than one field in TableA) |
|
|
|
Jan 28 2006, 03:38 PM
Post
#2
|
|
|
UtterAccess VIP Posts: 23,583 From: Mississippi |
Yes, in the past when I have used delete queries, I have only put the Primary Key field in the Where clause. It will delete the ENTIRE record.
|
|
|
|
Jan 28 2006, 03:40 PM
Post
#3
|
|
|
UA Forum Administrator Posts: 38,073 From: Birmingham, Alabama USA |
That is correct ...
If you want to delete a value in field in a record and retain the record .. you need to use an Update Query instead ... You update the value to a Null (or whatever value you want it to be) ... RDH |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 19th May 2013 - 08:20 PM |