|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
want to insert dimension id's from my SQL DB into facttables of the same SQL DB..for this purpose i am first using a transform data task to transfer data from an oracle DB to the SQL DB....
i am using Execute SQL task to alter table... if i use alter table test add company_name varchar(8) ( select company_name from junk) it does not give any problem but inserts a column with the name company_name with all null values...it does not insert company names from junk this is one way i tried to add diemsion id's into fact tables.. the other method i am using is that i use a Execute SQL task to first add a column then i use another Execute SQL task to insert values from the dimension table.. the insert statement i am using is.. insert into test(member_name) select member_name from members or insert into test(member_name) select member_name from members where member_code=2 but in both cases it says .. column does not allow nulls insert fails altough the source col does not hve null values.. what should i do about this.. besides this is it possible tht in one Execute SQL task..i can apply alter table to add a column and in the same time insert values into that column..if so how is this possible.. |
|
#2
|
|||
|
|||
|
since you are adding a column, shouldn't you be using an update statement iso insert statement?
If you are creating new records in this table, the nullable values are probably in other fields in this table, which cannot except null values. Hope this helps
__________________
- Rogier Doekes |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft SQL Server > inserting dimension id's |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|