Select
A.*,
(Select SUM(I_MONEY - O_MONEY) From Q_List Where L_TIME <= A.L_TIME and D_ID=:fid1) As m,
DateDiff( 'd ',
L_TIME,
IIF(
IsNull((Select TOP 1 L_TIME From Q_List Where L_TIME > A.L_TIME and D_ID=:fid2 Order By L_TIME,l_id)),
now(),
(Select TOP 1 L_TIME From Q_List Where L_TIME > A.L_TIME and D_ID=:fid3 Order By L_TIME,l_id))
) As days,
m*days*A.i_interest as inte
From
Q_List A
where A.D_ID=:fid4
Order By L_TIME;
运行发生 至少一个参数未被指定 错误,
请教错在哪里?
------解决方案--------------------
你是要在MS SQL中寫語句還是ACCESS中?
------解决方案--------------------
上面的语句还有语法错误?