Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Erland Sommarskog Newsgroups: comp.databases.ms-sqlserver,microsoft.public.sqlserver.programming Subject: Re: SSE2008 T-SQL: Include Files? Followup-To: comp.databases.ms-sqlserver Date: Tue, 11 Sep 2012 23:17:07 +0200 Organization: Erland Sommarskog Lines: 22 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Injection-Info: mx04.eternal-september.org; posting-host="9c1143bfab35549403b85d70ea1a57d8"; logging-data="3194"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+/EGTe/qpGKvJ0feCD2F0V" User-Agent: Xnews/2006.08.24 Mime-proxy/2.1.c.0 (Win32) Cancel-Lock: sha1:2F3gu3KiKMpejInpRJdroSPX79o= Xref: csiph.com comp.databases.ms-sqlserver:1277 Gene Wirchenko (genew@ocis.net) writes: > Does SQL Server (and especially SSE2008) have the concept of > include files? SQL Server does not have the concept of files. This is a server product. You could try SQLCMD mode in SSMS. SQLCMD has ~r to read in a file, but I would not like to maintain that code. But read about SQLCMD in Books Online. > I find that I am repeating a lot of error handling code and I warned you, didn't I? -- Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se Links for SQL Server Books Online: SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx