I'm not quite sure how to do this...
I have Table A which has 100,000 records but no names and I have Table B which is made up of 30,000 records previously pulled from Table A and manually filled in Name fields, but whoever pulled it forgot to pull the ZipCode field, so now I need to populate...
I want to move all fields of all records that have a duplicate email address to another table so that I can sort through those at my leisure while still having the previous table without any duplicates for email blasts. I have this code to find duplicate email records, but I'm not sure how to...
I have a ZipCode field that needs to be an integer for query purposes, but it lops off the leading zeroes on zips like 03421. Is there a way to make it allow leading zeroes other than changing the datatype to char?
Thanks! You're right, I didn't need it.
Cleaned up my code is this...
Select a.Email,
a.*
from dbo.t_contacts a
join
(select Email
from dbo.t_contacts
group by Email
having count(*) > 1) b
on a.Email = b.Email
order by a.Email
How do I put it into code like this..
Select cast(a.Email as char(20)) as Email,
convert(char(8),a.FirstName,110) as FirstName,
a.LastName,
a.Company,
a.Title,
a.MiddleName,
a.Prefix,
a.Country,
a.Accreditations
from dbo.t_contacts a
join
(select Email
from...
I have a very messy database that I'm trying to sort through.
I need to find the records that have duplicates, manually ensure that one record has ALL of the information, then manually delete the extras. So say for example, I want to find ALL the records with duplicate email addresses and view...
That was EASY! Thanks again George.
For the other poster...
We need a column that only contains 5 digit zip codes to do a radius search by zip. All other postal codes are copied in a separate column for mailing. (including canada)
Thanks George, I got it to work.
NOW I just need to know how to turn zips from
97217-1811
into
97217
How do I delete the last 5 characters from an entry?
I'm trying to delete all zip code data that doesn't conform to the USA standard 5 digit zip in column ZipCode.
Currently the column contains zips and postal codes in a wide variety of formats...
97217
97217-1811
V0N 1B0
ER34B7R88
97217, OR
Ideally, I would like to delete all the zip codes...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.