Ver Mensaje Individual
  #4 (permalink)  
Antiguo 20/04/2010, 09:42
halt60
 
Fecha de Ingreso: abril-2010
Mensajes: 8
Antigüedad: 14 años
Puntos: 0
Mensaje Respuesta: datos de un campo en varias columnas

he intentado con PIVOT pero no he podido.

Puse el siguiente codigo:

DS_Regiones.SelectCommand = "set language spanish SELECT TipoAuditoria,[1]Totales,[2]ATENDIDAS,[3]PENDIENTES FROM(select TipoAuditoria from AnomRecom where [FechaDeteccion]>=@Ini and [FechaDeteccion]<=@Fin) PIVOT ( count(*) for status IN ([1], [2], [3]))AS PivotTable "


DS_Regiones.SelectParameters("Ini").DefaultValue = TxtInicial.Text.ToString
DS_Regiones.SelectParameters("Fin").DefaultValue = TxtFinal.Text.ToString

Les pido su amable ayuda


Gracias.....