#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    2
    Rep Power
    0

    INSERT and SELECT SQL Query


    Hi all,

    I am in a crisis now,please help...I have a query that returns multiple records from a table.

    I have to insert this entire dat into another table that does not have the same struture as the first table.

    below is my query:

    INSERT INTO assoc_word ( assoc_word_root, assoc_word_alternate, type)
    VALUES (
    ( select trade_name from drugs where trade_name != chemical_name),
    ( select chemical_name from drugs where trade_name != chemical_name),
    'X'
    )




    the select actually returns a chunk of data from drugs table that i have to use to populate the assoc_word table.

    This is very urgent!Any help ASAP would be appreciated

    Many thanks in advance,
    Prabha
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    2
    Rep Power
    0
    Got the query working...Thanks to souls who thought of helping me!

    Prabha

IMN logo majestic logo threadwatch logo seochat tools logo