旺财兄,表已经存在,不过就是不能drop table tablename??
解决方案 »
- 恭喜DELPHI和扩充话题双四星的第一人:liangqingzhi(老之)
- 菜鸟问题初学者 RzEdit, RzSpnEdt这2个怎么应用在线等
- 自动登陆并且获取用户信息;
- ClientDataSet的排序问题..
- 请问如何将TDateTime类型转换成PFileTime类型?
- 如果知道jpg图片的路径及文件名,如何在TQRImage中显示出来?急!
- 怎样在后台打开网页的源文件并进行代码分析?
- delphi7中有什么方法可以实现.net中的 ##endreigon 功能吗? 插件也可以,谢谢!
- 开了n个MDI子窗口,如何判断当前Active的子窗口的序号?如何Active指定序号的窗口?
- 如何象IE或OE那样自动连接Internet
- delphi中怎么判断一个字符串是不是数字?
- 能不能在一个TChart控件中同时显示两个Y坐标?????
on DispatchList
for insert
as
select CASE datalength(rtrim(ltrim(str(max(cvouchid)+1))))
when 1 then 'R0000000000'+rtrim(ltrim(str(max(cvouchid+1))))
when 2 then 'R000000000'+rtrim(ltrim(str(max(cvouchid+1))))
when 3 then 'R00000000'+rtrim(ltrim(str(max(cvouchid+1))))
when 4 then 'R0000000'+rtrim(ltrim(str(max(cvouchid+1))))
when 5 then 'R000000'+rtrim(ltrim(str(max(cvouchid+1))))
when 6 then 'R00000'+rtrim(ltrim(str(max(cvouchid+1))))
when 7 then 'R0000'+rtrim(ltrim(str(max(cvouchid+1))))
when 8 then 'R000'+rtrim(ltrim(str(max(cvouchid+1))))
when 9 then 'R00'+rtrim(ltrim(str(max(cvouchid+1))))
End as cLink,
CASE datalength(rtrim(ltrim(str(max(cvouchid)+1))))
when 1 then '000000000'+rtrim(ltrim(str(max(cvouchid+1))))
when 2 then '00000000'+rtrim(ltrim(str(max(cvouchid+1))))
when 3 then '0000000'+rtrim(ltrim(str(max(cvouchid+1))))
when 4 then '000000'+rtrim(ltrim(str(max(cvouchid+1))))
when 5 then '00000'+rtrim(ltrim(str(max(cvouchid+1))))
when 6 then '0000'+rtrim(ltrim(str(max(cvouchid+1))))
when 7 then '000'+rtrim(ltrim(str(max(cvouchid+1))))
when 8 then '00'+rtrim(ltrim(str(max(cvouchid+1))))
when 9 then '0'+rtrim(ltrim(str(max(cvouchid+1))))
End as cvouchid,max(cVouchType) as cVouchtype,max(cexch_name) as cexch_name,max(cFlag) as cFlag
into kk2 from Ap_vouch
Select b.*,a.dDate as DVouchdate,a.Ccuscode as CdwCode,a.cDepCode as cDeptcode,a.cPersoncode as cPerson,a.isum-a.cdefine7 as
iRAmount into kk3 from SA_DispatchListEX a,kk2 b where a.kflag<>'A'
insert into ap_vouch(cLink,cVouchid,cVouchtype,cExch_name,cFlag,dVouchdate,cdwcode,cdeptcode,cperson,iramount) select * from kk3
drop table kk2 //如何删除表(临时表,如果不删除的话下一次就会出错,你有其他方法吗??
drop table kk3 //如何删除表
go