Jump to content
jonnytekno

Force data into unique row format

Recommended Posts

I have marketing campaign some data where there is a unique campaign id and then a campaign name. 

But, there can sometimes be more than one campaign name for a single campaign id - this means joining the campaign name to other data where the campaign id exists is hard. I want to be able to force the data into a table where the campaignid and campaign name are always unique, which means I need to drop one of the campaign names, but don't care which (they are practically identical apart from typos etc)

How can I do a select id, name from [table] group by id, name where I know that the id is never going to be duplicated?

Share this post


Link to post
Share on other sites

You'll need to get the list of IDs and names and figure out which one to use, and just insert that data into the new table.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...