把上面三步变成我的代码是这样的
cn1.execute "delete from public_jk_jnl"
cn1.excute "if object_id('tempdb..#jK_Jnl') is not null drop table #Jk_Jnl"
cn1.execute 语句一 '这里不会错
cn1.execute "inert into public_jk_jnl select * from #Jk_Jnl""
cn1.execute "drop table #Jk_Jnl"
cn2.execute "delete from public_jk_jnl"
cn2.excute "if object_id('tempdb..#jK_Jnl') is not null drop table #Jk_Jnl"
cn2.execute 语句一 ’ 这里错
cn2.execute "inert into public_jk_jnl select * from #Jk_Jnl"
cn2.execute "drop table #Jk_Jnl"
SELECT v.FVoucherID FVoucherID,v.FEntryCount,ve.FEntryID,v.FYear,v.FPeriod,v.FDate, v.FTransDate,
v.FGroupID, vg.FName FGroupName, v.FNumber,v.FSerialNum,v.FReference FReference, v.FExplanation FVExplanation,
ve.FExplanation FEExplanation, ve.FAccountID FAccountID, ve.FDetailID FDetailID, a.FNumber FAccountNumber,
a.FName FAccountName, ve.FAccountID2 FSideAccountID, b.FNumber FSideAccountNumber,
b.FName FSideAccountName,FSideDetailID=0,a.FContact FContact, ve.FSettleTypeID,
ISNULL(e.Fname,SPACE(0)) FSettleTypeName,ve.FSettleNo FSettleNumber, FTplTypeName=tp.FTplTypeName,
FModuleName=tp.FModuleName, ve.FTransNo , ve.FCurrencyID FCurrencyID, c.FNumber FCurrencyNumber,
c.FName FCurrencyName, ve.FExchangeRate, ve.FDC, ve.FAmountFor FAmountFor,ve.FAmount FAmount,
v.FPosted,a.FDelete ,'aaa' as fitemnumber,'aaaa' as fitemname INTO #Jk_Jnl
FROM t_Voucher v INNER JOIN t_VoucherGroup vg ON v.FGroupID = vg.FGroupID
LEFT OUTER JOIN t_VoucherTplType tp on v.FTranType=tp.FTplTypeID
INNER JOIN t_VoucherEntry ve ON v.FVoucherID = ve.FVoucherID
INNER JOIN t_Account a ON ve.FAccountID = a.FAccountID
LEFT OUTER JOIN ( Select * FROM t_Account b ) b ON ve.FAccountID2 = b.FAccountID
INNER JOIN t_Currency c ON ve.FCurrencyID = c.FCurrencyID
LEFT OUTER JOIN t_Settle e ON ve.FSettleTypeID=e.FitemID AND e.FitemID<>0
WHERE FDate Between '2013-03-01' AND '2013-03-31' AND a.FNumber>='1122' AND a.FNumber<='1122.zzzzzzz'
AND ve.FCurrencyID = 1
use master
go
select *
from master..sysprocesses a join (
select blocked from master..sysprocesses group by blocked
)b on a.spid=b.blocked where a.blocked=0
use master
go
select *
from master..sysprocesses a join (
select blocked from master..sysprocesses group by blocked
)b on a.spid=b.blocked where a.blocked=0