Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8522847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:14:34+00:00 2026-06-11T07:14:34+00:00

I have a question and I can’t come up with a good way to

  • 0

I have a question and I can’t come up with a good way to solve it, this is using SQLServer 2008R2.

I have 3 tables

Client, Invoice, Car

The client is duplicate n times, but each client has a ticket and one product.

So I am trying to consolidate the clients (with a unique identifier), now my question would be how to update the reference field on the product and ticket.

Example

**Client**

[Nombre]
      ,[Apellido_Paterno]
      ,[Apellido_Materno]
      ,[Sexo]
      ,[Estado_Civil]
      ,[Fecha_Nacimiento]
      ,[RFC]
      ,[Saludo]
      ,[Persona]
      ,[Razon_Social]
      ,[Direccion]
      ,[Colonia]
      ,[Municipio_Delegacion]
      ,[Estado]
      ,[Codigo_Postal]
      ,[Lada_Casa]
      ,[Telefono_Casa]
      ,[Ext_Telefono_Casa]
      ,[Lada_Oficina]
      ,[Telefono_Oficina]
      ,[Ext_Telefono_Oficina]
      ,[Telefono_Celular]
      ,[Email_Personal]
      ,[Vehiculo_Actual_Anterior]
      ,[Marca_Actual_Anterior]
      ,[AnioModelo_Actual_Anterior]
      ,[Color_Actual_Anterior]
      ,[Escolaridad]
      ,[Venta_Id]
      ,[Nombre1]
      ,[Nombre2]

**Invoice**

[Factura_Cliente]
      ,[Factura_Distribuidor]
      ,[Precio_Base_Vehiculo]
      ,[Precio_Accesorios]
      ,[Precio_Vehiculo_DeContado]
      ,[Descuento]
      ,[Incentivo_Calculado]
      ,[Fecha_Entrega_DelVehiculo]
      ,[Fecha_Factura_Cliente]
      ,[Clave_Distribuidor]
      ,[Seguro_Gratis]
      ,[Clave_Promocion]
      ,[Tipo_Venta]
      ,[Unidad_de_Intercambio]
      ,[Venta_Id]

**Car**

[Modelo]
      ,[Marca]
      ,[AnioModelo]
      ,[Basico]
      ,[Cabecera]
      ,[Version]
      ,[Color_Exterior]
      ,[Color_Interior]
      ,[VIN]
      ,[Motor]
      ,[Transmision]
      ,[Origen]
      ,[Basico_Linea_Modelo]
      ,[Venta_Id]

I can consolidate the clients, (even if they have discrepancies on their fields), but I can’t find a effective solution for this.

Edit: The first column on client shows the duplicate, while the second is the id that match the ticket and product.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T07:14:36+00:00Added an answer on June 11, 2026 at 7:14 am

    i would make two more tables.

    one for new consolidated clients (with all the same fields as the normal client)
    and a mapping table between the old client and the new client.

    this mapping table should store the id of the old one, and which i it was mapped to as a new one.

    from here its pretty easy. update the other tables with the new id based on its current old id in the map table..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question can have different answers because everyone would do it his own way.
Reading this article http://support.microsoft.com/kb/813878 I have a question: Where can I get ipseccmd.exe for
I have not been able to find any definitive answers to this question: Can
I know this question can be answered by searching in google. But I have
Making my way through the GAE documents. I have a question I can't find
I have a question Can we convert date 20-06-2011 (dd-mm-yyyy) into 0611 using sql
Hi I have a question that can I use such a this code: if
I have next question: can I in any way attach my script file to
I'm pretty new to Python programming so I have this question: How can I
this question can create a misunderstanding: I know I have to use CSS to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.