Professional Web Applications Themes

How to update from another registry - Microsoft SQL / MS SQL Server

I have a Table named Services, with a identity field named ID and a bounch of registries i want to copy the same data that is on the ID=105 to the ID=86 how i can do that with an UPDATE? is this possible?...

  1. #1

    Default How to update from another registry

    I have a Table named Services, with a identity field named ID and a bounch of registries
    i want to copy the same data that is on the ID=105 to the ID=86
    how i can do that with an UPDATE? is this possible?


    Smoke Guest

  2. #2

    Default Re: How to update from another registry

    ok, im doing this from ASP so i cant play too much with TSQL, thanks anyway...


    "Vishal Parkar" <com> wrote in message news:phx.gbl... 
    > the tables, is there a way to just specify them all at once? 
    > about 10 of them for different tables... 
    > b.IDEmpresa, IDTipo = b.IDTipo, IDContacto = b.IDContacto, 
    > FechaInstalacion = b.FechaInstalacion, FechaAlta = b.FechaAlta, 
    > b.EstadoAnterior, FechaIngreso = b.FechaIngreso, FechaSolAlta = 
    > b.FechaAprovado, FechaEdicion = b.FechaEdicion, IDUsuSolAlta = 
    > b.IDUsuAprovado, IDUsuEditado = b.IDUsuEditado, RazonBaja = 
    > news:phx.gbl... [/ref]
    > bounch 
    > >
    > >[/ref]
    >
    >[/ref]


    Smoke Guest

  3. #3

    Default Re: How to update from another registry

    no, there is not any, you will have to specify one by one.
    OR
    you can try creating a dynamically generated
    update statement as follows
    --press "ctrl + T"(Text mode)

    create table t(idd int, registry varchar(500))
    insert into t values(105,'registry for 105')
    insert into t values(85,'registry for 85')
    insert into t values(65,'registry for 65')

    --Take following query's output and append the from clause to it.

    select 'update a set'
    union all
    select column_name +'=b.' + column_name + ','
    from information_schema.columns where table_name='T'

    --
    -Vishal
    Smoke <com.uy> wrote in message
    news:phx.gbl... 
    the tables, is there a way to just specify them all at once? 
    about 10 of them for different tables... 
    b.IDEmpresa, IDTipo = b.IDTipo, IDContacto = b.IDContacto, 
    FechaInstalacion = b.FechaInstalacion, FechaAlta = b.FechaAlta, 
    b.EstadoAnterior, FechaIngreso = b.FechaIngreso, FechaSolAlta = 
    b.FechaAprovado, FechaEdicion = b.FechaEdicion, IDUsuSolAlta = 
    b.IDUsuAprovado, IDUsuEditado = b.IDUsuEditado, RazonBaja = 
    news:phx.gbl... [/ref][/ref]
    bounch 
    > >
    > >[/ref]
    >
    >[/ref]


    Vishal Guest

Similar Threads

  1. registry hack for manual update
    By Hehateme in forum Macromedia Shockwave
    Replies: 1
    Last Post: March 2nd, 06:09 PM
  2. Unable to update NT registry error
    By AvailableScreenName in forum Coldfusion Database Access
    Replies: 5
    Last Post: April 27th, 05:30 AM
  3. Registry
    By Dave in forum Windows Setup, Administration & Security
    Replies: 2
    Last Post: August 6th, 09:21 PM
  4. no aol in Registry
    By marie Smith in forum Windows XP/2000/ME
    Replies: 3
    Last Post: July 8th, 08:16 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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