如何在访问中为项目分配任务?

时间:2017-05-10 14:14:01

标签: sql vba access-vba ms-access-2010

    UPDATE table1, (select top 1 [ID],chef,formateur,techni from table1 order by Num desc) 
AS x SET table2.ID = x.[ID], table2.Nom = x.[chef], table2.Nom = x.[formateur],
table2.Nom = x.[techni]
WHERE table2.mission="chef" and table2.mission="Formateur" and table2.mission="techni" ;

returns
table2                                            table 1
 ID | mission      |Nom|                ID |chef|Formateur|techni|   
 --------------------------------           ----------------------------
  1 |  chef        |   |                 1 |nom1|    nom2 | nom3|  
  2 |  Formateur   |   |               **Result**  
  3 |  techni      |   |                   ID | mission   | Nom|
                                         --------------------------  
                                            1 |  chef     | nom1|      
                                            2 |  Formateur| nom2|
                                            3 |  techni   | nom3|  
  1. 我想在表2中指定table1的名称。 我需要你的帮助:))

1 个答案:

答案 0 :(得分:0)

insert into table3(ID, categorie, DATE, Projets)
select ID, categorie, DATE, Projects, 'projetX'
from table2

<强>更新

我认为这回答了您更新的问题(您的表名和列名不一致,所以我不确定):

update TACHES_TEMPLATE, (select top 1 [Libelle Projects] from Projects order by ID desc) x
set TACHES_TEMPLATE.projets = x.[Libelle Projects]