Konstantin,
I think it is the colid colum in the syscomments table that show the row
number for an object, so you can use MAX(colid) WHERE id=.... to find the
number of variables needed. Anyway, as you noticed, Dave really understood
what you need.
--
Dejan Sarka, SQL Server MVP
FAQ from Neil & others at: http://www.sqlserverfaq.com
Please reply only to the newsgroups.
PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org
> Thanks Dejan!
> i know i may put trigger lines into table separately (now i put its as
> concatenation of all rows),
> but how can i know how much variables i need in EXEC statement
> Konstantin.
> ???Y/???Y ????? ???Y??:
> > Konstantin,
> > You can save the triggers by copying rows from the syscomments system
> table
> > in your temp table. There a trigger can span more than one row if the
text
> > is too long. The text in exach row can be read in a memory variable. In
> the
> > EXECUTE statement you can concatenate two or more string variables,
> > --
> > Dejan Sarka, SQL Server MVP
> > FAQ from Neil & others at: http://www.sqlserverfaq.com
> > Please reply only to the newsgroups.
> > PASS - the definitive, global community
> > for SQL Server professionals - http://www.sqlpass.org
> > > Hi,
> > > i need to update all rows in table. To accelerate updates i save all
> table
> > > triggers on in temporary table and try to restore it after updating.
> > > See sample of code:
> > > /*
> > > CREATE TABLE #T
> > > (sid UNIQUEIDENTIFIER,
> > > tbname VARCHAR (255),
> > > trname VARCHAR (255),
> > > trtext TEXT)
> > > */
into
> > temp
> > > table #T
> > > UPDATE ......
> > > -- now i try to retrieve trigger text from temp table #T and execute
it
> as
> > > SQL statement
> > > It works only if length of trtext less than 8000.
> > > What can i do if my trigger have size more then 8000 characters?
> > > Konstantin.