Update Query saying 0 Records will be update.

NBVC

Only trying to help
Local time
Today, 14:48
Joined
Apr 25, 2008
Messages
317
Update Query saying 0 Records will be updated

Hi Guys,

Not sure what I am missing here.

I have a simple Select Query based on one table.

In SQL View, the query is:

Code:
SELECT SYSADM_CUSTOMER_ORDER.ID, SYSADM_CUSTOMER_ORDER.STATUS
FROM SYSADM_CUSTOMER_ORDER
WHERE (((SYSADM_CUSTOMER_ORDER.ID) Like 'Q%') AND ((SYSADM_CUSTOMER_ORDER.STATUS)="H"));
so basically getting all records in the CUSTOMER_ORDER table that have ID beginning with Q and the STATUS is H (on hold).

I want to simply update these to change the STATUS to C (closed).

I converted the SELECT Query to an UPDATE Query and added a "C" in the Update To Field.

The SQL View is now:

Code:
UPDATE SYSADM_CUSTOMER_ORDER SET SYSADM_CUSTOMER_ORDER.STATUS = "C"
WHERE (((SYSADM_CUSTOMER_ORDER.ID) Like 'Q%') AND ((SYSADM_CUSTOMER_ORDER.STATUS)="H"));
But for some reason Access is telling me that it will update 0 records. There are over 2500 records to update.

Any ideas on what I am missing?
 
Last edited:
Try * for the wildcard.
 
Hi pbaldy,

I am not exactly sure what you mean.

How do I set up the Update Query then?

When I try to create the Update query, Access tells me that you can't run an update query on the * wildcard

(Note:: Access 2003)
 
I mean change % to *.
 
Oh, I see.

Yes, that worked. Thanks.

Can you tell me why, the SELECT worked fine with the %, but the Update did not? And why it works with *?
 
Generally speaking, JET/ACE and DAO use *, ADO uses %. I'm a little surprised it worked in the SELECT query, so perhaps something has changed. Is the data in SQL Server?
 
The data is actually in ORACLE.
 
Ok. Great. I'll keep that in mind.

Thanks again for the quick help.
 

Users who are viewing this thread

Back
Top Bottom