Friday, February 24, 2012

appending tables

Using t-sql, what's the easiest way to append one table to another where the
structure of both tables is precisely the same? Also, can this be set up to
append only those that meet a certain criteria, such that a 'where' clause
could be used for the append?
Thanks for any help.
Bernie YaegerINSERT INTO TABLE1
SELECT column_list FROM TABLE2
WHERE <condition in TABLE2>
--
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Bernie Yaeger" <berniey@.cherwellinc.com> wrote in message
news:0Noeb.22436$Kq4.15794796@.news4.srv.hcvlny.cv.net...
> Using t-sql, what's the easiest way to append one table to another where
the
> structure of both tables is precisely the same? Also, can this be set up
to
> append only those that meet a certain criteria, such that a 'where' clause
> could be used for the append?
> Thanks for any help.
> Bernie Yaeger
>|||Hi Kalen,
Tx so much!
Regards,
Bernie
"Kalen Delaney" <replies@.public_newsgroups.com> wrote in message
news:e6%23nkJ7hDHA.3208@.TK2MSFTNGP11.phx.gbl...
> INSERT INTO TABLE1
> SELECT column_list FROM TABLE2
> WHERE <condition in TABLE2>
> --
> HTH
> --
> Kalen Delaney
> SQL Server MVP
> www.SolidQualityLearning.com
>
> "Bernie Yaeger" <berniey@.cherwellinc.com> wrote in message
> news:0Noeb.22436$Kq4.15794796@.news4.srv.hcvlny.cv.net...
> > Using t-sql, what's the easiest way to append one table to another where
> the
> > structure of both tables is precisely the same? Also, can this be set
up
> to
> > append only those that meet a certain criteria, such that a 'where'
clause
> > could be used for the append?
> >
> > Thanks for any help.
> >
> > Bernie Yaeger
> >
> >
>

No comments:

Post a Comment