package SQL::Translator::Parser::DBI::SQLServer;
# -------------------------------------------------------------------
-# $Id: SQLServer.pm,v 1.3 2006-05-04 20:45:58 duality72 Exp $
+# $Id$
# -------------------------------------------------------------------
# Copyright (C) 2002-4 SQLFairy Authors
#
use Data::Dumper;
use vars qw[ $DEBUG $VERSION @EXPORT_OK ];
-$VERSION = sprintf "%d.%02d", q$Revision: 1.3 $ =~ /(\d+)\.(\d+)/;
+$VERSION = sprintf "%d.%02d", q$Revision$ =~ /(\d+)\.(\d+)/;
$DEBUG = 0 unless defined $DEBUG;
no strict 'refs';
FROM syscomments c
JOIN sysobjects o
ON c.id = o.id
- WHERE o.type ='P'
+ WHERE o.type in ('P', 'FN', 'TF', 'IF')
}
);
} elsif ($table_info->{TABLE_TYPE} eq 'VIEW') {
next if $table_info->{TABLE_NAME} eq 'sysconstraints'
|| $table_info->{TABLE_NAME} eq 'syssegments';
+ next if !$stuff->{view}->{$table_info->{TABLE_NAME}}->{text};
my $view = $schema->add_view(
name =>
$table_info->{TABLE_NAME},
}
foreach my $p (values %{$stuff->{procedures}}) {
+ next if !$p->{text};
my $proc = $schema->add_procedure(
name => $p->{name},
owner => $p->{PROCEDURE_OWNER},