ACCESS to SQL to note several places where

After importing the database to automatically increase the field need to be rewritten, all need to increase the number of types of length, it is best to use decimal.

The default values are all lost. Main types of digital type and date.

All now (), time (), date () to change the getdate ().

All datediff ('d', time1, time2) to change the datediff (day, time1, time2)

There may be a number of true / false type can not be used, to become 1 / 0.

Note the type to pass cast (column as varchar) to use.

CursorType we wanted to change one, that is, open the database to give the first number parameter is 1, otherwise the record may appear incomplete.

isnull (rowname) to change rowname = null

ACCESS database automatically when the number type conversion, sql server does not set it to auto-number type, we need to add SQL statements to create identity, that number automatically!

Conversion time, with the date of the field, SQL SERVER default to smalldatetime type, we'd better turn it into datetime type, because the scope of type datetime smalldatetime type than the large. Sometimes smalldatetime type, the conversion failed, but with a datetime type, the conversion successful.

Have two kinds of database operations the same sql statement failure, for example: in the ACCESS database to delete records with: "delete * from user where id = 10", and delete the database on the SQL SERVER is: "delete user where id = 10 ".

Date function is not the same treatment in the ACCESS database, available date (), time () and other functions, but SQL SERVER database processing, can only use datediff, dateadd other functions, not with the date (), time () and other functions.

Treatment in the ACCESS database, sql statement, you can directly use some VB functions, such as cstr () function, while the SQL SERVER database processing, can not take.

Declined comment

<蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <文本链> <文本链> <文本链> <文本链> <文本链> <文本链>