Hola asi quedo pero me sgue marcando no column name:
Código SQL:
Ver originalSELECT h.hora AS hora1,h.marca,h.codoptima AS codoptimaT,h.target,P.CODOPTIMA,O.CODIGO,
p.hora,p.peso,p.vaso,p.fecha,o.linea,o.tubo
INTO #che
FROM pesos AS p, optimas AS o,htargets AS h
WHERE o.codigo = p.codOptima AND o.linea = 'L01S'
AND o.tubo LIKE '%' AND p.fecha BETWEEN '2010-06-21 08:00' AND '2010-06-21 08:30'
AND p.hora='8:00 - 8:30' AND h.codoptima = o.codigo AND h.hora='8:00 - 8:30'
SELECT *,(SELECT COUNT(1)total FROM #che AS totality) FROM #che
Dejo una csaptura en el siguiente link
http://omploader.org/vNHBrbQ