I’m moving from MS Access to MSSQL, and I have a question about data types.
In my Access database, I had tables with columns of the following data types:
Text (for short text entries)
Memo (for long text entries)
Number (numeric entries)
Date/Time
Autonumber (auto-incrementing numeric field)
Yes/No
When MSSQL was installed, ALL my databases (12 in total) were combined into one huge database. When this happened, a few things changed.
ALL text fields, whether “Text” or “Memo” were converted to “nvarchar”.
SOME numeric fields were changed to “int” while others were changed to “float”.
ALL primary keys were lost, and at least one autonumber field stopped auto numbering.
Yes/No fields were changed to “bit”.
Date/Time were retained as “datetime”.
So my questions are…
Is nvarchar suitable for handling the old Memo field length? We have some tables with quite a lot of data in those fields, and I don’t want anything cut off.
What’s the difference between “int” and “float”, and why were some numeric fields converted to one type and others to the other type?
Is it normal to lose primary keys when importing from Access to MSSQL? I sort of need those keys!
We’re re-doing the import in another week or so, so if there’s anything I need to change, that’ll be a good time to do it.
Thanks Rudy. I’d just go along and change the column types and set primary keys, but there are over 100 tables, and each have many columns. I’d be there all day, and it’s something that I think should be retained on import.
As for the float thing, some of the new float fields used to be autonumber primary keys, so those wouldn’t have had decimals.
This is worse than I thought. NONE of the primary keys NOR the auto-increment properties have been retained on ANY of the columns! The new database as it is is USELESS to me.
I’ve inquired about the import routine, and was told “It’s all automated”. I’ll have to twist some arms tomorrow at work to figure out who’s in charge of the actual importing, and see what the heck they’re using.