public override void GenerateCreateViewScript(DBSchemaView schemaView, DBQuery script)
        {
            if (null == schemaView)
            {
                throw new ArgumentNullException("schemaView");
            }

            if (string.IsNullOrEmpty(schemaView.Name))
            {
                throw new ArgumentNullException("schemaView.Name");
            }

            if (schemaView.Type != DBSchemaTypes.View)
            {
                throw new ArgumentOutOfRangeException("schemaView.Type");
            }

            if (null == script)
            {
                throw new ArgumentNullException("script");
            }

            this.BeginCreate(DBSchemaTypes.View, null);
            this.WriteSourceTable(schemaView.Catalog, schemaView.Schema, schemaView.Name, null);

            if (schemaView.Columns != null && schemaView.Columns.Count > 0)
            {
                List <DBSchemaColumn> col = this.SortColumnsByOrdinal(schemaView.Columns.GetColumns());
                this.BeginBlock();

                for (int i = 0; i < col.Count; i++)
                {
                    this.WriteSourceField(null, null, null, col[i].Name, null);
                    if (i < col.Count - 1)
                    {
                        this.WriteReferenceSeparator();
                    }
                }
                this.EndBlock();
            }

            this.WriteRawSQLString(" AS ");

            script.BuildStatement(this);
        }