Migrate Log /Users/lowell/Desktop/Migrate_one_20021017_093735.log Migrate Target: Adaptive Server Enterprise/12.5.0.2/General Release/P/Apple PowerPC/Mac OS X 10.2/rel125x/1/32-bit/OPT/Tue Sep 3 16:27:43 2002 Connection Information: object server string = 'beige_ASE' database string = 'one' user string = 'sa' password string = 'admin98' Migrate Source: Microsoft SQL Server 2000 - 8.00.194 (Intel X86) Aug 6 2000 00:57:48 Copyright (c) 1988-2000 Microsoft Corporation Enterprise Evaluation Edition on Windows NT 5.0 (Build 2195: ) Connection Information: object driver string = 'com.microsoft.jdbc.sqlserver.SQLServerDriver' url string = 'jdbc:microsoft:sqlserver://192.168.1.17:1433' user string = 'sa' password string = 'admin98' catalog string = 'Northwind' schema string = 'dbo' table string = 'typetest' Migrate Start: TABLES IF EXISTS(SELECT * FROM sysobjects WHERE name = 'Categories') DROP TABLE Categories CREATE TABLE Categories ( CategoryID int not null, CategoryName nvarchar(15) not null, Description text null, Picture image null) IF EXISTS(SELECT * FROM sysobjects WHERE name = 'CustomerCustomerDemo') DROP TABLE CustomerCustomerDemo CREATE TABLE CustomerCustomerDemo ( CustomerID nchar(5) not null, CustomerTypeID nchar(10) not null) IF EXISTS(SELECT * FROM sysobjects WHERE name = 'CustomerDemographics') DROP TABLE CustomerDemographics CREATE TABLE CustomerDemographics ( CustomerTypeID nchar(10) not null, CustomerDesc text null) IF EXISTS(SELECT * FROM sysobjects WHERE name = 'Customers') DROP TABLE Customers CREATE TABLE Customers ( CustomerID nchar(5) not null, CompanyName nvarchar(40) not null, ContactName nvarchar(30) null, ContactTitle nvarchar(30) null, Address nvarchar(60) null, City nvarchar(15) null, Region nvarchar(15) null, PostalCode nvarchar(10) null, Country nvarchar(15) null, Phone nvarchar(24) null, Fax nvarchar(24) null) IF EXISTS(SELECT * FROM sysobjects WHERE name = 'decimal') DROP TABLE decimal CREATE TABLE decimal ( a decimal(5,2) null) IF EXISTS(SELECT * FROM sysobjects WHERE name = 'dtproperties') DROP TABLE dtproperties CREATE TABLE dtproperties ( id int not null, objectid int null, property varchar(64) not null, value varchar(255) null, uvalue nvarchar(255) null, lvalue image null, version int not null) IF EXISTS(SELECT * FROM sysobjects WHERE name = 'Employees') DROP TABLE Employees CREATE TABLE Employees ( EmployeeID int not null, LastName nvarchar(20) not null, FirstName nvarchar(10) not null, Title nvarchar(30) null, TitleOfCourtesy nvarchar(25) null, BirthDate datetime null, HireDate datetime null, Address nvarchar(60) null, City nvarchar(15) null, Region nvarchar(15) null, PostalCode nvarchar(10) null, Country nvarchar(15) null, HomePhone nvarchar(24) null, Extension nvarchar(4) null, Photo image null, Notes text null, ReportsTo int null, PhotoPath nvarchar(255) null) IF EXISTS(SELECT * FROM sysobjects WHERE name = 'EmployeeTerritories') DROP TABLE EmployeeTerritories CREATE TABLE EmployeeTerritories ( EmployeeID int not null, TerritoryID nvarchar(20) not null) IF EXISTS(SELECT * FROM sysobjects WHERE name = 'jello') DROP TABLE jello CREATE TABLE jello ( a int null, b int null, c int null) Converting column 'a' float(53) to float(48) IF EXISTS(SELECT * FROM sysobjects WHERE name = 'jellonum') DROP TABLE jellonum CREATE TABLE jellonum ( a float(48) null) IF EXISTS(SELECT * FROM sysobjects WHERE name = 'one_two') DROP TABLE one_two CREATE TABLE one_two ( c int null) IF EXISTS(SELECT * FROM sysobjects WHERE name = 'Order_Details') DROP TABLE Order_Details CREATE TABLE Order_Details ( OrderID int not null, ProductID int not null, UnitPrice money not null, Quantity smallint not null, Discount real not null) IF EXISTS(SELECT * FROM sysobjects WHERE name = 'Orders') DROP TABLE Orders CREATE TABLE Orders ( OrderID int not null, CustomerID nchar(5) null, EmployeeID int null, OrderDate datetime null, RequiredDate datetime null, ShippedDate datetime null, ShipVia int null, Freight money null, ShipName nvarchar(40) null, ShipAddress nvarchar(60) null, ShipCity nvarchar(15) null, ShipRegion nvarchar(15) null, ShipPostalCode nvarchar(10) null, ShipCountry nvarchar(15) null) IF EXISTS(SELECT * FROM sysobjects WHERE name = 'Products') DROP TABLE Products CREATE TABLE Products ( ProductID int not null, ProductName nvarchar(40) not null, SupplierID int null, CategoryID int null, QuantityPerUnit nvarchar(20) null, UnitPrice money null, UnitsInStock smallint null, UnitsOnOrder smallint null, ReorderLevel smallint null, Discontinued bit not null) IF EXISTS(SELECT * FROM sysobjects WHERE name = 'Region') DROP TABLE Region CREATE TABLE Region ( RegionID int not null, RegionDescription nchar(50) not null) IF EXISTS(SELECT * FROM sysobjects WHERE name = 'Shippers') DROP TABLE Shippers CREATE TABLE Shippers ( ShipperID int not null, CompanyName nvarchar(40) not null, Phone nvarchar(24) null) IF EXISTS(SELECT * FROM sysobjects WHERE name = 'Suppliers') DROP TABLE Suppliers CREATE TABLE Suppliers ( SupplierID int not null, CompanyName nvarchar(40) not null, ContactName nvarchar(30) null, ContactTitle nvarchar(30) null, Address nvarchar(60) null, City nvarchar(15) null, Region nvarchar(15) null, PostalCode nvarchar(10) null, Country nvarchar(15) null, Phone nvarchar(24) null, Fax nvarchar(24) null, HomePage text null) IF EXISTS(SELECT * FROM sysobjects WHERE name = 'Territories') DROP TABLE Territories CREATE TABLE Territories ( TerritoryID nvarchar(20) not null, TerritoryDescription nchar(50) not null, RegionID int not null) Converting bit column 'i' from 'NULL' to 'NOT NULL' Converting column 'o' float(53) to float(48) IF EXISTS(SELECT * FROM sysobjects WHERE name = 'typetest') DROP TABLE typetest CREATE TABLE typetest ( a decimal(7,2) null, b numeric(7,2) null, c real null, d money null, e smallmoney null, f int null, g smallint null, h tinyint null, i bit not null, j real null, k varchar(7) null, l nvarchar(7) null, m char(7) null, n nchar(7) null, o float(48) null) DATA Data dbo.Categories Data dbo.CustomerCustomerDemo Data dbo.CustomerDemographics Data dbo.Customers Data dbo.decimal Data dbo.dtproperties Sybase 00006 ct_connect(): user api layer: external error: The maximum number of connections have already been opened. Sybase Client Condition #60: Sybase 00060 ct_close(FORCE): user api layer: external error: There is a usage error. This routine has been called at an illegal time. Can't open a channel for bulk copy. TABLE dtproperties, PREPARE TO WRITE FAILED Data dbo.Employees Sybase 00006 ct_connect(): user api layer: external error: The maximum number of connections have already been opened. Sybase Client Condition #60: Sybase 00060 ct_close(FORCE): user api layer: external error: There is a usage error. This routine has been called at an illegal time. Can't open a channel for bulk copy. TABLE Employees, PREPARE TO WRITE FAILED Data dbo.EmployeeTerritories Sybase 00006 ct_connect(): user api layer: external error: The maximum number of connections have already been opened. Sybase Client Condition #60: Sybase 00060 ct_close(FORCE): user api layer: external error: There is a usage error. This routine has been called at an illegal time. Can't open a channel for bulk copy. TABLE EmployeeTerritories, PREPARE TO WRITE FAILED Data dbo.jello Sybase 00006 ct_connect(): user api layer: external error: The maximum number of connections have already been opened. Sybase Client Condition #60: Sybase 00060 ct_close(FORCE): user api layer: external error: There is a usage error. This routine has been called at an illegal time. Can't open a channel for bulk copy. TABLE jello, PREPARE TO WRITE FAILED Data dbo.jellonum Sybase 00006 ct_connect(): user api layer: external error: The maximum number of connections have already been opened. Sybase Client Condition #60: Sybase 00060 ct_close(FORCE): user api layer: external error: There is a usage error. This routine has been called at an illegal time. Can't open a channel for bulk copy. TABLE jellonum, PREPARE TO WRITE FAILED Data dbo.one_two Sybase 00006 ct_connect(): user api layer: external error: The maximum number of connections have already been opened. Sybase Client Condition #60: Sybase 00060 ct_close(FORCE): user api layer: external error: There is a usage error. This routine has been called at an illegal time. Can't open a channel for bulk copy. TABLE one_two, PREPARE TO WRITE FAILED Data dbo.Order_Details Sybase 00006 ct_connect(): user api layer: external error: The maximum number of connections have already been opened. Sybase Client Condition #60: Sybase 00060 ct_close(FORCE): user api layer: external error: There is a usage error. This routine has been called at an illegal time. Can't open a channel for bulk copy. TABLE Order_Details, PREPARE TO WRITE FAILED Data dbo.Orders Sybase 00006 ct_connect(): user api layer: external error: The maximum number of connections have already been opened. Sybase Client Condition #60: Sybase 00060 ct_close(FORCE): user api layer: external error: There is a usage error. This routine has been called at an illegal time. Can't open a channel for bulk copy. TABLE Orders, PREPARE TO WRITE FAILED Data dbo.Products Sybase 00006 ct_connect(): user api layer: external error: The maximum number of connections have already been opened. Sybase Client Condition #60: Sybase 00060 ct_close(FORCE): user api layer: external error: There is a usage error. This routine has been called at an illegal time. Can't open a channel for bulk copy. TABLE Products, PREPARE TO WRITE FAILED Data dbo.Region Sybase 00006 ct_connect(): user api layer: external error: The maximum number of connections have already been opened. Sybase Client Condition #60: Sybase 00060 ct_close(FORCE): user api layer: external error: There is a usage error. This routine has been called at an illegal time. Can't open a channel for bulk copy. TABLE Region, PREPARE TO WRITE FAILED Data dbo.Shippers Sybase 00006 ct_connect(): user api layer: external error: The maximum number of connections have already been opened. Sybase Client Condition #60: Sybase 00060 ct_close(FORCE): user api layer: external error: There is a usage error. This routine has been called at an illegal time. Can't open a channel for bulk copy. TABLE Shippers, PREPARE TO WRITE FAILED Data dbo.Suppliers Sybase 00006 ct_connect(): user api layer: external error: The maximum number of connections have already been opened. Sybase Client Condition #60: Sybase 00060 ct_close(FORCE): user api layer: external error: There is a usage error. This routine has been called at an illegal time. Can't open a channel for bulk copy. TABLE Suppliers, PREPARE TO WRITE FAILED Data dbo.Territories Sybase 00006 ct_connect(): user api layer: external error: The maximum number of connections have already been opened. Sybase Client Condition #60: Sybase 00060 ct_close(FORCE): user api layer: external error: There is a usage error. This routine has been called at an illegal time. Can't open a channel for bulk copy. TABLE Territories, PREPARE TO WRITE FAILED Data dbo.typetest Sybase 00006 ct_connect(): user api layer: external error: The maximum number of connections have already been opened. Sybase Client Condition #60: Sybase 00060 ct_close(FORCE): user api layer: external error: There is a usage error. This routine has been called at an illegal time. Can't open a channel for bulk copy. TABLE typetest, PREPARE TO WRITE FAILED INDEXES Indexes for dbo.Categories IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('Categories') and name = 'PK_Categories') DROP INDEX Categories.PK_Categories IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('Categories') and name = 'CategoryName') DROP INDEX Categories.CategoryName CREATE UNIQUE CLUSTERED INDEX PK_Categories ON dbo.Categories(CategoryID) CREATE INDEX CategoryName ON dbo.Categories(CategoryName) Indexes for dbo.CustomerCustomerDemo IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('CustomerCustomerDemo') and name = 'PK_CustomerCustomerDemo') DROP INDEX CustomerCustomerDemo.PK_CustomerCustomerDemo CREATE UNIQUE INDEX PK_CustomerCustomerDemo ON dbo.CustomerCustomerDemo(CustomerID, CustomerTypeID) Indexes for dbo.CustomerDemographics IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('CustomerDemographics') and name = 'PK_CustomerDemographics') DROP INDEX CustomerDemographics.PK_CustomerDemographics CREATE UNIQUE INDEX PK_CustomerDemographics ON dbo.CustomerDemographics(CustomerTypeID) Indexes for dbo.Customers IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('Customers') and name = 'PK_Customers') DROP INDEX Customers.PK_Customers IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('Customers') and name = 'City') DROP INDEX Customers.City IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('Customers') and name = 'CompanyName') DROP INDEX Customers.CompanyName IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('Customers') and name = 'PostalCode') DROP INDEX Customers.PostalCode IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('Customers') and name = 'Region') DROP INDEX Customers.Region CREATE UNIQUE CLUSTERED INDEX PK_Customers ON dbo.Customers(CustomerID) CREATE INDEX City ON dbo.Customers(City) CREATE INDEX CompanyName ON dbo.Customers(CompanyName) CREATE INDEX PostalCode ON dbo.Customers(PostalCode) CREATE INDEX Region ON dbo.Customers(Region) Indexes for dbo.decimal Indexes for dbo.dtproperties IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('dtproperties') and name = 'pk_dtproperties') DROP INDEX dtproperties.pk_dtproperties CREATE UNIQUE CLUSTERED INDEX pk_dtproperties ON dbo.dtproperties(id, property) Indexes for dbo.Employees IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('Employees') and name = 'PK_Employees') DROP INDEX Employees.PK_Employees IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('Employees') and name = 'LastName') DROP INDEX Employees.LastName IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('Employees') and name = 'PostalCode') DROP INDEX Employees.PostalCode CREATE UNIQUE CLUSTERED INDEX PK_Employees ON dbo.Employees(EmployeeID) CREATE INDEX LastName ON dbo.Employees(LastName) CREATE INDEX PostalCode ON dbo.Employees(PostalCode) Indexes for dbo.EmployeeTerritories IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('EmployeeTerritories') and name = 'PK_EmployeeTerritories') DROP INDEX EmployeeTerritories.PK_EmployeeTerritories CREATE UNIQUE INDEX PK_EmployeeTerritories ON dbo.EmployeeTerritories(EmployeeID, TerritoryID) Indexes for dbo.jello Indexes for dbo.jellonum Indexes for dbo.one_two Indexes for dbo.Order_Details IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('Order_Details') and name = 'PK_Order_Details') DROP INDEX Order_Details.PK_Order_Details IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('Order_Details') and name = 'OrderID') DROP INDEX Order_Details.OrderID IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('Order_Details') and name = 'OrdersOrder_Details') DROP INDEX Order_Details.OrdersOrder_Details IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('Order_Details') and name = 'ProductID') DROP INDEX Order_Details.ProductID IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('Order_Details') and name = 'ProductsOrder_Details') DROP INDEX Order_Details.ProductsOrder_Details CREATE UNIQUE CLUSTERED INDEX PK_Order_Details ON dbo.Order_Details(OrderID, ProductID) CREATE INDEX OrderID ON dbo.Order_Details(OrderID) CREATE INDEX OrdersOrder_Details ON dbo.Order_Details(OrderID) CREATE INDEX ProductID ON dbo.Order_Details(ProductID) CREATE INDEX ProductsOrder_Details ON dbo.Order_Details(ProductID) Indexes for dbo.Orders IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('Orders') and name = 'PK_Orders') DROP INDEX Orders.PK_Orders IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('Orders') and name = 'CustomerID') DROP INDEX Orders.CustomerID IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('Orders') and name = 'CustomersOrders') DROP INDEX Orders.CustomersOrders IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('Orders') and name = 'EmployeeID') DROP INDEX Orders.EmployeeID IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('Orders') and name = 'EmployeesOrders') DROP INDEX Orders.EmployeesOrders IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('Orders') and name = 'OrderDate') DROP INDEX Orders.OrderDate IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('Orders') and name = 'ShippedDate') DROP INDEX Orders.ShippedDate IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('Orders') and name = 'ShippersOrders') DROP INDEX Orders.ShippersOrders IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('Orders') and name = 'ShipPostalCode') DROP INDEX Orders.ShipPostalCode CREATE UNIQUE CLUSTERED INDEX PK_Orders ON dbo.Orders(OrderID) CREATE INDEX CustomerID ON dbo.Orders(CustomerID) CREATE INDEX CustomersOrders ON dbo.Orders(CustomerID) CREATE INDEX EmployeeID ON dbo.Orders(EmployeeID) CREATE INDEX EmployeesOrders ON dbo.Orders(EmployeeID) CREATE INDEX OrderDate ON dbo.Orders(OrderDate) CREATE INDEX ShippedDate ON dbo.Orders(ShippedDate) CREATE INDEX ShippersOrders ON dbo.Orders(ShipVia) CREATE INDEX ShipPostalCode ON dbo.Orders(ShipPostalCode) Indexes for dbo.Products IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('Products') and name = 'PK_Products') DROP INDEX Products.PK_Products IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('Products') and name = 'CategoriesProducts') DROP INDEX Products.CategoriesProducts IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('Products') and name = 'CategoryID') DROP INDEX Products.CategoryID IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('Products') and name = 'ProductName') DROP INDEX Products.ProductName IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('Products') and name = 'SupplierID') DROP INDEX Products.SupplierID IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('Products') and name = 'SuppliersProducts') DROP INDEX Products.SuppliersProducts CREATE UNIQUE CLUSTERED INDEX PK_Products ON dbo.Products(ProductID) CREATE INDEX CategoriesProducts ON dbo.Products(CategoryID) CREATE INDEX CategoryID ON dbo.Products(CategoryID) CREATE INDEX ProductName ON dbo.Products(ProductName) CREATE INDEX SupplierID ON dbo.Products(SupplierID) CREATE INDEX SuppliersProducts ON dbo.Products(SupplierID) Indexes for dbo.Region IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('Region') and name = 'PK_Region') DROP INDEX Region.PK_Region CREATE UNIQUE INDEX PK_Region ON dbo.Region(RegionID) Indexes for dbo.Shippers IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('Shippers') and name = 'PK_Shippers') DROP INDEX Shippers.PK_Shippers CREATE UNIQUE CLUSTERED INDEX PK_Shippers ON dbo.Shippers(ShipperID) Indexes for dbo.Suppliers IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('Suppliers') and name = 'PK_Suppliers') DROP INDEX Suppliers.PK_Suppliers IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('Suppliers') and name = 'CompanyName') DROP INDEX Suppliers.CompanyName IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('Suppliers') and name = 'PostalCode') DROP INDEX Suppliers.PostalCode CREATE UNIQUE CLUSTERED INDEX PK_Suppliers ON dbo.Suppliers(SupplierID) CREATE INDEX CompanyName ON dbo.Suppliers(CompanyName) CREATE INDEX PostalCode ON dbo.Suppliers(PostalCode) Indexes for dbo.Territories IF EXISTS(SELECT * FROM sysindexes WHERE id = object_id('Territories') and name = 'PK_Territories') DROP INDEX Territories.PK_Territories CREATE UNIQUE INDEX PK_Territories ON dbo.Territories(TerritoryID) Indexes for dbo.typetest IF EXISTS(SELECT * FROM sysobjects WHERE type = 'V' and name = 'Alphabetical list of products') DROP VIEW Alphabetical list of products Sybase 00102 Incorrect syntax near 'list'. create view "Alphabetical list of products" AS SELECT Products.*, Categories.CategoryName FROM Categories INNER JOIN Products ON Categories.CategoryID = Products.CategoryID WHERE (((Products.Discontinued)=0)) Sybase 00156 Incorrect syntax near the keyword 'AS'. IF EXISTS(SELECT * FROM sysobjects WHERE type = 'V' and name = 'Category Sales for 1997') DROP VIEW Category Sales for 1997 Sybase 00102 Incorrect syntax near 'Sales'. create view "Category Sales for 1997" AS SELECT "Product Sales for 1997".CategoryName, Sum("Product Sales for 1997".ProductSales) AS CategorySales FROM "Product Sales for 1997" GROUP BY "Product Sales for 1997".CategoryName Sybase 00156 Incorrect syntax near the keyword 'AS'. Sybase 00102 Incorrect syntax near 'Product Sales for 1997.'. IF EXISTS(SELECT * FROM sysobjects WHERE type = 'V' and name = 'Current Product List') DROP VIEW Current Product List Sybase 00156 Incorrect syntax near the keyword 'Current'. create view "Current Product List" AS SELECT Product_List.ProductID, Product_List.ProductName FROM Products AS Product_List WHERE (((Product_List.Discontinued)=0)) --ORDER BY Product_List.ProductName Sybase 00156 Incorrect syntax near the keyword 'AS'. IF EXISTS(SELECT * FROM sysobjects WHERE type = 'V' and name = 'Customer and Suppliers by City') DROP VIEW Customer and Suppliers by City Sybase 00156 Incorrect syntax near the keyword 'and'. create view "Customer and Suppliers by City" AS SELECT City, CompanyName, ContactName, 'Customers' AS Relationship FROM Customers UNION SELECT City, CompanyName, ContactName, 'Suppliers' FROM Suppliers --ORDER BY City, CompanyName Sybase 00156 Incorrect syntax near the keyword 'AS'. IF EXISTS(SELECT * FROM sysobjects WHERE type = 'V' and name = 'Invoices') DROP VIEW Invoices create view Invoices AS SELECT Orders.ShipName, Orders.ShipAddress, Orders.ShipCity, Orders.ShipRegion, Orders.ShipPostalCode, Orders.ShipCountry, Orders.CustomerID, Customers.CompanyName AS CustomerName, Customers.Address, Customers.City, Customers.Region, Customers.PostalCode, Customers.Country, (FirstName + ' ' + LastName) AS Salesperson, Orders.OrderID, Orders.OrderDate, Orders.RequiredDate, Orders.ShippedDate, Shippers.CompanyName As ShipperName, "Order Details".ProductID, Products.ProductName, "Order Details".UnitPrice, "Order Details".Quantity, "Order Details".Discount, (CONVERT(money,("Order Details".UnitPrice*Quantity*(1-Discount)/100))*100) AS ExtendedPrice, Orders.Freight FROM Shippers INNER JOIN (Products INNER JOIN ( (Employees INNER JOIN (Customers INNER JOIN Orders ON Customers.CustomerID = Orders.CustomerID) ON Employees.EmployeeID = Orders.EmployeeID) INNER JOIN "Order Details" ON Orders.OrderID = "Order Details".OrderID) ON Products.ProductID = "Order Details".ProductID) ON Shippers.ShipperID = Orders.ShipVia Sybase 00102 Incorrect syntax near 'Order Details.'. IF EXISTS(SELECT * FROM sysobjects WHERE type = 'V' and name = 'Order Details Extended') DROP VIEW Order Details Extended Sybase 00156 Incorrect syntax near the keyword 'Order'. create view "Order Details Extended" AS SELECT "Order Details".OrderID, "Order Details".ProductID, Products.ProductName, "Order Details".UnitPrice, "Order Details".Quantity, "Order Details".Discount, (CONVERT(money,("Order Details".UnitPrice*Quantity*(1-Discount)/100))*100) AS ExtendedPrice FROM Products INNER JOIN "Order Details" ON Products.ProductID = "Order Details".ProductID --ORDER BY "Order Details".OrderID Sybase 00156 Incorrect syntax near the keyword 'AS'. Sybase 00102 Incorrect syntax near 'Order Details.'. IF EXISTS(SELECT * FROM sysobjects WHERE type = 'V' and name = 'Order Subtotals') DROP VIEW Order Subtotals Sybase 00156 Incorrect syntax near the keyword 'Order'. create view "Order Subtotals" AS SELECT "Order Details".OrderID, Sum(CONVERT(money,("Order Details".UnitPrice*Quantity*(1-Discount)/100))*100) AS Subtotal FROM "Order Details" GROUP BY "Order Details".OrderID Sybase 00156 Incorrect syntax near the keyword 'AS'. Sybase 00102 Incorrect syntax near 'Order Details.'. IF EXISTS(SELECT * FROM sysobjects WHERE type = 'V' and name = 'Orders Qry') DROP VIEW Orders Qry Sybase 00102 Incorrect syntax near 'Qry'. create view "Orders Qry" AS SELECT Orders.OrderID, Orders.CustomerID, Orders.EmployeeID, Orders.OrderDate, Orders.RequiredDate, Orders.ShippedDate, Orders.ShipVia, Orders.Freight, Orders.ShipName, Orders.ShipAddress, Orders.ShipCity, Orders.ShipRegion, Orders.ShipPostalCode, Orders.ShipCountry, Customers.CompanyName, Customers.Address, Customers.City, Customers.Region, Customers.PostalCode, Customers.Country FROM Customers INNER JOIN Orders ON Customers.CustomerID = Orders.CustomerID Sybase 00156 Incorrect syntax near the keyword 'AS'. IF EXISTS(SELECT * FROM sysobjects WHERE type = 'V' and name = 'Product Sales for 1997') DROP VIEW Product Sales for 1997 Sybase 00102 Incorrect syntax near 'Sales'. create view "Product Sales for 1997" AS SELECT Categories.CategoryName, Products.ProductName, Sum(CONVERT(money,("Order Details".UnitPrice*Quantity*(1-Discount)/100))*100) AS ProductSales FROM (Categories INNER JOIN Products ON Categories.CategoryID = Products.CategoryID) INNER JOIN (Orders INNER JOIN "Order Details" ON Orders.OrderID = "Order Details".OrderID) ON Products.ProductID = "Order Details".ProductID WHERE (((Orders.ShippedDate) Between '19970101' And '19971231')) GROUP BY Categories.CategoryName, Products.ProductName Sybase 00156 Incorrect syntax near the keyword 'AS'. Sybase 00102 Incorrect syntax near 'Order Details.'. Sybase 00102 Incorrect syntax near 'Orders'. IF EXISTS(SELECT * FROM sysobjects WHERE type = 'V' and name = 'Products Above Average Price') DROP VIEW Products Above Average Price Sybase 00102 Incorrect syntax near 'Above'. create view "Products Above Average Price" AS SELECT Products.ProductName, Products.UnitPrice FROM Products WHERE Products.UnitPrice>(SELECT AVG(UnitPrice) From Products) --ORDER BY Products.UnitPrice DESC Sybase 00156 Incorrect syntax near the keyword 'AS'. IF EXISTS(SELECT * FROM sysobjects WHERE type = 'V' and name = 'Products by Category') DROP VIEW Products by Category Sybase 00156 Incorrect syntax near the keyword 'by'. create view "Products by Category" AS SELECT Categories.CategoryName, Products.ProductName, Products.QuantityPerUnit, Products.UnitsInStock, Products.Discontinued FROM Categories INNER JOIN Products ON Categories.CategoryID = Products.CategoryID WHERE Products.Discontinued <> 1 --ORDER BY Categories.CategoryName, Products.ProductName Sybase 00156 Incorrect syntax near the keyword 'AS'. IF EXISTS(SELECT * FROM sysobjects WHERE type = 'V' and name = 'Quarterly Orders') DROP VIEW Quarterly Orders Sybase 00102 Incorrect syntax near 'Orders'. create view "Quarterly Orders" AS SELECT DISTINCT Customers.CustomerID, Customers.CompanyName, Customers.City, Customers.Country FROM Customers RIGHT JOIN Orders ON Customers.CustomerID = Orders.CustomerID WHERE Orders.OrderDate BETWEEN '19970101' And '19971231' Sybase 00156 Incorrect syntax near the keyword 'AS'. IF EXISTS(SELECT * FROM sysobjects WHERE type = 'V' and name = 'Sales by Category') DROP VIEW Sales by Category Sybase 00156 Incorrect syntax near the keyword 'by'. create view "Sales by Category" AS SELECT Categories.CategoryID, Categories.CategoryName, Products.ProductName, Sum("Order Details Extended".ExtendedPrice) AS ProductSales FROM Categories INNER JOIN (Products INNER JOIN (Orders INNER JOIN "Order Details Extended" ON Orders.OrderID = "Order Details Extended".OrderID) ON Products.ProductID = "Order Details Extended".ProductID) ON Categories.CategoryID = Products.CategoryID WHERE Orders.OrderDate BETWEEN '19970101' And '19971231' GROUP BY Categories.CategoryID, Categories.CategoryName, Products.ProductName --ORDER BY Products.ProductName Sybase 00156 Incorrect syntax near the keyword 'AS'. Sybase 00102 Incorrect syntax near 'Order Details Extended.'. IF EXISTS(SELECT * FROM sysobjects WHERE type = 'V' and name = 'Sales Totals by Amount') DROP VIEW Sales Totals by Amount Sybase 00102 Incorrect syntax near 'Totals'. create view "Sales Totals by Amount" AS SELECT "Order Subtotals".Subtotal AS SaleAmount, Orders.OrderID, Customers.CompanyName, Orders.ShippedDate FROM Customers INNER JOIN (Orders INNER JOIN "Order Subtotals" ON Orders.OrderID = "Order Subtotals".OrderID) ON Customers.CustomerID = Orders.CustomerID WHERE ("Order Subtotals".Subtotal >2500) AND (Orders.ShippedDate BETWEEN '19970101' And '19971231') Sybase 00156 Incorrect syntax near the keyword 'AS'. Sybase 00102 Incorrect syntax near 'Order Subtotals.'. IF EXISTS(SELECT * FROM sysobjects WHERE type = 'V' and name = 'Summary of Sales by Quarter') DROP VIEW Summary of Sales by Quarter Sybase 00156 Incorrect syntax near the keyword 'of'. create view "Summary of Sales by Quarter" AS SELECT Orders.ShippedDate, Orders.OrderID, "Order Subtotals".Subtotal FROM Orders INNER JOIN "Order Subtotals" ON Orders.OrderID = "Order Subtotals".OrderID WHERE Orders.ShippedDate IS NOT NULL --ORDER BY Orders.ShippedDate Sybase 00156 Incorrect syntax near the keyword 'AS'. Sybase 00102 Incorrect syntax near 'Order Subtotals.'. IF EXISTS(SELECT * FROM sysobjects WHERE type = 'V' and name = 'Summary of Sales by Year') DROP VIEW Summary of Sales by Year Sybase 00156 Incorrect syntax near the keyword 'of'. create view "Summary of Sales by Year" AS SELECT Orders.ShippedDate, Orders.OrderID, "Order Subtotals".Subtotal FROM Orders INNER JOIN "Order Subtotals" ON Orders.OrderID = "Order Subtotals".OrderID WHERE Orders.ShippedDate IS NOT NULL --ORDER BY Orders.ShippedDate Sybase 00156 Incorrect syntax near the keyword 'AS'. Sybase 00102 Incorrect syntax near 'Order Subtotals.'. IF EXISTS(SELECT * FROM sysobjects WHERE type = 'P' and name = 'bbb') DROP PROCEDURE bbb create procedure bbb as begin select 'in procedure bbb' end IF EXISTS(SELECT * FROM sysobjects WHERE type = 'P' and name = 'aaa') DROP PROCEDURE aaa create procedure aaa as begin select 'in procedure aaa' exec bbb end IF EXISTS(SELECT * FROM sysobjects WHERE type = 'P' and name = 'CustOrderHist') DROP PROCEDURE CustOrderHist CREATE PROCEDURE CustOrderHist @CustomerID nchar(5) AS SELECT ProductName, Total=SUM(Quantity) FROM Products P, [Order Details] OD, Orders O, Customers C WHERE C.CustomerID = @CustomerID AND C.CustomerID = O.CustomerID AND O.OrderID = OD.OrderID AND OD.ProductID = P.ProductID GROUP BY ProductName Sybase 00102 Incorrect syntax near '['. IF EXISTS(SELECT * FROM sysobjects WHERE type = 'P' and name = 'CustOrdersDetail') DROP PROCEDURE CustOrdersDetail CREATE PROCEDURE CustOrdersDetail @OrderID int AS SELECT ProductName, UnitPrice=ROUND(Od.UnitPrice, 2), Quantity, Discount=CONVERT(int, Discount * 100), ExtendedPrice=ROUND(CONVERT(money, Quantity * (1 - Discount) * Od.UnitPrice), 2) FROM Products P, [Order Details] Od WHERE Od.ProductID = P.ProductID and Od.OrderID = @OrderID Sybase 00102 Incorrect syntax near '['. IF EXISTS(SELECT * FROM sysobjects WHERE type = 'P' and name = 'CustOrdersOrders') DROP PROCEDURE CustOrdersOrders CREATE PROCEDURE CustOrdersOrders @CustomerID nchar(5) AS SELECT OrderID, OrderDate, RequiredDate, ShippedDate FROM Orders WHERE CustomerID = @CustomerID ORDER BY OrderID IF EXISTS(SELECT * FROM sysobjects WHERE type = 'P' and name = 'Employee Sales by Country') DROP PROCEDURE Employee Sales by Country Sybase 00102 Incorrect syntax near 'Sales'. create procedure "Employee Sales by Country" @Beginning_Date DateTime, @Ending_Date DateTime AS SELECT Employees.Country, Employees.LastName, Employees.FirstName, Orders.ShippedDate, Orders.OrderID, "Order Subtotals".Subtotal AS SaleAmount FROM Employees INNER JOIN (Orders INNER JOIN "Order Subtotals" ON Orders.OrderID = "Order Subtotals".OrderID) ON Employees.EmployeeID = Orders.EmployeeID WHERE Orders.ShippedDate Between @Beginning_Date And @Ending_Date Sybase 00102 Incorrect syntax near '@Beginning_Date'. Sybase 00102 Incorrect syntax near 'Order Subtotals.'. IF EXISTS(SELECT * FROM sysobjects WHERE type = 'P' and name = 'Sales by Year') DROP PROCEDURE Sales by Year Sybase 00156 Incorrect syntax near the keyword 'by'. create procedure "Sales by Year" @Beginning_Date DateTime, @Ending_Date DateTime AS SELECT Orders.ShippedDate, Orders.OrderID, "Order Subtotals".Subtotal, DATENAME(yy,ShippedDate) AS Year FROM Orders INNER JOIN "Order Subtotals" ON Orders.OrderID = "Order Subtotals".OrderID WHERE Orders.ShippedDate Between @Beginning_Date And @Ending_Date Sybase 00102 Incorrect syntax near '@Beginning_Date'. Sybase 00102 Incorrect syntax near 'Order Subtotals.'. IF EXISTS(SELECT * FROM sysobjects WHERE type = 'P' and name = 'SalesByCategory') DROP PROCEDURE SalesByCategory CREATE PROCEDURE SalesByCategory @CategoryName nvarchar(15), @OrdYear nvarchar(4) = '1998' AS IF @OrdYear != '1996' AND @OrdYear != '1997' AND @OrdYear != '1998' BEGIN SELECT @OrdYear = '1998' END SELECT ProductName, TotalPurchase=ROUND(SUM(CONVERT(decimal(14,2), OD.Quantity * (1-OD.Discount) * OD.UnitPrice)), 0) FROM [Order Details] OD, Orders O, Products P, Categories C WHERE OD.OrderID = O.OrderID AND OD.ProductID = P.ProductID AND P.CategoryID = C.CategoryID AND C.CategoryName = @CategoryName AND SUBSTRING(CONVERT(nvarchar(22), O.OrderDate, 111), 1, 4) = @OrdYear GROUP BY ProductName ORDER BY ProductName Sybase 00102 Incorrect syntax near '['. IF EXISTS(SELECT * FROM sysobjects WHERE type = 'P' and name = 'Ten Most Expensive Products') DROP PROCEDURE Ten Most Expensive Products Sybase 00102 Incorrect syntax near 'Most'. create procedure "Ten Most Expensive Products" AS SET ROWCOUNT 10 SELECT Products.ProductName AS TenMostExpensiveProducts, Products.UnitPrice FROM Products ORDER BY Products.UnitPrice DESC Sybase 00156 Incorrect syntax near the keyword 'AS'. TRIGGERS IF EXISTS(SELECT * FROM sysobjects WHERE type = 'TR' and name = 'abcdef') DROP TRIGGER abcdef create trigger abcdef on jello for insert as begin print 'inserting into jello' end End of migrate log.