Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. sql express keyword to identify new row

sql express keyword to identify new row

Scheduled Pinned Locked Moved Database
database
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dandamudi padma
    wrote on last edited by
    #1

    i am having one database and the data will be comming through a device and i need to copy the newly generated row to another database how is it possible i need to insert new row into another database this to be done in sql express can anybody give solution for this padma padma

    P P 2 Replies Last reply
    0
    • D dandamudi padma

      i am having one database and the data will be comming through a device and i need to copy the newly generated row to another database how is it possible i need to insert new row into another database this to be done in sql express can anybody give solution for this padma padma

      P Offline
      P Offline
      pmarfleet
      wrote on last edited by
      #2

      Run an INSERT...VALUES query to insert a new row of data into a table in your second database.

      Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

      D 1 Reply Last reply
      0
      • P pmarfleet

        Run an INSERT...VALUES query to insert a new row of data into a table in your second database.

        Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

        D Offline
        D Offline
        dandamudi padma
        wrote on last edited by
        #3

        i need to write trigger for this

        P 1 Reply Last reply
        0
        • D dandamudi padma

          i need to write trigger for this

          P Offline
          P Offline
          pmarfleet
          wrote on last edited by
          #4

          Good for you.

          Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

          1 Reply Last reply
          0
          • D dandamudi padma

            i am having one database and the data will be comming through a device and i need to copy the newly generated row to another database how is it possible i need to insert new row into another database this to be done in sql express can anybody give solution for this padma padma

            P Offline
            P Offline
            Pete OHanlon
            wrote on last edited by
            #5

            You want to look at syntax like this:

            create trigger dbo.MyTrigger
            on dbo.MyTable
            for insert
            as 
            insert into database2.dbo.table2 (col1, col2) 
            select col1, col2 from inserted
            end
            

            Deja View - the feeling that you've seen this post before.

            My blog | My articles

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups