我的sunday_code

博客内容提及开始起航,虽信息简短,但传达出开启新征程之意。

开始起航......

SELECT sm3.item_code AS item_code , sm3.shipment AS shipment , sm3.order_start_date AS order_start_date , sm3.order_end_date AS order_end_date , '99991231' AS delivery_date , sm3.pattern_type AS pattern_type , sm3.pattern_code AS pattern_code , sm3.host_cycle_code AS host_cycle_code , sm3.store_cycle_code AS store_cycle_code , sm3.lead_time AS lead_time <!-- 障害5680 START --> , COALESCE(nkm7.delivery_schedule_code, '0') AS delivery_schedule_code <!-- 障害5680 END --> , sm3.pma_code AS pma_code , sm3.information_category_code AS information_category_code , sm3.subcategory_code AS subcategory_code , sm3.vendor_code AS vendor_code , sm3.item_name AS item_name , sm3.quantity AS quantity , sm3.order_unit AS order_unit , sm3.order_limit_quantity AS order_limit_quantity , sm3.minimum_order_quantity AS minimum_order_quantity , sm3.recommendation_sales_price AS recommendation_sales_price , sm3.quantity_sales_price AS quantity_sales_price , sm3.cost_unit_price AS cost_unit_price , sm3.gp AS gp , CASE WHEN tgm3.item_code IS NOT NULL THEN '1' ELSE '0' END AS special_sale_price_flag <!-- 障害5680 START --> , COALESCE(tgm3.special_cost_unit_price, 0) AS special_cost_unit_price , COALESCE(tgm3.special_sales_unit_price, 0) AS special_selling_price , COALESCE(tgm3.special_gp, 0) AS special_gp , tgm3.apply_start_date AS special_cost_unit_price_apply_start_date , tgm3.apply_end_date AS special_cost_unit_price_apply_end_date <!-- 障害5680 END --> , sm3.date_type AS date_type , sm3.monday_no_delivery AS monday_no_delivery , sm3.tuesday_no_delivery AS tuesday_no_delivery , sm3.wednesday_no_delivery AS wednesday_no_delivery , sm3.thursday_no_delivery AS thursday_no_delivery , sm3.friday_no_delivery AS friday_no_delivery , sm3.saturday_no_delivery AS saturday_no_delivery , sm3.sunday_no_delivery AS sunday_no_delivery , sm3.freshness_management_type AS freshness_management_type , sm3.delivery_freshness AS delivery_freshness , sm3.sales_freshness AS sales_freshness , sm3.date_quantity_unit AS date_quantity_unit <!-- 障害5680 START --> , COALESCE(hjm3.ob_code, '9999') AS ob_code <!-- 障害5680 END --> , sdmp3.recommendation_cut_date AS recommendation_cut_date , NULL AS first_order_date , NULL AS first_delivery_date , '9' AS first_1_week_type , pmam3.unprofitableline_evaluation_excluded_flag AS unprofitableline_evaluation_excluded_flag , '0' AS item_status_type_display_change_flag , jm3.information_category_display_order AS information_category_display_order , 0 AS order_quantity , '0' AS send_flag , 0 AS confirm_delivery_plan_quantity , 0 AS first_delivery_plan_quantity <!-- 障害5390 発注読取非デイリー商品・陳列位置作成-v352 start --> , CASE WHEN jm3.adopt_setting_impossible_flag IN ('1', '2') THEN '9' ELSE '2' END AS adopt_type , CASE WHEN jm3.adopt_setting_impossible_flag IN ('1', '2') THEN '9' ELSE '2' END AS item_adopt_type <!-- 障害5390 発注読取非デイリー商品・陳列位置作成-v352 end --> , NULL AS tasting_flag , 0 AS tentative_order_quantity , '1' AS order_impossible_flag , '0' AS forward_no_delivery_frag , '9' AS new_week_type <!-- 障害5680 START --> , COALESCE(bkm3.unpacked_code, LPAD('',8 )) AS unpacked_code , COALESCE(bkm3.unpacked_conversion_quantity, 0) AS unpacked_conversion_quantity , COALESCE(bkm3.unpacked_conversion_excluded_flag, ' ') AS unpacked_conversion_excluded_flag , COALESCE(bkm3.unpacked_code, sm3.item_code) AS unpacked_item_code <!-- 障害5680 END --> , '1' AS other_information_category_flag , ksm3.not_daily_ai_order_minimum_display_quantity_input_flag , skm3.order_method_type AS order_method_type <!-- 障害5340 発注読取非デイリー商品・陳列位置作成-v350v351 start --> , CASE WHEN skm3.order_method_type IN ('04', '05', '06') THEN jm3.ai_order_use_type WHEN skm3.order_method_type = '09' AND sm3.freshness_management_type in ('1', '2') THEN jm3.long_freshness_daily_ai_order_target_type ELSE '0' END AS ai_order_use_type <!-- 障害5340 発注読取非デイリー商品・陳列位置作成-v350v351 end --> , '0' AS tentative_order_existence_flag FROM <!-- 障害5680 START --> m_date_of_item_by_pattern_${dateInformationOfItemByPatternVersion} sdmp3 LEFT OUTER JOIN m_delivery_type_${deliveryTypeVersion} nkm7 <!-- 障害5680 END --> ON nkm7.original_store_code = #{originalStoreCode} AND nkm7.host_cycle_code = #{hostCycleCode} AND nkm7.apply_start_date <= #{specifyOrderDate} ::DATE AND nkm7.apply_end_date >= #{specifyOrderDate} ::DATE INNER JOIN m_itemWK sm3 ON sm3.item_code = sdmp3.item_code AND sm3.pattern_type = sdmp3.pattern_type AND sm3.pattern_code = sdmp3.pattern_code AND sdmp3.recommendation_cut_date - INTERVAL '1 day' BETWEEN sm3.apply_start_date AND sm3.apply_end_date AND sm3.order_end_date < #{specifyOrderDate} ::DATE <!-- 障害5680 START --> INNER JOIN m_pma_${pma} pmam3 <!-- 障害5680 END --> ON pmam3.pma_code = sm3.pma_code AND pmam3.apply_start_date <= #{specifyOrderDate} ::DATE AND pmam3.apply_end_date >= #{specifyOrderDate} ::DATE INNER JOIN order_reading_selection_information_categoryWK hyj3 ON hyj3.host_cycle_code = sm3.host_cycle_code AND hyj3.store_cycle_code = sm3.store_cycle_code AND hyj3.information_category_code = sm3.information_category_code <!-- 障害5680 START --> INNER JOIN m_cycle_${cycleVersion} skm3 <!-- 障害5680 END --> ON skm3.host_cycle_code = sm3.host_cycle_code AND skm3.store_cycle_code = sm3.store_cycle_code AND skm3.apply_start_date <= #{specifyOrderDate} ::DATE AND skm3.apply_end_date >= #{specifyOrderDate} ::DATE LEFT OUTER JOIN m_order_basic_setting ksm3 ON ksm3.original_store_code = #{originalStoreCode} <!-- 障害5680 START --> INNER JOIN m_information_category_${informationCategoryVersion} jm3 <!-- 障害5680 END --> ON jm3.information_category_code = sm3.information_category_code AND jm3.apply_start_date <= #{specifyOrderDate} ::DATE AND jm3.apply_end_date >= #{specifyOrderDate} ::DATE LEFT OUTER JOIN m_adopt tm3 <!-- 障害5997 発注読取非デイリー商品・陳列位置作成-v386 start --> ON tm3.original_store_code = '${originalStoreCode}' <!-- 障害5997 発注読取非デイリー商品・陳列位置作成-v386 end --> AND tm3.item_code = sm3.item_code <!-- 障害5680 START --> LEFT OUTER JOIN m_date_of_item_by_store_${dateInformationOfItemByStoreVersion} sdmk3 <!-- 障害5680 END --> ON sdmk3.original_store_code = #{originalStoreCode} AND sdmk3.item_code = sm3.item_code AND sdmk3.recommendation_cut_date < #{specifyOrderDate} ::DATE <!-- 障害5680 START --> LEFT OUTER JOIN m_display_order_${displayOrderVersion} hjm3 <!-- 障害5680 END --> ON hjm3.item_code = sm3.item_code AND hjm3.apply_start_date = ( SELECT MAX(hjmt3.apply_start_date) AS apply_start_date FROM <!-- 障害5680 START --> m_display_order_${displayOrderVersion} hjmt3 <!-- 障害5680 END --> WHERE hjmt3.apply_start_date <= #{thisMonday} ::DATE ) <!-- 障害5680 START --> LEFT OUTER JOIN m_special_original_selling_price_${specialOriginalSellingPriceVersion} tgm3 <!-- 障害5680 END --> ON tgm3.item_code = sm3.item_code AND tgm3.pattern_type = sm3.pattern_type AND tgm3.pattern_code = sm3.pattern_code AND tgm3.apply_start_date <= #{specifyOrderDate} ::DATE AND tgm3.apply_end_date >= #{specifyOrderDate} ::DATE <!-- 障害5680 START --> LEFT OUTER JOIN m_unpacked_conversion_${unpackedConversion} bkm3 <!-- 障害5680 END --> ON bkm3.item_code = sm3.item_code AND bkm3.pattern_type = sm3.pattern_type AND bkm3.pattern_code = sm3.pattern_code AND bkm3.apply_start_date <= #{specifyOrderDate} ::DATE AND bkm3.apply_end_date >= #{specifyOrderDate} ::DATE INNER JOIN order_reading_date_managementWK hhk3 ON hhk3.date_type = sm3.date_type WHERE ( sdmp3.delivery_schedule_code = '0' OR sdmp3.delivery_schedule_code = nkm7.delivery_schedule_code ) AND sdmp3.recommendation_cut_date < #{specifyOrderDate} ::DATE AND sdmk3.item_code IS NULL 给我分析一下LEFT OUTER JOIN m_adopt tm3是不是多余的
08-06
SQL : insert into m_item(version,pattern_type,pattern_code,item_code,shipment,system_item_code,apply_start_date,apply_end_date,order_start_date,order_end_date,vendor_code,pma_code,information_category_code,subcategory_code,item_name,item_name_for_search,pos_item_name,maker_code,license_code,quantity,particular_type,tax_type,indefinite_type,marketprice_item_type,magazine_period_revised_type,magazine_store_information_output,special_order_item_type,reserve_item_type,sales_report_separation_type,consigned_item_type,item_size_width,item_size_height,item_size_depth,item_rank,specific_item_type,matrix_vertical_code,host_cycle_code,store_cycle_code,lead_time,common_delivery_code,label_code,order_unit,order_limit_quantity,minimum_order_quantity,cost_unit_price,recommendation_sales_price,gp,quantity_cost_price,quantity_sales_price,keyff_number,small_keyff_number,monday_no_delivery,tuesday_no_delivery,wednesday_no_delivery,thursday_no_delivery,friday_no_delivery,saturday_no_delivery,sunday_no_delivery,freshness_management_type,delivery_freshness,sales_freshness,date_quantity_unit,freshness_over_time_type,instore_aggregate_flag,date_type,addition_order_type,revised_order_type,price_change_unnecessary_flag,distribution_separation_type,return_permission_type,magazine_type,cut_reason_code,price_change_reason_code,image_discrimination_code,payment_status,pricing_status,misc_status,forced_content_apply_date,order_code,prepaidcard_payment_status,item_tax_rate,pos_image_discrimination_code,point_excluded_flag,price_sticker_output_type,leaflet_print_permission_type,recommendation_reason_discrimination_code,internet_item_type,recommendation_item_category_type,dutyfree_type,payment_status_2,stockout_permission_flag,delivery_start_date,first_delivery_end_date,disaster_common_delivery_type_code,serial_number_scan_type,update_datetime,update_function_id,update_person_id,update_count) values ('0725_002','03','517','010002','0','5ca60ba0-f900-46ef-a271-1b08a0cd98bd',DATE '2025-08-04',DATE '9999-12-31',DATE '2025-04-07',DATE '9999-12-31','90032','01','0102','1','アサヒ ザ・ビタリスト      350ml','アサヒ ザ・ビタリスト      350ml','アサヒ ザビタリスト350ml ','4901004 ','01',1,' ','1',' ',' ',' ',' ',' ',' ',' ',' ',66,123,66,' ',' ',' ','E','35','02',' ','4901004062451',24,999,0,175.10,216,18.9,175.10,216,' ',' ',' ',' ',' ',' ',' ',' ',' ','2',5,2,'2',' ','0','2','0','0',' ',' ',' ',' ',' ',' ','00',2,0,3,DATE '1900-01-01',' ',' ','100',' ',' ','1',' ','004',' ','10',' ',' ',' ',DATE '2025-04-15',DATE '2025-04-15','C',' ',TIMESTAMP '2025-07-25 04:42:53.093','SORD102319','SORD102319',0) SQL : duplicate key value violates unique constraint "m_item_scncs3_pkey" 哪块错了
07-30
数据:insert into m_pattern_0105_001(version,original_store_code,apply_start_date,apply_end_date,pattern_type,pattern_code,update_datetime,update_function_id,update_person_id,update_count) values ('0105_001','1234567890','2024/02/20','2024/02/20','1','1','2024/02/27','1','1',1); insert into m_item_0226_001(version,item_code,shipment,pattern_type,pattern_code,apply_start_date,apply_end_date,order_start_date,order_end_date,vendor_code,pma_code,information_category_code,subcategory_code,item_name,pos_item_name,maker_code,license_code,quantity,particular_type,tax_type,indefinite_type,marketprice_item_type,magazine_period_revised_type,magazine_store_information_output,special_order_item_type,reserve_item_type,sales_report_separation_type,consigned_item_type,item_size_width,item_size_height,item_size_depth,item_rank,specific_item_type,matrix_vertical_code,host_cycle_code,store_cycle_code,lead_time,common_delivery_code,label_code,order_unit,order_limit_quantity,minimum_order_quantity,cost_unit_price,recommendation_sales_price,gp,quantity_cost_price,quantity_sales_price,keyff_number,small_keyff_number,monday_no_delivery,tuesday_no_delivery,wednesday_no_delivery,thursday_no_delivery,friday_no_delivery,saturday_no_delivery,sunday_no_delivery,freshness_management_type,delivery_freshness,sales_freshness,date_quantity_unit,freshness_over_time_type,instore_aggregate_flag,date_type,addition_order_type,revised_order_type,price_change_unnecessary_flag,distribution_separation_type,return_permission_type,magazine_type,cut_reason_code,price_change_reason_code,image_discrimination_code,payment_status,pricing_status,misc_status,forced_content_apply_date,order_code,pattern_apply_date,prepaidcard_payment_status,item_tax_rate,pos_image_discrimination_code,point_excluded_flag,price_sticker_output_type,leaflet_print_permission_type,recommendation_reason_discrimination_code,payment_status_old,internet_item_type,recommendation_item_category_type,dutyfree_type,payment_status_2,stockout_permission_flag,delivery_start_date,first_delivery_end_date,disaster_common_delivery_type_code,serial_number_scan_type,update_datetime,update_function_id,update_person_id,update_count) values ('0226_001','01','1','1','1','2024/02/20','2024/02/20','2024/02/27','2024/02/27','12345','12','1234','2','123456789','1','1','1',1,'1','1','1','1','1','1','1','1','1','1',1,1,1,'1','1','1','1','1','1','1','9999999999999',1,1,1,1,100,1,201,1,'1','1','1','1','1','1','1','1','1','1',1,1,'1','1','1','1','1','1','1','1','1','1','1','1','1',1,1,1,'2024/02/27','1','2024/02/27','1','1','1','1','1','1','1','1','1','1','1','1','1','2024/02/27','2024/02/27','1','1','2024/02/27','1','1',1) , ('0226_001','01','1','2','1','2024/02/27','2024/02/27','2024/02/27','2024/02/27','12345','12','1234','1','123456788','123','1','1',0,'1','1','1','1','1','1','1','1','1','1',0,0,0,'1','1','1','1','1','1','1','9999999999999',0,0,0,0,100,0,200,0,'1','1','1','1','1','1','1','1','1','1',0,0,'1','1','1','1','1','1','1','1','1','1','1','1','1',0,0,0,'2024/02/27',' ','2024/02/27','1','1','1','1','1','1','1','1','1','1','1','1','1','2024/02/27','2024/02/27','1','1','2024/02/27','1','1',0); insert into m_vendor_name_0226_001(version,vendor_code,vendor_short_code,vendor_name,update_datetime,update_function_id,update_person_id,update_count) values ('0226_001','12345','321','123457890','2024/02/27','1','1',1) , ('0226_001','12346','123','123457890','2024/02/27','1','1',1); version pma_code information_category_code subcategory_code subcategory_name subcategory_display_order apply_start_date apply_end_date update_datetime update_function_id update_person_id update_count 0226_001 12 1234 1 54321 1 2024/01/27 2024/02/27 2024/02/27 0:00:00 1 1 1 0226_001 12 1234 2 12345 1 2024/01/27 2024/02/27 2024/02/27 0:00:00 1 1 1
最新发布
08-13
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

sunday_code

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值