Appendix E. Generated T-SQL for the Car Model Example

The following listing is the generated T-SQL code for the CarTypeExample M code shown in Figure 5-10 in Chapter 5.

set xact_abort on; go begin transaction; go set ansi_nulls on; go if not exists ( select * from [sys].[schemas] where [name] = N'CarTypeExample' ) execute [sp_executesql] N'create schema [CarTypeExample]'; go if not exists ( select * from [sys].[schemas] where [name] = N'EngineModule' ) execute [sp_executesql] N'create schema [EngineModule]'; go if not exists ( select * from [sys].[schemas] where [name] = N'$MRuntime.CarTypeExample' ) execute [sp_executesql] N'create schema [$MRuntime.CarTypeExample]'; go if not exists ( select * from [sys].[schemas] where [name] = N'$MRuntime.EngineModule' ...

Get Beginning SQL Server Modeling: Model-Driven Application Development in SQL Server 2008 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.