set trimspool off
set heading off
set feedback off
spool data.txt
select * from table
spool off
bcp databasename.username.table in "data.txt" -c  -S  serv_name  -U  user  -P  password

解决方案 »

  1.   

    to airpor(chengf)  能不能说得再详细一些。
      

  2.   

    首先,先写生成Oracle数据的脚本脚本的格式,大致就是
    set trimspool off
    set heading off
    set feedback off
    spool data.txt
    select * from table
    spool off
    你还可以加一些具体的条件限制,查询也可以根据需要复杂点。然后保存成 *.sql脚本
    这样执行,就会生成数据文件了 Sql>@ *.sql。然后再用bcp工具把这些文件中的数据一起到进去
    在文件对应的目录下用bcp 命令
    bcp 数据库名.用户名.表明 in "刚才生成的数据文件" -c  -S  在sybase客户端配置的服务名  -U  用户名  -P  密码  这样就可以把oracle 的数据导入sybase
      

  3.   

    可以啊,这样就要写一个批处理(windows)来做/或者shell(linux/unix)
      

  4.   

    如果我在SQLAnywhere中还没有表结构,能不能也一起导入过来???