On Jun 18, 4:56*am, Geo <hw9j-s...@dea.spamcon.org> wrote:
> On Wed, 16 Jun 2010 10:50:20 -0600, John W. Vinson
>
> <jvinson@STOP_SPAM.WysardOfInfo.com> wrote:
>
> Thanks for the reply - been busy with manual work.
>
> >An Update and/or Append query will do the job (update to replace existing
> >values, append to add new ones). The details will depend on the actual
> >structure of your tables; you'll almost certainly need more than one query
> >(one for each table you're updating), and you may need some additional
> >indexes.
>
> Understood - update and append query works fine if I keep the same structure as
> the spreadsheet but, as you say, it gets complicated when the structure is
> different.
>
> >One very real problem with a table of members is reliably identifying new
> >members. You CANNOT go by names, since people's names are not unique (I know
> >three guys named Fred Brown). You'll need some provision to identify such in
> >the spreadsheet, and it may be difficult!
>
> They /almost/ have that covered by using a unique membership number.
> Unfortunately they have completely duplicated rows in the spreadsheets where one
> member has (say) 4 email addresses - so another work-round required.
>
> --
> Geo
this is one case where a UNION query might help... provided you don't
have to do this very often... (or more than once)
UNION will remove duplicate values, so you could do something like
SELECT MemberID, e-mail1 As EMail
FROM mytable
WHERE e-mail1 IS NOT NULL
UNION
SELECT MemberID, e-mail2
FROM mytable
WHERE e-mail2 IS NOT NULL
UNION
....
then you could create an append query to write to a table of e-mail
addresses.
|