BMS-HOSxP Community
HOSxP => MySQL => ข้อความที่เริ่มโดย: munsat ที่ ธันวาคม 14, 2018, 17:11:50 PM
-
ขอตัวอย่างคำสั่ง Insert ข้อมูลหลาย records ลงในตารางที่มี ID เรียงลำดับ เช่น ต้องการ Insert ข้อมูลลงในตาราง pp_special ที่มี field แรก คือ pp_special_id เรียงลำดับ :) :) :) :) :)
-
insert into pp_special (pp_special_id,vn,hn,pp_special_type_id)
(select get_serialnumber('pp_special_id') as pp_special_id,vn,hn,'1' from ovst where vstdate between '2018-12-26' and '2018-12-26')
ลองประยุกต์ใช้ดูนะคะ ไม่แน่ใจว่าอยากได้จากตารางไหนไปใส่เลยสมมุติเป็น ovst ค่ะ
-
ขอบคุณครับ