SELECT
CASE
WHEN (LEFT(`Data`,2))=10 THEN 'Barang 1'
WHEN (LEFT(`Data`,2))=20 THEN 'Barang 2'
WHEN (LEFT(`Data`,2))=30 THEN 'Barang 3'
WHEN (LEFT(`Data`,2))=40 THEN 'Barang 4'
WHEN (LEFT(`Data`,2))=50 THEN 'Barang 5'
ELSE 'none'
END AS `ProdName`
CASE
WHEN (MID(`Data`,3,2))=01 THEN 'Januari'
WHEN (MID(`Data`,3,2))=02 THEN 'Februari'
WHEN (MID(`Data`,3,2))=03 THEN 'Maret'
WHEN (MID(`Data`,3,2))=04 THEN 'April'
WHEN (MID(`Data`,3,2))=05 THEN 'Mei'
WHEN (MID(`Data`,3,2))=06 THEN 'Juni'
WHEN (MID(`Data`,3,2))=07 THEN 'Juli'
WHEN (MID(`Data`,3,2))=08 THEN 'Agustus'
WHEN (MID(`Data`,3,2))=09 THEN 'September'
WHEN (MID(`Data`,3,2))=10 THEN 'Oktober'
WHEN (MID(`Data`,3,2))=11 THEN 'November'
WHEN (MID(`Data`,3,2))=12 THEN 'Desember'
ELSE 'none'
END AS `ProdTime`
FROM `LOGGING BARCODE`
我收到了错误:
Data
,3,2))= 01那么' Januari'什么时候(MID(Data
,3,2))= 02那么' Fe'在第11行我需要解析Data
但是会发生错误
谢谢你的帮助