cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
983
Views
0
Helpful
3
Replies

Writing Boolean variables to MS SQL Server

kkelly
Level 1
Level 1

I cannot figure this out.

In the script I'm working on, a boolean variable can be dynamic either True / False ,etc

I cannot get the syntex correct to write this variable to a "binary" datatype column in SQL Server.

Column name in database is Binary

I have tried :

UPDATE da-database
SET Binary=@bStatus
WHERE First=400

da-databaseTEST

SET Binary=&bStatus
WHERE First=400

da-databaseTEST

SET Binary=bStatus
WHERE First=400

But if I use

da-databaseTEST

SET Binary=1
WHERE First=400

It sets the field to true i.e, Works correctly.  Just get get it going with a variable.

3 Replies 3

Anthony Holloway
Cisco Employee
Cisco Employee

Is this UCCX or UCCE?

it is UCCX and

I'm having issues writing to a database doing any variable substitution.

I gave up on the boolean and decided to use just strings but hitting Null.Pointer Exceptions even though (IMHO) things are correct.

Is there a particular varaible type that I should defining in SQL that works "best" with the java beans and IPCC?

Gergely Szabo
VIP Alumni
VIP Alumni

Hi, can you post the SQL query (the one generating Nullpointers)? G.