Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2010
    Posts
    4

    Unanswered: using copy statement

    hello friends
    i am new to this sql

    i have values some thing like 1,'kkk','kumar'

    using copy i need to put this values in the table

    values should not come from file, i need to supply the values manually using copy and get it inserted to my table

    copy students from (how can i supply values manually here)

    any help is appreciated

  2. #2
    Join Date
    May 2008
    Posts
    277
    COPY is specifically for moving data between a table and a file.

    Use INSERT to add rows manually.

  3. #3
    Join Date
    Oct 2010
    Posts
    4
    thank you friend for your response
    i solved my problem to some extent
    i used sumthing like this
    copy mytable(xx,xx,xxx) from stdin with DELIMITER '|';
    x|xx|xxxx
    \.
    copy mytable(xx,xx,xxx) from stdin with DELIMITER '|';
    1|11|1111
    \.
    copy mytable(xx,xx,xxx) from stdin with DELIMITER '|';
    1|22|222222
    \.

    after every record i am specifying an end marker
    is there any possibility to have only one end marker i.e at the end of last record like this


    copy mytable(xx,xx,xxx) from stdin with DELIMITER '|';
    x|xx|xxxx

    copy mytable(xx,xx,xxx) from stdin with DELIMITER '|';
    1|11|1111

    copy mytable(xx,xx,xxx) from stdin with DELIMITER '|';
    1|22|222222
    \.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •