Minggu, 10 Mei 2020

Re: [MSAccessProfessionals] Need help with an update query

Thanks Duane and Arnelito. Got it to work :-)

Steve


On 5/10/2020 5:26 PM, Duane Hookom wrote:
Try create a query with SQL like:

Update [table with lots of fields]
SET State = QTH
WHERE State = 1000;

I always start creation with a select query like:

SELECT  State, QTH, QTH as NewStateValue
FROM [table with lots of fields] 
WHERE State = 1000;


After I am satisfied with the results I change to an action query.

Regards,
Duane


From: MSAccessProfessionals@groups.io <MSAccessProfessionals@groups.io> on behalf of Steve <thaw5@suddenlink.net>
Sent: Saturday, May 9, 2020 9:33 PM
To: msaccessprofessionals@groups.io <msaccessprofessionals@groups.io>
Subject: [MSAccessProfessionals] Need help with an update query
 
I have a table with lots of fields. The two fields I am concerned with now are QTH and State. QTH is a long text field, State is a short text field.

Some records in the table have State set to 1000. For those records, I want to use an update query to set the State field equal to the QTH field.

The query to select the State=1000 records is easy to do. But I'm not well versed in the use of update queries. After I push the button to convert the select query to an update query, what goes in what cell in the query grid to set the State field to the value of the QTH field?

Thanks.

Steve

Tidak ada komentar:

Posting Komentar