question

JoaqunEspallargasLled-8675 avatar image
0 Votes"
JoaqunEspallargasLled-8675 asked DSPatrick answered

Consulta rellenar campo si existe

hola,


tengo el siguiente problema


  • dos tablas (A y B) y necesito un informe con todo A añadiendo campos de B cuando exista

  • hago consulta y me da informe. Tabla C

  • en tabla A aparecen X registros

  • en tabla B aparecen Y registros de los que necesito que en la consulta me aparezca un campo si

  • Cumple con dos requisitos en B

  • Si no aparece en B el registro de A debe aparecer y el campo concreto en blanco


El problema es que en C sólo me aparecen los registros que hay en A y B. El problema viene de las condiciones necesarias de B (la dos últimas)


HAVING ((([BASE$Payment Order].[Nº contrato confirming])<>"")

AND (([BASE$Payment Order].[Posting Date])

Between (select inicio from fechas) And (select fin from fechas))

AND (([BASE$Purch_ Inv_ Line].Type)=1)

AND (([BASE$Purch_ Inv_ Line].[Line No_])=10000));


¿cómo lo puedo solucionar? Gracias

not-supported
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

DSPatrick avatar image
0 Votes"
DSPatrick answered

QnA forums are currently English only. I'd try asking for help over here in dedicated forums.
https://social.msdn.microsoft.com/Forums/es-es/home
https://social.technet.microsoft.com/Forums/es-es/home
https://answers.microsoft.com/es-es

--please don't forget to upvote and Accept as answer if the reply is helpful--


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.