BMS-HOSxP Community

HOSxP => Report Exchange => ข้อความที่เริ่มโดย: prapansak ที่ มกราคม 23, 2012, 14:16:27 PM

หัวข้อ: ต้องการแปลงชื่อให้เป็นตัวเลข GetMultipleList
เริ่มหัวข้อโดย: prapansak ที่ มกราคม 23, 2012, 14:16:27 PM
cn:= GetMultipleList('select name from pttype  order by pttype');
      ShowMessage(cn);
cnn:= getsqlstringdata('select pttype from pttype where name in ('+cn+') ');
ลองเอาค่าไปใช้ใช้งานไม่ได้ครับดูให้ที
rw610:=getsqlintegerdata('select count(distinct(an)) from ipt '+
  ' where pttype in("+cnn+") ');
 
หัวข้อ: Re: ต้องการแปลงชื่อให้เป็นตัวเลข GetMultipleList
เริ่มหัวข้อโดย: เกื้อกูล ครับ.. ที่ มกราคม 23, 2012, 14:19:16 PM
cnื  ยึกยือ ตัว n สุดท้ายเปล่าครับ
หัวข้อ: Re: ต้องการแปลงชื่อให้เป็นตัวเลข GetMultipleList
เริ่มหัวข้อโดย: prapansak ที่ มกราคม 23, 2012, 14:25:53 PM
เปล่าครับ พอดีเมื่อกี่พิมพ์ผิด
ไม่ทราบว่าโครงสร้างถูกรึเปล่ากับการใช้งาน GetMultipleList ตอนแปลงเป็น ตัวเลข
cn:= GetMultipleList('select name from pttype  order by pttype');
      ShowMessage(cn);
cnn:= getsqlstringdata('select pttype from pttype where name in ('+cn+') ');
ลองเอาค่าไปใช้ใช้งานไม่ได้ครับดูให้ที
rw610:=getsqlintegerdata('select count(distinct(an)) from ipt '+
  ' where pttype in("+cnn+") ');
หัวข้อ: Re: ต้องการแปลงชื่อให้เป็นตัวเลข GetMultipleList
เริ่มหัวข้อโดย: nuttavut ที่ มกราคม 23, 2012, 16:35:04 PM
เปล่าครับ พอดีเมื่อกี่พิมพ์ผิด
ไม่ทราบว่าโครงสร้างถูกรึเปล่ากับการใช้งาน GetMultipleList ตอนแปลงเป็น ตัวเลข
cn:= GetMultipleList('select name from pttype  order by pttype');
      ShowMessage(cn);
cnn:= getsqlstringdata('select pttype from pttype where name in ('+cn+') ');
ลองเอาค่าไปใช้ใช้งานไม่ได้ครับดูให้ที
rw610:=getsqlintegerdata('select count(distinct(an)) from ipt '+
  ' where pttype in("+cnn+") ');
เปลี่ยนเป็นแบบนี้ครับ  ;D
  cnn:= GetSQLSubQueryData('select pttype from pttype where name in ('+cn+') ');
หัวข้อ: Re: ต้องการแปลงชื่อให้เป็นตัวเลข GetMultipleList
เริ่มหัวข้อโดย: prapansak ที่ มกราคม 24, 2012, 08:49:53 AM
ได้แล้วขอบคุณมากๆเลยครับ