Conversion from Access to SQL Server

F

fniles

If the Access field is a "Yes/No" field, in Sql Server to what Data Type
should I convert it to ? Thanks.
 
K

Kumar

Means flag field ..i think you can take 'char' or 'varchar'

You can use cast or convert to do this or you can put the trigger to diplay
automatically after every insert or update

Kumar
 
R

Ron Hinds

The equivalent data type in SQL Server is the bit data type. It can have
only two values 1 (True, Yes) or 0 (False, No).
 
G

Guest

The SQL Server Bit type can have 3 values: 1, 0, Null.

The Bit type will appear to be a Yes/No field in Access.

The Bit type is what you get from the Access conversion
wizard.

The null value will cause problems with Access. If you
choose to use the Bit type with Access, make sure you
set the Not Null property (and give it a default value of 0).

If you use Numeric types instead, they will appear as
numeric types in Access.

Some people think that is a good thing.

Some people would like to have null values in their
Yes/No fields (as we had with an earlier version of Jet)

The value of true is +1 in SQL Server (for compatibility
with PDP8 microcomputers) and -1 in Access (for compatibility
with BASIC). This causes problems when coding web pages
to use either kind of data source interchangeably, but does
not cause a problem in Access.

For these reasons and others, people who code across
a variety of programming platforms and database platforms
will sometimes choose to use a Numeric field in Access
and SQL Server rather than a bit field in both.

But if you are converting from Access to SQL server, use
a bit field, because it links to Access as a YesNo field.

(david)
 
Top