Ver Mensaje Individual
  #4 (permalink)  
Antiguo 25/04/2013, 08:29
Avatar de Libras
Libras
Colaborador
 
Fecha de Ingreso: agosto-2006
Ubicación: En la hermosa perla de occidente
Mensajes: 7.412
Antigüedad: 18 años
Puntos: 774
Respuesta: Correlativo en consulta SQL

y un

Código SQL:
Ver original
  1. DECLARE @MAX INT
  2. selet @MAX=MAX(campo) FROM tabla GROUP BY id
  3.  
  4. INSERT INTO TablaDetalle (id, descripcion)
  5. SELECT @MAX, descripcion FROM TABLATEMPORAL

no te sirve?
__________________
What does an execution plan say to t-sql query? Go f**k yourself, if you are not happy with me