sql - Add data from table to other Table SQLSERVER -


please need have 2 tables first 1 full calendar data dim_table_start(pk_date_deb,year,month,trimester,week,date) , want fill second table data dim_data_start dim_table_end(pk_date_fin,year,month,trimester,week,date) tried :

insert [bd_disponibilite].[dbo].[dim_date_fin]            ([pk_date_fin]             ,[year]             ,[trimester]             ,[month]             ,[week]         )      values          (select * dbo.dim_date_debut) 

but doesn't work

how can add data table fill second table thank you

you don't need values portion when inserting records using select:

insert [bd_disponibilite].[dbo].[dim_date_fin]            ([pk_date_fin]            ,[year]            ,[trimester]            ,[month]            ,[week]            ) select *  dbo.dim_date_debut 

Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -