BMS-HOSxP Community
HOSxP => Report Exchange => ข้อความที่เริ่มโดย: golf_pk ที่ กรกฎาคม 04, 2014, 21:47:15 PM
-
??? ??? ??? ??? มีค่ามีเก็บใน variable1.value แต่ผมอยากให้ ก่อนเอามาเก็บ ใน variable1.value ต้องผ่านการ คูณและหารก่อนทำไงครับ เช่น variable1.value := ค่าได้จากคำสั่ง sql GetSQLIntegerData * 1000 / 38211 ทำอย่างไรครับ
Value := GetSQLIntegerData('select ( select count(distinct(hn)) as hn from ovstdiag o '+
' where o.vstdate BETWEEN "2010-10-01" AND "2011-09-30" and icd10 BETWEEN "A050" and "A059" ) '+
' + ( select count(distinct(ip.hn)) as hn from iptdiag i,ipt ip '+
' where i.an=ip.an and ip.dchdate BETWEEN "2010-10-01" AND "2011-09-30" and icd10 BETWEEN "A050" and "A059" ) '+
' as total')
end;
รบกวนอาจารย์อีกแล้วครับ
-
??? ??? ??? ??? ???
ขอดันครับ
-
คงต้อง ประกาศตัวแปรประเภท Integer ก่อน
แล้วใน Calc ของ Variable1 ก็ประมาณนี้
var := GetSQLIntegerData
Value := (var * 1000) / 38211
ลองดูครับ :D
-
??? ??? ??? ??? มีค่ามีเก็บใน variable1.value แต่ผมอยากให้ ก่อนเอามาเก็บ ใน variable1.value ต้องผ่านการ คูณและหารก่อนทำไงครับ เช่น variable1.value := ค่าได้จากคำสั่ง sql GetSQLIntegerData * 1000 / 38211 ทำอย่างไรครับ
Value := GetSQLIntegerData('select ( select count(distinct(hn)) as hn from ovstdiag o '+
' where o.vstdate BETWEEN "2010-10-01" AND "2011-09-30" and icd10 BETWEEN "A050" and "A059" ) '+
' + ( select count(distinct(ip.hn)) as hn from iptdiag i,ipt ip '+
' where i.an=ip.an and ip.dchdate BETWEEN "2010-10-01" AND "2011-09-30" and icd10 BETWEEN "A050" and "A059" ) '+
' as total')
end;
รบกวนอาจารย์อีกแล้วครับ
ลอแบบนี้ครับ
variable1 :
Value := GetSQLIntegerData('select ( select count(distinct(hn)) as hn from ovstdiag o '+
' where o.vstdate BETWEEN "2010-10-01" AND "2011-09-30" and icd10 BETWEEN "A050" and "A059" );
variable2 :
GetSQLIntegerData('select count(distinct(ip.hn)) as hn from iptdiag i,ipt ip '+
' where i.an=ip.an and ip.dchdate BETWEEN "2010-10-01" AND "2011-09-30" and icd10 BETWEEN "A050" and "A059" ) '+
' as total');
variable3 :
Variable1.value * 1000
varable4 :
Variable3 / 38211
คิดได้ประมาณนี้ครัช
-
ลอแบบนี้ครับ
variable1 :
Value := GetSQLIntegerData('select ( select count(distinct(hn)) as hn from ovstdiag o '+
' where o.vstdate BETWEEN "2010-10-01" AND "2011-09-30" and icd10 BETWEEN "A050" and "A059" );
variable2 :
GetSQLIntegerData('select count(distinct(ip.hn)) as hn from iptdiag i,ipt ip '+
' where i.an=ip.an and ip.dchdate BETWEEN "2010-10-01" AND "2011-09-30" and icd10 BETWEEN "A050" and "A059" ) '+
' as total');
variable3 :
Variable1.value * 1000
varable4 :
Variable3 / 38211
คิดได้ประมาณนี้ครัช
แล้ว variable2 ไว้ทำไร
แบบนี้หรือเปล่า
variable3=((variable1.value+variable2.value)*1000)/38211
-
ลอแบบนี้ครับ
variable1 :
Value := GetSQLIntegerData('select ( select count(distinct(hn)) as hn from ovstdiag o '+
' where o.vstdate BETWEEN "2010-10-01" AND "2011-09-30" and icd10 BETWEEN "A050" and "A059" );
variable2 :
GetSQLIntegerData('select count(distinct(ip.hn)) as hn from iptdiag i,ipt ip '+
' where i.an=ip.an and ip.dchdate BETWEEN "2010-10-01" AND "2011-09-30" and icd10 BETWEEN "A050" and "A059" ) '+
' as total');
variable3 :
Variable1.value * 1000
varable4 :
Variable3 / 38211
คิดได้ประมาณนี้ครัช
แล้ว variable2 ไว้ทำไร
แบบนี้หรือเปล่า
variable3=((variable1.value+variable2.value)*1000)/38211
ใช่ครับพี่ชาย แหะๆ ;D ;D
-
ขอบคุณ อ.ทุกท่านครับ หวังว่าจะได้รับความร่วมมือจาก อ.ทุกท่านอีกนะครับ