BMS-HOSxP Community
HOSxP => แจ้งปัญหา / ขอความช่วยเหลือ => ข้อความที่เริ่มโดย: kalakachang ที่ กรกฎาคม 17, 2014, 16:19:01 PM
-
คือต้อการเปลี่ยน order_no ในตาราง ipt_order_no เป็นค่าใหม่โดยใช้ค่า max +1 แต่เขียนมาเเบบข้างล่าง แล้วรัน ปรากฏว่า ได้เป็น 0 แทน ครับ ต้องเขียนแบบไหนครับผม
update ipt_order_no
set order_no = ' max(order_no)+1 '
where an='570017605' and order_type='TRx'
-
ช่วยหน่อยครับผม...
-
ผมว่าลอง เอาเครื่องหมาย ' ' ออก
จาก
update ipt_order_no
set order_no = ' max(order_no)+1 '
where an='570017605' and order_type='TRx'
เปลี่ยนเป็น
update ipt_order_no
set order_no = max(order_no)+1
where an='570017605' and order_type='TRx'