-4

I have tried many times but i could not find the proper answer again i am asking same questing,

  • 1 query

    (select * From acct_db2016.dbo.acct_tran where trc_acno='12008001')if i search like this i am getting 10 rows,

  • 2 query

    (select * From acct_db.dbo.acct_tran where trc_acno='12008001')i am getting 4 rows so i want to insert to 1st query data base to 2nd query data base so the answer rows will be 14

Community
  • 1
  • 1
yogogeri
  • 1
  • 3

1 Answers1

0

If you're inserting new values into the table, then you will use:

INSERT INTO ...
VALUES/SELECT...

If you're modifying data that already exists in the table, you will use:

UPDATE [Table]
SET [column] = [column]
WHERE condition
BJones
  • 2,450
  • 2
  • 17
  • 25
  • insert into a database specific table (but should be inserted where trc_acno 0000) from another database specific table(acct_tran) which is filtered by using where clause (trc_ac no0000) – yogogeri Sep 15 '15 at 16:56
  • See [this former post](http://stackoverflow.com/questions/3502269/how-to-insert-table-values-from-one-database-to-another-database) – BJones Sep 15 '15 at 18:29
  • please check this sir – yogogeri Sep 16 '15 at 14:00