• raghuldrag (7/5/2013)


    but i ve many items there so how to do that?

    Instead of INSERTing a single row where the values are hard-coded, you can also INSERT multiple rows using a SELECT statement. The syntax will be something like: "INSERT INTO {table} ({column1}, {column2}, ...) SELECT {value1}, {value2}, ... FROM {table or joined tables} WHERE {put your filter here}"

    But to give you a statement you can use, you have to elaborate your situation a bit more.

    - How many items, you want to insert

    - What is the source of the items you want to insert (flat file?, another table?, entered by users?, something else?)

    - How are the items defined? Please post some samples or sample code!!

    - Need the items be inserted in only one of the three tables, or need the items be split over all three tables?

    - does all related values allready exists in the tables, or do they need to be inserted?

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **