ALTER TABLE dwh.FACT_AE ALTER COLUMN Verkaeufergruppe_id nvarchar(4);
January 2, 2019 at 4:46 am
Ahoi,
Request:
I have a column that needs a change of length for future changes, because of changes of that column in the source.
So basically there will be 4 char values in the future compared to current 3 char ones.
What ive done so far (developmentserver):
Checking all tables that need the change, by looking for all tables having the column (different name in source and bi, so both need a column length change)select distinct TABLE_SCHEMA,TABLE_NAME from INFORMATION_SCHEMA.COLUMNS
where COLUMN_NAME in ('COLUMNNAMEINSOURCE','COLUMNNAMEINBI')
Altering the tables:
ALTER TABLE dwh.FACT_AE ALTER COLUMN Verkaeufergruppe_id nvarchar(4);
Issues i have encountered (so far):
My questions:
English TLDR: Data cut off because length 4 is trying to be written into a target with data length 3
I want to be the very best
Like no one ever was
January 8, 2019 at 3:49 am
I don't think there is any best practice for this except better design. Why are you now changing a char(3) to a char(4)? Could you have anticipated this from the beginning?
As for the SSIS, you can open the XML and search through that for your field, if you change it there, there is no need to open the packages themselves as when it updates meta-data, it is simply updating the xml in the background, including derived fields etc.
Hope this helps.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply