SQL code to switch fields on certain constituent addresses?

We've recently discovered that a large number of the addresses on our Institutional constituents were entered weirdly, with the street address in Street Address 1 and the organizational name in Street Address 2 (see pic for example). So when we create addresses from these entries, we end up with:

John Doe

1 Main St

Business Name

City, State Zip

If I isolate into a list all of the records that need to be updated, is there a SQL process that could automatically switch Street Addresses 1 & 2 for all of those records? Or are we stuck updating these one by one? 

Thanks, from a grateful SQL beginner!

Parents
  • Business Name in Street 2 is a pretty common convention.  I wonder if it would be better to see if your process for outputting addresses could be adjusted?  One concern I would have is that there are other processes which might expect a proper street address in street1, for instance duplicate identification.

  • Ah, I was not aware of this. The problem I ran into with the output is that it included addresses for households, individuals, and organizations, for printing on envelopes for our holiday cards. So while the individual/household envelopes looked fine with Salutation|Street 1|Street 2, the envelopes for organizations looked wonky. 

    I'll give this a think, but maybe it just has to stand that if we're sending one mailing list to the printer we have to do some manual cleanup in Excel first. 

Reply
  • Ah, I was not aware of this. The problem I ran into with the output is that it included addresses for households, individuals, and organizations, for printing on envelopes for our holiday cards. So while the individual/household envelopes looked fine with Salutation|Street 1|Street 2, the envelopes for organizations looked wonky. 

    I'll give this a think, but maybe it just has to stand that if we're sending one mailing list to the printer we have to do some manual cleanup in Excel first. 

Children