Tell me more ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

ALTER TABLE SWITCH statement failed because column does not have the same ANSI trimming semantics in tables...

Does anyone knows how to fix that on already existing table full of data?

Well, I've found that it is simply possible to recreate same table with same ANSI_PADDING parameter, but the problem is that the table I'm trying to switch into a larger main table is already filled with data. I don't want to spend again 37 hours to reload that partition =(

share|improve this question
The problematic column has different setting "ansi padding status" on source and target tables. Obviously because I didn't pay attention to it when was creating staging table. Is there way to alter this property? – Vlad Ogay Mar 21 '12 at 1:08
4  
Look at the bright side: next time you'll know! – Remus Rusanu Mar 21 '12 at 6:04
1  
I like your optimism)) For now it appeared that there two more tables with the same problem so overall reload time will become ~50h. – Vlad Ogay Mar 21 '12 at 9:24

1 Answer

create the create table script of source table , modify the create table script as to create a new target table then run the switch command again

share|improve this answer
2  
-1 this doesn't address "the problem is that the table I'm trying to switch into a larger main table is already filled with data. I don't want to spend again 37 hours to reload that partition" – Jack Douglas Nov 21 '12 at 14:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.