Bonjour,
Je souhaite mettre à jour une table à partir de nodejs.
Le but est de faire un Update à partir d'un tableau (table) mais je bloque sur la maj d'un champ date
voici ma requête qui met bien un 'True' dans le champs Clos, mais le champs DateClos reste à null
Pouvez vous m'aider SVP
Code sql : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 declare @arr table (id int, dtcl datetime); SET NOCOUNT OFF; INSERT INTO @arr (id, dtcl) values (3464488, CONVERT(DATETIME, '26/05/2016 09:26', 103)); INSERT INTO @arr (id, dtcl) values (3462507, CONVERT(DATETIME, '26/05/2016 15:24', 103)); SET NOCOUNT ON; UPDATE T_STF_CtrlStf_V3 SET Clos = 1, DateClos = (SELECT dtcl FROM @arr WHERE (id = T_STF_CtrlStf_V3.ID)) WHERE (SourceId IN (3464488,3462507)) AND (Source = 'GRF')
Par avance je vous remercie
Partager