From: Roy Goldhammer on 11 Nov 2009 06:48 hello there I have dinamic sql which do SELECT * from dinamic table. Is there a way not only doing select but insert some fields form that select to table? according to Books online OUTPUT does not allow this.
From: Simon Whale on 11 Nov 2009 06:54 Depends on your version of SQL. OUTPUT is a function that is available in version 2005 onwards. Kind Regards Simon Whale "Roy Goldhammer" <roy(a)top.com> wrote in message news:OmPPYTsYKHA.4012(a)TK2MSFTNGP04.phx.gbl... > hello there > > I have dinamic sql which do SELECT * from dinamic table. > > Is there a way not only doing select but insert some fields form that > select to table? according to Books online OUTPUT does not allow this. >
From: Uri Dimant on 11 Nov 2009 07:06 Roy CREATE TABLE tmp (c INT) INSERT INTO tmp SELECT 1 EXEC ('SELECT * FROM tmp GO INSERT INTO tmp SELECT 2') SELECT * FROM tmp DROP TABLE tmp "Roy Goldhammer" <roy(a)top.com> wrote in message news:OmPPYTsYKHA.4012(a)TK2MSFTNGP04.phx.gbl... > hello there > > I have dinamic sql which do SELECT * from dinamic table. > > Is there a way not only doing select but insert some fields form that > select to table? according to Books online OUTPUT does not allow this. >
|
Pages: 1 Prev: sp_MSforeachtable Next: SSIS date type casts truncating hour, minute |