Muy sencillo:
Código SQL:
Ver originalSELECT
DISTINCT p.Papel,p.FechaP,p.Rollo,p.Maquina,
TEADMProm+TEADCProm AS [TEADM+DC],JumboDelMes,Fecha
INTO #tmpa [B]------------- Aqui coloca esta linea[/B]
FROM
propad01 AS p
INNER JOIN
caljum02
ON p.FechaP = caljum02.FechaP AND p.Rollo = caljum02.Rollo AND
p.Papel = caljum02.Papel AND p.Maquina = caljum02.Maquina
INNER JOIN
catpap01
ON catpap01.Id_Papel = p.Papel AND (catpap01.Familia LIKE 'EXTENSA' OR catpap01.Familia LIKE 'SACO')
WHERE p.Papel='A-090EXT'