I believe since defncopy doesn't retain header and footer you would have to do it yourself.I achieved the same using shell scripts.This is a sample code
echo "If exists(select 1 from sysobjects where name = \"$file\" and type = \"TR\")" >> "filename"...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.