Re: HowTo: Append data to a table stored in another database?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Lidschi (Lidschi_at_discussions.microsoft.com)
Date: 11/01/04


Date: Mon, 1 Nov 2004 08:51:02 -0800

Hi Hari Prasad,

Problem is that I only want to insert new data from table a to table b, not
all the data, since the "old" data is already stored in table b.

"Hari Prasad" wrote:

> Hi,
>
> Specify column list in your Insert statement.
>
> Insert into dbnameB.tableb(col1,col2,col3) select col1,col2,col3 from
> dbnameA.tableA
>
>
> --
> Thanks
> Hari
> SQL Server MVP
>
>
> "Lidschi" <Lidschi@discussions.microsoft.com> wrote in message
> news:C69E1D99-B692-4E08-B9A3-04947CD3DAA7@microsoft.com...
> > Hi Newsgroup,
> >
> > I have the following scenario:
> > I have database A with table a and I have database b. I created a stored
> > procedure that transfers table a to database b (now called table b). I
> > inserted two more columns in table b. Now I want to create a stored
> > procedure
> > that appends new data from table a to table b.
> >
> > How can I do this? I tried setting up criterias but nothing did work.
> > Please
> > help me.
> >
> > Thanks and Cheers
> > Lidschi
> >
>
>
>



Relevant Pages

  • Re: HowTo: Append data to a table stored in another database?
    ... "Lidschi" wrote in message ... > Hi Hari Prasad, ... >> SQL Server MVP ... >>> I have database A with table a and I have database b. ...
    (microsoft.public.sqlserver.programming)
  • Re: how to insert microsoft word file content into ms sql server
    ... and the database I was using was of another name, ... "Hari Prasad" wrote: ... >> If I have a micrsoft word file somewhere on the server computer. ...
    (microsoft.public.sqlserver.programming)
  • appending data from multiple mdb files to back end
    ... Dim strNextMdbFile As String ... ' Link the tables in the database from local programs to the state database ... CurrentDb.Execute, dbFailOnError 'Appends the data ...
    (microsoft.public.access.formscoding)
  • Beginner Question
    ... database) for a customer service area of a financial company. ... triggered from this form are Morning Appends, Daily Appends, Monthly ... production system (data on processor performance, volume, call times, ...
    (microsoft.public.sqlserver)
  • Re: DB Space
    ... Unallocated space = 0.07 MB ... "Hari Prasad" wrote: ... > execute DBCC UPDATEUSAGE on all the tables in the database with Shared ...
    (microsoft.public.sqlserver.msde)