我有一个csv导入表,在这里我试图将日期从字符串原样转换为日期字段类型。我没有在数据中看到任何表明这应该是问题的东西,但是在执行查询时出现以下错误
“从字符串转换日期和/或时间时转换失败。”
我希望有人看到我看不到的东西
这是查询
Select
i.item_no,
i.cust_ident_1,
CASE
WHEN i.Item_no IS NULL THEN 'Z00000'
WHEN LEN(i.item_no) <= 4 THEN 'Z00000'
ELSE LEFT(i.item_no, LEN(i.item_no) - 4)
END AS ItemNo,
cast(replace(qty_ordered, ',' , '') as integer) as
W_QtyOrdered,
cast(replace(fg_qty, ',' , '') as integer) as
WFinishedGoodsQty,
cast(replace(i.qty_shipped, ',' , '') as integer) as
WQty_Shipped,
cast(replace(i.on_hand_1, ',' , '') as integer) as WOnHand,
convert(date, due_date) as due_date
from data.email i
where i._modified >= (select max(_modified) from data.email)
这是我要转换的日期列表,因为它们在csv导入表中表示出来
4/24/19
4/30/19
5/14/19
4/16/19
不确定这些天我需要做什么才能使转换生效