Results 1 to 2 of 2
  1. #1
    joanas is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2015
    Posts
    9

    query - Juntar tabelas

    Bom dia,



    eu tenho as seguintes tabelas:
    mes_Actual e mes_ANT

    com as seguintes colunas

    mes_Actual mes_ANT
    CC Total CC Total
    120 20 120 20
    121 30 122 30

    quero criar uma consulta para obter uma tabela que cruze os dados, ou seja que contenha as seguintes colunas:


    tabela MESES
    CC Total_mes_Actual Total_mes_ANT
    (mes atual + mes ant)



    o cc deve ser a chave primaria e conter o CC do mes anterior e do mes atual
    e quando não houver valores para o CC do mes anterior (mes_ant) o campo deve ficar nulo.

    CC Total_mes_Actual Total_mes_ANT
    120 20 5
    121 30 (nulo)
    122 (nulo) 30



    podem ajudar?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    In English please.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 09-17-2012, 10:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums