La fonction SYSDATE est-elle appropriée?
Bonjour,
je voudrais toutes les commandes dont la "creation_date" est aujourd'hui.
Si je remplace, dans l'avant dernière ligne de code "to_date ('24/10/2012', 'DD/MM/YYYY')" par "sysdate" ça ne marche pas.
Que faire?
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| SELECT DISTINCT
ooh.order_number "num commande"
, ool.ordered_item "article commande"
, msi.SEGMENT1 "article en prod"
, ool.ordered_quantity "quantité"
, trunc(ooh.creation_date) "date de réception"
FROM oe_order_headers_all ooh
LEFT JOIN oe_order_lines_all ool ON ooh.header_id = ool.header_id
INNER JOIN mtl_serial_numbers msn ON msn.serial_number = to_char(ooh.order_number)
INNER JOIN mtl_system_items msi ON msn.inventory_item_id = msi.inventory_item_id
WHERE ooh.order_type_id = 3435
AND ooh.org_id = 119
AND trunc(ooh.creation_date) = to_date ('24/10/2012', 'DD/MM/YYYY')
and msn.attribute15 is null |
Merci pour votre aide,
Douchka