select distinct * into #t from table1
delete from table1
insert into table1 select * from #t
drop table #t

解决方案 »

  1.   

    不可以直接调用,SQL SERVER 2000只可一调用VC 或JAVA编写的扩展的STORE PROCEDURE.而VB根本不行。
      

  2.   

    用VB的Active DLL把Function寫成COM的規格,然后用sp_OACreate、sp_OAMethod可以調用。詊細資料可查Books on line.關鍵字:sp_OACreate
      

  3.   

    sp_OACreate、sp_OAMethod这些都是SQL Server系统的存储过程。自己定义的存储过程能不能调用外部函数?
      

  4.   

    我只知道可以调用windows系统函数
    好像是用sp_exec