Sql Backup And FTP

Welcome Guest Search | Active Topics | Log In | Register
New Topic Post Reply
booleans as bits Options · View
Guest
#1 Posted : Monday, September 13, 2010 6:48:48 AM Quote
Rank: Guest

Groups:

Joined: 8/10/2009
Posts: 732
Hi,

I am trying to insert a script taken from a 'SQL Server 2005 Express DB' to a local 'SQL Server 2000 Desktop Engine (MSDE 2000)' DB for test purposes but get stuck on the following error message:

Descr=Syntax error converting the varchar value 'False' to a column of data type bit.

The line generating the error is
VALUES (1, 94, CAST ('False' AS bit), CAST ('False' AS bit), N'Call', 2, N'OrderType_Call', 96, 1)

Where if I change the statement to

VALUES ('1','94',0,0,'Call','2','OrderType_Call','96','1') it works fine.

Is there any way I can get the scriptgenerator to treat booleans as 0/1 rather than casting the value true/false to bits (which I guess is not supported in MSDE)?

Thanks,

Anders
mikeshilov
#2 Posted : Monday, September 13, 2010 7:46:19 AM Quote
Rank: Administration

Groups: Administrators

Joined: 8/12/2009
Posts: 271
Hi,

Since we don't support SQL 2000 there is no option for this. I suggest you to manually replace "CAST ('False' AS bit)" to "0",a and "CAST ('True' AS bit)" to "1" in the scripts if you need to do this once.

BR,
Mike
Quick Reply Show Quick Reply
New Topic Post Reply
Forum Jump  
You can post new topics in this forum.
You can reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You can create polls in this forum.
You can vote in polls in this forum.