update to match 2 different column of data

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

  1. #1

    Default update to match 2 different column of data

    let for an example:
    <cfset word1="hello">
    <cfset word2="world!">

    and inside database on of the column id=20
    record like below:
    ID-------NAME
    20, helloworld!

    on this situation, i wanna update the record on something,
    but how i gonna to match it together?

    my code is like below,
    <cfquery datasource="#db#">
    update table set xxxxxx
    where [word1+word2] = NAME
    </cfquery>

    anyone can help me on this?

    alternative Guest

  2. Similar Questions and Discussions

    1. Getting column data without column names
      Hello all, I'm trying to write a coldfusion program to display account data such as name, address, phone #, etc. I retrieve this data from an ...
    2. update datagrid with dynamic bound column
      I have a simple question which is how to get the entered values on update so I can save them to a database? Specifically I call findControl to get...
    3. Allowing update of column only from trigger
      I have a table like this: create table objects ( id serial primary key, name varchar not null, parent integer references objects(id) default...
    4. Template Column data depending on form data
      Langauage C# I have a webform containing a dropdown control and a datagrid. A different query is fired depending on the value of the dropdown...
    5. Update portion of a string column
      Hi, I have a column that has a string field, and I only wanna update the 3rd character in the string. e.g. change 'StRing' to 'String'. Is this...
  3. #2

    Default Re: update to match 2 different column of data

    where name = '#word1##word2#'

    Originally posted by: alternative
    let for an example:
    <cfset word1="hello">
    <cfset word2="world!">

    and inside database on of the column id=20
    record like below:
    ID-------NAME
    20, helloworld!

    on this situation, i wanna update the record on something,
    but how i gonna to match it together?

    my code is like below,
    <cfquery datasource="#db#">
    update table set xxxxxx
    where [word1+word2] = NAME
    </cfquery>

    anyone can help me on this?



    Dan Bracuk Guest

  4. #3

    Default Re: update to match 2 different column of data

    how about 'hello - world!"?

    how i gonna plus both word together in sql?
    alternative Guest

  5. #4

    Default Re: update to match 2 different column of data

    how about we make it reversely.

    1 word <cfset word="Hello - world !">

    and we have firstname, lastname in database
    alternative Guest

  6. #5

    Default Re: update to match 2 different column of data

    where name = '#word1# - #word2#'

    Originally posted by: alternative
    how about 'hello - world!"?

    how i gonna plus both word together in sql?


    Dan Bracuk 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