sql1=SELECT s.syohin_cd, s.wari_from_dt, s.wari_to_dt, s.kokan_kbn, s.beam_wari_kakaku, s.syohin_name, s.syohin_setumei, s.sample_url, s.beam_kakaku, s.spict_kbn, sp.pict_name FROM syohinmst s LEFT OUTER JOIN syohin_pict sp ON s.syohin_cd = sp.syohin_cd AND sp.ls_kbn = 0 WHERE ((s.wari_from_dt<='2018/09/24' OR s.wari_from_dt IS NULL OR s.wari_from_dt='') AND (s.wari_to_dt>='2018/09/24' OR s.wari_to_dt IS NULL OR s.wari_to_dt='')) AND s.syohin_cd = '90000000270934' AND s.beam_wari_kakaku>0 AND s.syohin_cd IN (SELECT syohin_cd FROM syohinmst WHERE (( from_dt <= '2018/09/24' OR from_dt is NULL OR from_dt = '' ) AND ( to_dt >= '2018/09/24' OR to_dt is NULL OR to_dt = '' )) AND syohin_kbn IN ( '0', '3' ) AND beam_kakaku > 0 AND syohin_cd NOT IN ( SELECT DISTINCT syohin_cd FROM syohin2area) AND (stock > 0 OR stock IS NULL) )

商品詳細

商品が選ばれていません