SQL - Query con *=

 
Vista:

Query con *=

Publicado por Rogelio Carmona (36 intervenciones) el 22/11/2006 20:01:13
tengo el siguiente query:

sSQL = "select Actividad = (case when sTipo = 'E' or sTipo = 'A' then Programa else sComentarioAcciones end),"
sSQL = sSQL & " pl.cEstatus, pl.sDirigidoA, tiempoMeta = datediff(day,pl.dFechaInicio, pl.dFechaFin), "
sSQL = sSQL & " Estatus = ( case "
sSQL = sSQL & " when pl.cEstatus = 'CO' "
sSQL = sSQL & " then 'Concluido' "
sSQL = sSQL & " when pl.cEstatus = 'CA' "
sSQL = sSQL & " then 'Cancelado' "
sSQL = sSQL & " when pl.cEstatus = 'CZ' and year(pl.dFechaFin) >= year(getdate()) and getdate() > pl.dFechaFin "
sSQL = sSQL & " then 'Atrasado' "
sSQL = sSQL & " when pl.cEstatus = 'CZ' and year(pl.dFechaFin) >= year(getdate()) and getdate() <= pl.dFechaFin"
sSQL = sSQL & " then 'Llevando a Cabo' "
sSQL = sSQL & " when (pl.cEstatus = 'PC' or pl.cEstatus = 'RE') and year(pl.dFechaFin) >= year(getdate()) and getdate() > pl.dFechaInicio "
sSQL = sSQL & " then 'Atrasado' "
sSQL = sSQL & " when (pl.cEstatus = 'PC' or pl.cEstatus = 'RE') and year(pl.dFechaFin) >= year(getdate()) and getdate() <= pl.dFechaInicio "
sSQL = sSQL & " then 'No comenzado' "
sSQL = sSQL & " when (pl.cEstatus = 'CZ' or pl.cEstatus = 'PC' or pl.cEstatus = 'RE') and year(pl.dFechaFin) < year(getdate()) "
sSQL = sSQL & " then 'No se cumplió' "
sSQL = sSQL & " else pl.cEstatus "
sSQL = sSQL & " end) "
sSQL = sSQL & " from programas p, formas f, planes pl, configuracion con "
sSQL = sSQL & " where pl.IdPrograma *= p.IdPrograma "
sSQL = sSQL & " and pl.IdForma = f.IdForma "
sSQL = sSQL & " and f.iYear = con.iYear "
sSQL = sSQL & " and f.nEmpleado = " & pNumeroNomina
sSQL = sSQL & " order by pl.dFechaInicio "

como puedo modificarlo para quitarle el *= y que funcione igual?
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Query con *=

Publicado por Isaías (5072 intervenciones) el 23/11/2006 20:48:54
Ya te di una respuesta en tu anterior posta
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar