Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2011
    Posts
    18

    Unanswered: Select then insert

    Hi Guys,

    i have a select statement that is returning 6 fields of information and i want the returned result inserted in another table but i am having some issues rectifying it, any help will do

    Thanks,
    Eenje

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    Insert into new_table (col_a, col_b, col_c, col_d, col_e, col_f) select col1, col2, col3, col4, col5, col6 from old_table;
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Jun 2011
    Posts
    18
    Sorry, did is what I wanted to archive (Select fname, lname, stud_id, email, type from waiting where id = :id)
    then i have this insert syntax
    Insert into approved

  4. #4
    Join Date
    Jun 2011
    Posts
    18
    Thanks, it did work.

    Sinerely,
    Eenje

  5. #5
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >i have a select statement that is returning 6 fields
    >(Select fname, lname, stud_id, email, type from waiting where id = :id)
    Do I need to enroll in remedial count training?

    1 fname,
    2 lname,
    3 stud_id,
    4 email,
    5 type
    from waiting where id = :id)
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

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