Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

DBDesigner 4 to MSSQL 2000

Posted on 2007-08-04
2
Medium Priority
?
880 Views
Last Modified: 2013-11-05
Hi aneeshattingal,

could you please convert RecoverDB.xml to MSSQL??
0
Comment
Question by:DrAske
2 Comments
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 2000 total points
ID: 19631663
CREATE TABLE account (
  account_id INTEGER  NOT NULL PRIMARY KEY ,
  ssn CHAR(9) NULL,
  account_status_id INTEGER  NOT NULL,
  specialist VARCHAR(100)NULL,
  local_office_id INTEGER  NOT NULL,
  balance BIGINT NULL,
  billable_balance DECIMAL NULL,
  collectible_balance DECIMAL NULL,
  suspension_reason_id INTEGER  NOT NULL,
  last_quarter_wages DECIMAL NULL,
  last_closed_on smallDatetime NULL,
  last_opened_on smallDatetime NULL,
  prevent_referral BIT NULL,
  reffered BIT NULL,
  legal BIT NULL,
  garnish BIT NULL,
  minimum_payment DECIMAL NULL,
  min_payment_override BIT NULL,
  min_pmt_override_start_smallDatetime smallDatetime NULL,
  min_pmt_override_end_smallDatetime smallDatetime NULL,
  create_smallDatetime DATETIME NULL,
  update_smallDatetime DATETIME  DEFAULT GETDATE(),
  is_new_hire  BIT NULL
);
CREATE INDEX account_FKIndex2 ON account(local_office_id)
CREATE INDEX account_FKIndex3 ON account(suspension_reason_id)
CREATE INDEX account_FKIndex4 ON account(account_status_id)
;
CREATE TABLE account_address (
  address_id INTEGER  IDENTITY PRIMARY key,
  account_id INTEGER  NOT NULL,
  first_name VARCHAR(100) NULL,
  middle_initial CHAR NULL,
  last_name VARCHAR(100)NULL,
  address1 VARCHAR(100)NULL,
  address2 VARCHAR(100)NULL,
  city VARCHAR(100)NULL,
  state_id INTEGER  NOT NULL,
  zip VARCHAR(100)NULL,
  zip_ext VARCHAR(100)NULL,
  fips VARCHAR(100)NULL,
  phone VARCHAR(100)NULL,
  fax VARCHAR(100)NULL,
  email VARCHAR(100)NULL,
  language_id INTEGER  NOT NULL,
  address_type_id INTEGER  NOT NULL,
  is_current BIT NULL,
  create_smallDatetime DATETIME NULL
);

create  INDEX account_address_FKIndex2 ON account_address (state_id)
create  INDEX account_address_FKIndex3 ON account_address (language_id)
create  INDEX account_address_FKIndex4 ON account_address (address_type_id)
CREATE  INDEX account_address_FKIndex4 ON account_address (account_id)
GO


CREATE TABLE account_attribute (
  account_attribute_id INTEGER  IDENTITY ,
  account_id INTEGER  NOT NULL,
  attribute_name VARCHAR(100)NULL,
  attribute_value INTEGER  NULL,
  attribute_type VARCHAR(100)NULL
);
CREATE   INDEX account_attribute_FKIndex1 ON account_attribute(account_id)

GO

CREATE TABLE account_status (
  account_status_id INTEGER  IDENTITY primary key,
  status_name VARCHAR(100)NULL,
  status_code CHAR NULL,
  status_description INTEGER  NULL

);

CREATE TABLE account_workflow (
  account_workflow_id INTEGER  IDENTITY PRIMARY KEY ,
  account_id INTEGER  NOT NULL,
  workflow_type_id INTEGER  NOT NULL,
  guid CHAR NULL,
  is_suspended BIT NULL DEFAULT 0,
  started_on DATETIME NULL DEFAULT GETDATE()

)
go

 create INDEX account_workflow_FKIndex1 ON account_workflow(workflow_type_id)
go
CREATE   INDEX account_workflow_FKIndex2 ON account_workflow(account_id)




CREATE TABLE address_type (
  address_type_id INTEGER  IDENTITY PRIMARY KEY ,
  address_type_name VARCHAR(100)NULL,
  address_type_description INTEGER  NULL
);

CREATE TABLE audit_trail (
  audit_id INTEGER  IDENTITY PRIMARY KEY ,
  account_id INTEGER  NOT NULL,
  audit_type_id INTEGER  NOT NULL,
  entry_text VARCHAR(100)NULL,
  assigned_specialist VARCHAR(100)NULL,
  entry_smallDatetime DATETIME NULL,
  entered_by VARCHAR(100)NULL
);

create INDEX AuditTrail_FKIndex2 on audit_trail(audit_type_id)
go
CREATE INDEX audit_trail_FKIndex2 ON audit_trail(account_id)


CREATE TABLE audit_type (
  audit_type_id INTEGER  IDENTITY PRIMARY KEY ,
  audit_type_name VARCHAR(100)NULL,
  audit_type_description INTEGER  NULL
);

CREATE TABLE billing_history (
  bill_id INTEGER  IDENTITY PRIMARY KEY ,
  account_id INTEGER  NOT NULL,
  bill_smallDatetime smallDatetime NULL,
  bill_due_smallDatetime smallDatetime NULL,
  min_payment_amount DECIMAL NULL,
  full_amount DECIMAL NULL
);
create INDEX billing_history_FKIndex1 ON  billing_history(account_id)


CREATE TABLE language (
  language_id INTEGER  IDENTITY primary KEY ,
  language_abbrev CHAR NULL,
  language_name VARCHAR(100)NULL
);

CREATE TABLE local_office (
  local_office_id INTEGER  IDENTITY PRIMARY KEY ,
  local_office_no VARCHAR(100)NULL
);


CREATE TABLE overpayment (
  overpayment_id INTEGER  IDENTITY PRIMARY KEY ,
  account_id INTEGER  NOT NULL,
  amount DECIMAL NULL,
  billable_amount DECIMAL NULL,
  collectible_amount DECIMAL NULL,
  balance DECIMAL NULL,
  billable_balance DECIMAL NULL,
  collectible_balance DECIMAL NULL,
  overpayment_status_id INTEGER  NOT NULL,
  establish_smallDatetime DATETIME NULL,
  BYE DATETIME NULL,
  fraud BIT NULL,
  appeal_status CHAR(1) NULL,
  appeal_smallDatetime DATETIME NULL,
  [current] BIT NULL,
  create_smallDatetime DATETIME NULL
);
create INDEX overpayment_FKIndex2 ON overpayment(overpayment_status_id)
go
create INDEX overpayment_FKIndex2 ON overpayment(account_id)

CREATE TABLE overpayment_attribute (
  overpayment_attribute_id INTEGER  IDENTITY PRIMARY KEY ,
  overpayment_id INTEGER  NOT NULL,
  attribute_name INTEGER  NULL,
  attribute_value INTEGER  NULL,
  attribute_type VARCHAR(100)NULL
);
CREATE   INDEX OverpaymentAttribute_FKIndex1 overpayment_attribute(overpayment_id)

CREATE TABLE overpayment_status (
  overpayment_status_id INTEGER  IDENTITY PRIMARY KEY ,
  status_name VARCHAR(100)NULL,
  status_code CHAR NULL,
  status_description INTEGER  NULL
);

CREATE TABLE repayment (
  repayment_id INTEGER  IDENTITY PRIMARY KEY ,
  account_id INTEGER  NOT NULL,
  amount INTEGER  NULL,
  is_offset BIT NULL,
  payment_smallDatetime DATETIME NULL,
  create_smallDatetime DATETIME NULL
);

CREATE INDEX repayment_FKIndex1 on repayment(account_id)
go

CREATE TABLE repayment_application (
  repayment_id INTEGER  NOT NULL,
  overpayment_id INTEGER  NOT NULL,
  application_amount BIGINT NULL,
  create_smallDatetime DATETIME NULL
);

ALTER TABLE [dbo].[repayment_application] ADD
      CONSTRAINT [PK_repayment_application] PRIMARY KEY  CLUSTERED
      (
            [repayment_id],
            [overpayment_id]
      )  
GO

CREATE INDEX RepaymentApplication_FKIndex1 ON repayment_application(repayment_id)
go
create INDEX RepaymentApplication_FKIndex2 ON repayment_application(overpayment_id)


CREATE TABLE repayment_attribute (
  repayment_attribute_id INTEGER  IDENTITY PRIMARY KEY ,
  repayment_id INTEGER  NOT NULL,
  attribute_name VARCHAR(100)NULL,
  attribute_value VARCHAR(100)NULL
);

CREATE INDEX RepaymentAttribute_FKIndex1 on repayment_attribute(repayment_id)


CREATE TABLE state (
  state_id INTEGER  IDENTITY PRIMARY KEY ,
  state_abbrev CHAR NULL,
  state_name VARCHAR(100)NULL
  );

CREATE TABLE suspension_reason (
  suspension_reason_id INTEGER  IDENTITY PRIMARY KEY ,
  suspension_name VARCHAR(100)NULL,
  suspension_description VARCHAR(100)NULL
);

CREATE TABLE workflow_type (
  workflow_type_id INTEGER  IDENTITY PRIMARY KEY ,
  workflow_name VARCHAR(100)NULL,
  workflow_description VARCHAR(100)NULL
);

0
 
LVL 9

Author Comment

by:DrAske
ID: 19631669
thank you, really appreciate your help :o)
0

Featured Post

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how the fundamental information of how to create a table.
Suggested Courses

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question