P ppppp Unregistered / Unconfirmed GUEST, unregistred user! 2000-07-24 #1 各位,请教d4下prodox中money型值 用QUERY如何查询符合某段值的记录如: 1000.89>MONEY>500.01
M mech Unregistered / Unconfirmed GUEST, unregistred user! 2000-07-24 #2 SELECT * FROM XXX WHERE MONEY>5000.01 AND MONEY<1000.89
J jqw Unregistered / Unconfirmed GUEST, unregistred user! 2000-07-24 #3 you can also use Filter='...'
C Chenlili Unregistered / Unconfirmed GUEST, unregistred user! 2000-07-24 #4 select * from xxx where (money>1000) and (money<5000)
P ppppp Unregistered / Unconfirmed GUEST, unregistred user! 2000-07-24 #5 请教将5000.01和1000.89设为变量该如何操作?
M mech Unregistered / Unconfirmed GUEST, unregistred user! 2000-07-24 #6 在SQL中写: SELECT * FROM XXX WHERE MONEY>:LMONEY AND MONEY<:HMONEY 在打开之前 QUERY1.PARAMBYNAME('LMONEY').ASCURRENCY:=1000.89; QUERY1.PARAMBYNAME('HMONEY').ASCURRENCY:=5000.01; QUERY1.CLOSE; QUERY1.OPEN;
在SQL中写: SELECT * FROM XXX WHERE MONEY>:LMONEY AND MONEY<:HMONEY 在打开之前 QUERY1.PARAMBYNAME('LMONEY').ASCURRENCY:=1000.89; QUERY1.PARAMBYNAME('HMONEY').ASCURRENCY:=5000.01; QUERY1.CLOSE; QUERY1.OPEN;
P ppppp Unregistered / Unconfirmed GUEST, unregistred user! 2000-07-24 #7 mech谢谢,程序是运行下去了,可是库里明明有数据,但查不出来,还有1000.01和5000.89 能否换成EDIT.TEXT?
M mech Unregistered / Unconfirmed GUEST, unregistred user! 2000-07-24 #8 查不出来? 将参数范围设大点试试,看是不是精度问题。 设为 EDIT。TEXT当然可以,只不过要将 EDIT。TEXT中的字符用STRTOCUR函数转成 货币型。
P ppppp Unregistered / Unconfirmed GUEST, unregistred user! 2000-07-24 #9 MECH: 程序运行之后报错: ’INVAILD USE OF KEYWORD。 TOKEN:>? LINE NUMBER :2‘ PROCESS STOPPED
W wumeng Unregistered / Unconfirmed GUEST, unregistred user! 2000-07-24 #11 SELECT * FROM orders WHERE AmountPaid>1000.01 AND AmountPaid<5000.89 这个SQL可以的.我试过了. 下面这个应该可以.您单步执行试试. {在SQL中写: SELECT * FROM XXX WHERE MONEY>:LMONEY AND MONEY<:HMONEY 在打开之前 QUERY1.PARAMBYNAME('LMONEY').ASCURRENCY:=1000.89; QUERY1.PARAMBYNAME('HMONEY').ASCURRENCY:=5000.01; QUERY1.CLOSE; QUERY1.OPEN; }
SELECT * FROM orders WHERE AmountPaid>1000.01 AND AmountPaid<5000.89 这个SQL可以的.我试过了. 下面这个应该可以.您单步执行试试. {在SQL中写: SELECT * FROM XXX WHERE MONEY>:LMONEY AND MONEY<:HMONEY 在打开之前 QUERY1.PARAMBYNAME('LMONEY').ASCURRENCY:=1000.89; QUERY1.PARAMBYNAME('HMONEY').ASCURRENCY:=5000.01; QUERY1.CLOSE; QUERY1.OPEN; }
E eyes4 Unregistered / Unconfirmed GUEST, unregistred user! 2000-08-01 #13 如要查询big>MONEY>small,可如下: 1.如big和small为字符型,则 table1.filter:='MONEY<'+big+' and '+'MONEY>'+small; table1.filtered:=true; 2.如big和small为货币型,则 table1.filter:='MONEY<'+curtostr(big)+' and '+'MONEY>'+curtostr(small); table1.filtered:=true;
如要查询big>MONEY>small,可如下: 1.如big和small为字符型,则 table1.filter:='MONEY<'+big+' and '+'MONEY>'+small; table1.filtered:=true; 2.如big和small为货币型,则 table1.filter:='MONEY<'+curtostr(big)+' and '+'MONEY>'+curtostr(small); table1.filtered:=true;