|
如下SQL语句,想用参数替代不同月份表名的一部分(黑体字部分,不同月份表名只有前5位字符不同,且字段名和格式完全相同)。
PARAMETERS [Input ExpnMth(MmmYY)] Text ( 255 );
INSERT INTO ExpensesDetail ( Period, Ldgr, LE, Acct, ActivCtr, PrLin, InCo, Reference, [Period Activity] )
SELECT Mar09_Expenses_Detail.Period, Mar09_Expenses_Detail.Ldgr, Mar09_Expenses_Detail.LE, Mar09_Expenses_Detail.Acct, Mar09_Expenses_Detail.Activ, Mar09_Expenses_Detail.PrLin, Mar09_Expenses_Detail.InCo, Mar09_Expenses_Detail.Reference, Mar09_Expenses_Detail.PeriodActivity
FROM Mar09_Expenses_Detail;
在下能力实在有限,还请各位大侠不吝赐教,感激不尽! ! |
|