locked
Copy columns and insert them again with different ForeignKey RRS feed

  • Question

  • User-706647060 posted

    Hi ! I have a Access DB. I have relations with two tables. For example In my table1 I have three columns as T1ID, Name, Description and Tbale2 I have three column as T2ID, T1ID which is a foreignkey from Table1 and desc.

    What I want is that : for example, I wanna copy the columns from table2 which has the value of 2 under the foreignkey field and I wanna insert them into table2 again with the value of 3 under the foreignkey field !


    How could I do that !

    Saturday, May 8, 2010 10:58 AM

Answers

  • User-1199946673 posted

    I wanna do it in a web form ! with ASP.Net !

     

    With ASP.NET ? I was just creating an example using PHP, so now I have to do it all over again Wink

    I read your question multiple times. but cannot understand what you want to do?

    So you have table1 like:

    1 'name1' 'description1'
    2 'name2' 'description2'
    3 'name3' 'description3'

    And table2 like:

    1 1
    2 2

    What do you want to do?

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, May 8, 2010 11:09 AM

All replies

  • User-706647060 posted

    I wanna do it in a web form ! with ASP.Net !


    Saturday, May 8, 2010 11:03 AM
  • User-1199946673 posted

    I wanna do it in a web form ! with ASP.Net !

     

    With ASP.NET ? I was just creating an example using PHP, so now I have to do it all over again Wink

    I read your question multiple times. but cannot understand what you want to do?

    So you have table1 like:

    1 'name1' 'description1'
    2 'name2' 'description2'
    3 'name3' 'description3'

    And table2 like:

    1 1
    2 2

    What do you want to do?

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, May 8, 2010 11:09 AM
  • User-706647060 posted

    Laughing

    What I want is that ! I wanna get the datas from table2 wehre T1ID = 2 and I wanna insert them into Table2 but T1ID of those datas needs to be 3 in this time. So think it as that I have prices for a resort and Also I have prices for a resort with the same pirice rates and I do not wanna waste time to enter them again so I wanna simply insert them again by changing the foreignkey value ! I guse the example is clear ;)


    Saturday, May 8, 2010 11:14 AM
  • User-706647060 posted

    I guess I need to use while loop Undecided


    Saturday, May 8, 2010 12:00 PM