1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| DECLARE @T TABLE
(
ID INT,
[TYPE] BIT,
[DATE] DATETIME,
COMMENTAIRE VARCHAR(20)
);
INSERT INTO @T (ID, [TYPE], [DATE], COMMENTAIRE)
SELECT 123856, 'False', CONVERT(DATETIME, '24/09/2009 10:20:00', 103), 'ajout prix' UNION ALL
SELECT 123859, 'True' , CONVERT(DATETIME, '24/09/2009 14:00:00', 103), 'validation' UNION ALL
SELECT 123895, 'False', CONVERT(DATETIME, '25/09/2009 14:30:00', 103), 'ajout prix' UNION ALL
SELECT 123895, 'False', CONVERT(DATETIME, '25/09/2009 15:00:00', 103), 'ajout quantite' UNION ALL
SELECT 123895, 'True' , CONVERT(DATETIME, '25/09/2009 17:00:00', 103), 'validation' UNION ALL
SELECT 186914, 'False', CONVERT(DATETIME, '24/06/2009 14:00:50', 103), 'ajout prix' UNION ALL
SELECT 186914, 'True' , CONVERT(DATETIME, '25/09/2009 17:00:00', 103), 'ajout quantite' UNION ALL
SELECT 186917, 'False', CONVERT(DATETIME, '25/09/2009 15:00:00', 103), 'ajout quantite';
SELECT * FROM @T;
ID TYPE DATE COMMENTAIRE
----------- ----- ----------------------- --------------------
123856 0 2009-09-24 10:20:00.000 ajout prix
123859 1 2009-09-24 14:00:00.000 validation
123895 0 2009-09-25 14:30:00.000 ajout prix
123895 0 2009-09-25 15:00:00.000 ajout quantite
123895 1 2009-09-25 17:00:00.000 validation
186914 0 2009-06-24 14:00:50.000 ajout prix
186914 1 2009-09-25 17:00:00.000 ajout quantite
186917 0 2009-09-25 15:00:00.000 ajout quantite |
Partager