• In the real world, the situation you describe is common. You've never had a problem because most of the data in those varchar columns happens to be far smaller than the maximum allowable.

    Tables created through DTS to import data into end up with varchar(255) columns by default.

    One of the recent worst practices articles (if I remember correctly) mentioned that this is not a good idea, in that it is possible for an insert to fail it the data ever does get up to that point.

    If the import table is around for the long haul, it's not a bad idea to get better column definitions established between you and the data provider. That way, it may be easier to figure out what data is causing a problem. Mind you, as long as the imported data remains below the threshold, you're fine.

    The primary advantages of improved column definitions are that data problems can be avoided up front. If the data provider is will to say that the "lastname" column will never be longer than 50 characters, the database can enforce that. Tuning the data*types* can be even more important - if you are expecting an integer value, a failure to insert the data would help identify bad data or a corrupt file. It's a lot easier to mess around with fixing the data before it's imported than to come back after a year and realizing that dozens of records show "number of family members" as 'Columbus'....

    R David Francis


    R David Francis