Ir para conteúdo
Fórum Script Brasil

marcop

Membros
  • Total de itens

    1
  • Registro em

  • Última visita

Sobre marcop

marcop's Achievements

0

Reputação

  1. Oi, Eu tenho uma BD em que as tabelas estão definidas em scripts. Eu gostava de saber como posso gerar as tabelas no Microsoft SQL Server Management Studio 2008?? é que não tem sentido estar a introduzir as tabelas campo a campo quando tenho o script, agradeço muito a vossa ajuda, MP Exemplo de um extracto de script: use DDS go -- Drop FK if exists: if exists (select * from sys.foreign_keys where name = 'fk_fact_campaign_result_dim_customer' and parent_object_id = object_id('fact_campaign_result')) alter table fact_campaign_result drop constraint fk_fact_campaign_result_dim_customer go if exists (select * from sys.foreign_keys where name = 'fk_fact_communication_subscription_dim_customer' and parent_object_id = object_id('fact_communication_subscription')) alter table fact_communication_subscription drop constraint fk_fact_communication_subscription_dim_customer go if exists (select * from sys.foreign_keys where name = 'fk_fact_subscription_sales_dim_customer' and parent_object_id = object_id('fact_subscription_sales')) alter table fact_subscription_sales drop constraint fk_fact_subscription_sales_dim_customer go if exists (select * from sys.foreign_keys where name = 'fk_fact_product_sales_dim_customer' and parent_object_id = object_id('fact_product_sales')) alter table fact_product_sales drop constraint fk_fact_product_sales_dim_customer go -- Drop and create the table: if exists (select * from sys.tables where name = 'dim_customer') drop table dim_customer go create table dim_customer ( customer_key int not null , customer_id varchar(10) not null , account_number int , customer_type char(3) , name varchar(100) , gender char(1) , email_address varchar(200) , date_of_birth datetime , address1 varchar(50) , address2 varchar(50) , address3 varchar(50) , address4 varchar(50) ....
×
×
  • Criar Novo...