+ Reply to Thread
Results 1 to 4 of 4

Copy table options ?

  1. Copy table options ?

    Hello,

    where can I find a reference manual for "COPY TABLE" which lists all
    possible options ?

    Is it possible to retrieve the column names on the first row of the output
    file ?

    Thanks



  2. Re: [Info-ingres] Copy table options ?

    Hello,

    Have a look in the SQL Reference Guide.

    The first row of an output of a copy table is a data line. I don't think
    it's possible to add the column names. And it depend on the copy table
    format (ascii or not) for the file to be readable with a text editor or
    something like excel.

    Hope this help,
    Jean-Pierre


    On 2/16/06, myname wrote:
    >
    > Hello,
    >
    > where can I find a reference manual for "COPY TABLE" which lists all
    > possible options ?
    >
    > Is it possible to retrieve the column names on the first row of the output
    > file ?
    >
    > Thanks
    >
    >
    > _______________________________________________
    > Info-ingres mailing list
    > Info-ingres@cariboulake.com
    > http://mailman.cariboulake.com/mailm...py/info-ingres
    >



  3. Re: Copy table options ?

    "myname" wrote in message
    news:43f449ba$1@news.sncf.fr...
    > Hello,
    >
    > where can I find a reference manual for "COPY TABLE" which lists all
    > possible options ?


    The COPY statemement is complex and versatile, as you've probably
    discovered. The manual that deals with it most thoroughly is the SQL
    Reference (probably Chapter 8, depending on your rev of Ingres). It could
    probably stand to be extended and elaborated, but it's not too bad.

    > Is it possible to retrieve the column names on the first row of the output
    > file ?


    No. But you can use the d1 format to prefix each value with the name of the
    column. (That will bloat the output file quite massively, but in an age
    when one risks looking like a fuddy-duddy for objecting to using a 1Gb XML
    file to transfer 400kb (I've seen it done), maybe I shouldn't fuss about
    it.)

    And of course you could use genxml. Or you could use the -v flag to tell
    sql not to output its column delimiters when it displays the result of a
    SELECT statement.

    Roy



  4. Re: [Info-ingres] Copy table options ?

    Hi Jean-Pierre,

    I think the column names, types etc would be available via
    ESQLC. Simply prepare and describe the statement, and the column
    details would be returned. But obviously, not in the data file created by
    the copy statement itself.

    I haven't tried an ESQLC copy statement, bit it would work like
    this for a dynamic SQL Select.

    Martin Bowes
    >
    > Hello,
    >
    > Have a look in the SQL Reference Guide.
    >
    > The first row of an output of a copy table is a data line. I don't
    > think it's possible to add the column names. And it depend on the copy
    > table format (ascii or not) for the file to be readable with a text
    > editor or something like excel.
    >
    > Hope this help,
    > Jean-Pierre
    >
    > On 2/16/06, myname wrote:
    > Hello,
    >
    > where can I find a reference manual for "COPY TABLE" which lists
    > all possible options ?
    >
    > Is it possible to retrieve the column names on the first row of
    > the output file ?
    >
    > Thanks
    >
    >
    > _______________________________________________
    > Info-ingres mailing list
    > Info-ingres@cariboulake.com
    > http://mailman.cariboulake.com/mailm...py/info-ingres
    >
    >




+ Reply to Thread