update multiple rows from one table

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default update multiple rows from one table

    Hi,
    I have a Dynamically created formfield. Tgis field shows the attached devices
    off a selected device (for instance you have a pc and in the formfields it
    shows two attached monitors). The monitors however are in the same database
    table. (with an other device_id ofcourse). The page with the pc info is shown
    by using the device_id in the URL.

    What I want to do is update some fields in this table for the pc but also for
    the attached devices....

    When I do it like this:

    UPDATE dev SET .... etc.
    WHERE device_id IN ('#FORM.koppel_2#')

    It selects both device id's like this: WHERE dev_volgnr IN ('602,603')
    This doesn't work! However in this example the table should be updated for
    the devices with device_id 602 and 603.

    Is this possible? How would I do that?

    Thanks in advance.

    Gr, Kabbi


    kabbi~thkek Guest

  2. Similar Questions and Discussions

    1. Update multiple rows on form submission
      Dont know why my brain is farting on this but I need to update a table's rows after a form submission. Basically the table has the following...
    2. how can I update table with multiple rows
      Hi I have to output some data from cfquery into a table with text boxes. These text boxes are updatable . If multple rows are updated how can I...
    3. How do you update corresponding rows on the same table after a row on the table has been updated?
      This is my goal: When specific columns in a row, in a table, are updated, corresponding columns in other rows in the same table need to be updated...
    4. UPDATE MULTIPLE ROWS IN ONE TABLE OBTAINING SUMS FROM ANOTHER TABLE
      UPDATE MULTIPLE ROWS IN ONE TABLE OBTAINING SUMS FROM ANOTHER TABLE I need to update a table with distinct sums from another table. I will...
    5. Update multiple rows
      Been working with Access and SQL Server for a long time. New to Oracle. I have two tables TableA & TableB. TableA has EmployeeID (PK),Salary,...
  3. #2

    Default Re: update multiple rows from one table

    Hi kabbi~thkek,


    WHERE dev_volgnr IN ('602,603') won't work. If your keys are integers, you
    need to get rid of the single quotes. If your keys are characters, you need to
    enclose each value in single quotes, not the whole string.

    HTH,


    philh Guest

  4. #3

    Default Re: update multiple rows from one table

    Thank you! I figured it out...
    kabbi~thkek Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139