[AccessD] update query - question#1

Drawbridge.Jack at ic.gc.ca Drawbridge.Jack at ic.gc.ca
Thu Jul 22 08:44:28 CDT 2004


Kathryn,

Not sure if you have resolved this but here is SQL to try.

Create a new query; go to SQL Mode and type this in. Then switch to Query
Design and it will have the names and criteria.

UPDATE tblCemeteries4Updating
 SET tblCemeteries4Updating.Surname =
StrConv(Mid([Name],1,InStr([Name],",")-1),3)
, tblCemeteries4Updating.FirstName = Mid([Name],InStr([Name],",")+1);

If the format of Name always has the surName followed by a ",", then this
should work.

Good luck
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of KathrynAtGwens
Sent: Monday, July 19, 2004 3:33 PM
To: accessd at databaseadvisors.com
Subject: [AccessD] update query - question#1


I have a table named 
tblCemeteries4Updating
The pertinant fields are:
Name
Surname
FirstName
MarrName

Query #1
Name currently has (for example)
WESTWATER, John Ovenstone
I want to update this table to put Westwater (initial letter cap only, rest
smalls) into the Surname field and John Ovenstone in the FirstName field.
I know I have to first make a query with the fields in it, and then change
it to an update query. That gives me the grid boxes for "Update To" and
"Criteria" but I'm not sure what to type in them.

After that is done, I have another update, but I think I'll do one at a
time. Maybe with the answer to this one, I might be able to figure out the
other one, though the other one involves two tables, so I might be back.

--
Kathryn Bassett (at work address)
kathrynatgwens at socal.rr.com
kathryn at bassett.net (home) 

-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list