Oracle export table to ascii

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • R.A. Joemman

    Oracle export table to ascii

    Hi,

    I try to export a table from sqlplus to a ascii file like this:


    select col1 || ';' || col2 || ';' || ..... || ';' || colN
    from mytable ;

    When the table is not so wide, the above query is not so large and the
    export is succesfull.
    But when the table is wide, the query becomes over 1024 characters and
    I get the following error

    ORA-00923: FROM keyword not found where expected

    How do I export those wide tables?

    Best regards
    Raoul
  • G M

    #2
    Re: Oracle export table to ascii

    Try to write your query into multiple lines:

    select col1 || ';' || col2 || ';' || ..... colK
    || ';' || col(K+1) || ';' || ..... || ';' || colN
    from mytable ;

    HTH.

    Guang

    raoul.joemman@w anadoo.nl (R.A. Joemman) wrote in message news:<e4e5e80f. 0309230313.56ad 0e49@posting.go ogle.com>...
    Hi,
    >
    I try to export a table from sqlplus to a ascii file like this:
    >
    >
    select col1 || ';' || col2 || ';' || ..... || ';' || colN
    from mytable ;
    >
    When the table is not so wide, the above query is not so large and the
    export is succesfull.
    But when the table is wide, the query becomes over 1024 characters and
    I get the following error
    >
    ORA-00923: FROM keyword not found where expected
    >
    How do I export those wide tables?
    >
    Best regards
    Raoul

    Comment

    • Guido Konsolke

      #3
      Re: Oracle export table to ascii

      "R.A. Joemman" <raoul.joemman@ wanadoo.nlwrote ...
      Hi,
      >
      I try to export a table from sqlplus to a ascii file like this:
      >
      >
      select col1 || ';' || col2 || ';' || ..... || ';' || colN
      from mytable ;
      >
      (snip)
      >
      How do I export those wide tables?
      >
      Best regards
      Raoul
      Hi Raoul,

      another solution that might work for you:
      use the sql*plus command 'SET COLSEP'.

      hth,
      Guido


      Comment

      • R.A. Joemman

        #4
        Re: Oracle export table to ascii

        zlmei@hotmail.c om (G M) wrote in message news:<50a5e6b6. 0309231224.4b2b d627@posting.go ogle.com>...
        Try to write your query into multiple lines:
        >
        select col1 || ';' || col2 || ';' || ..... colK
        || ';' || col(K+1) || ';' || ..... || ';' || colN
        from mytable ;
        >
        HTH.
        >
        Guang
        >
        raoul.joemman@w anadoo.nl (R.A. Joemman) wrote in message news:<e4e5e80f. 0309230313.56ad 0e49@posting.go ogle.com>...
        Hi,

        I try to export a table from sqlplus to a ascii file like this:


        select col1 || ';' || col2 || ';' || ..... || ';' || colN
        from mytable ;

        When the table is not so wide, the above query is not so large and the
        export is succesfull.
        But when the table is wide, the query becomes over 1024 characters and
        I get the following error

        ORA-00923: FROM keyword not found where expected

        How do I export those wide tables?

        Best regards
        Raoul

        Thank you, this works for me.
        Raoul

        Comment

        • R.A. Joemman

          #5
          Re: Oracle export table to ascii

          "Guido Konsolke" <Guido.Konsolke @triaton.comwro te in message news:<106438815 7.228550@news.t hyssen.com>...
          "R.A. Joemman" <raoul.joemman@ wanadoo.nlwrote ...
          Hi,

          I try to export a table from sqlplus to a ascii file like this:


          select col1 || ';' || col2 || ';' || ..... || ';' || colN
          from mytable ;
          (snip)

          How do I export those wide tables?

          Best regards
          Raoul
          >
          Hi Raoul,
          >
          another solution that might work for you:
          use the sql*plus command 'SET COLSEP'.
          >
          hth,
          Guido


          Thank you for this solution, it works for me.
          Raoul

          Comment

          Working...