Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4874
  • Last Modified:

int Vs Numeric , Varchar vs NVarchar - Which is good? (MS ACCESS TO SQL SERVER MIGRATION)

Hi..
I am planning to migrate my website which uses the MS ACESS Database to MS SQL Server 2000.
So, I have to move the tables and queries from access db to sql server using DTS IMPORT EXPORT DATA.

BUT... In MS Access DB, I have set some field datatypes as text and number
but, when moved to SQL SERVER, it is set as INT and NVARCHAR...

Is it good to continue with this datatype(INT and NVARCHAR) or converting it to NUMERIC and VARCHAR is better???

suggestions please....
0
jawahar_prasad
Asked:
jawahar_prasad
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
it fully depends on what data you have.
int is a integer, no decimals. numeric can store larger number and have decimal parts.

varchar/nvarchar depends if you have several characterset data to be stored in the field.
0
 
Jai STech ArchCommented:
nvarchar - accepts unicode characters
varchar doe not ...so it depends on your application...
either you can change to varchar or keep it as such if you want unicode characters.
0
 
Ashish PatelCommented:
rather than (INT and NVARCHAR) use (INT and VARCHAR)  where NVarchar is the unicode type. which i assume you wont need. And int is better than numeric is you dont have precision in column values.
0
 
ursangelCommented:
Since in access you can have only number as datatype and in SQL server we have a range of datatypes for numbers like Numeric, int, double etc.
As per the other experts advice, i too ve the same opinion, if the data is going to be purely numbers with no precision, then simply go for int rather tham numeric.

Nvarchar and varchar choice is completly yours depending on the values that you have stored in that field.
By default when you use DTS package to transfer data from text it takes as nvarchar. you can use varchar if you don have any special character set data to be stored in the coulmn
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now