我需要将存有大文本的表导成sql,导出来后,发现文本太长不能执行该sql,需要insert与update配合才能完成导入。有没有什么方法或工具直接导出可以执行的sql。

解决方案 »

  1.   

    我觉得可能是.sql文件有些语句的语法有错误而不能执行,而不sql语句太长而不能执行
      

  2.   

    要是在文件中,可以用clob的形式插入,
    但是你已经整进sql语句了,好像不好办了友情up~~~~
      

  3.   


    有没有工具自动截断的,我用toad、sqlplus dev导出的sql都是全部插入,不能正确执行
      

  4.   

    我是用工具生成的sql。应该没有语法错误吧
      

  5.   

    我遇到的是 用QLSQL导出insert会超过文本编辑器的最大限制 而无法打开 那么导出dmp的了就如果需要所有insert脚步 那就分次导出到文本编辑器里 可以用比较明感的字段 如时间
      

  6.   

    Problem Description
    -------------------You are trying to run a SQL query or script from an output file from a vendor
    package called SQLBacktrack. The file has a SQL statement that is extremely
    long (in this case thousands of lines long and each row has thousands of
    characters) and you get the following error:    SP2-0027: input is too long (> 2499 characters) - line ignoredThis fails with the same error from either SQL*Plus or Server Manager.
    Solution Description
    --------------------Open the file in a text editor and then resave the file as a different file
    type. In Microsoft Word, you click on File, Save As, then select file type
    'text only with line breaks' and save the file. Once this is done, you can
    successfully run the script from SQL*Plus or Server Manager.
    Explanation
    -----------The output file that comes directly from SQLBacktrack doesnot have the proper
    type of carriage returns that SQL*Plus or Server Manager recognizes. As a
    result, the SQL statement is read by SQL*Plus or Server Manager as being all on
    one line and you get the above error message. Once you save the file as 'text
    only with line breaks' it reformats the carriage returns in the file so that
    SQL*Plus or Server Manager can recognize it and run the statement successfully.
      

  7.   

    直接进行数据迁移,不需要import成一条一条,
    insert into newtable
    select * from oldtable用这个模式导入你那张大文本表的话,数据不会丢的。