I need some help in figuring out how to return the value of a check box. I am trying to migrate data from access to sql server 2000. One of my access table contains check box option: a user can select or it is not selected. The problem is that sql server takes that field as null.
Now I am trying to get the value of the check box; something like "0" if not checked and "1" or "-1" if checked. If I can translate to some value, then I am fine with that and can store the same values in sql server.
In order to do that I am trying to use expression builder (IIF function), however, can't seem to figure out how to use an expression to relate check or uncheck option.
Can anyone help me in this regard ?
Thanks
7 5189
For the yes/no field 0 = no or false and -1 = yes or true. A quick fix I can think of is simply changing the field data type from Yes/No to Number. This should convert any records with the field checked to -1 and any unchecked to 0. Make sure to backup and save before attempting this.
I need some help in figuring out how to return the value of a check box. I am trying to migrate data from access to sql server 2000. One of my access table contains check box option: a user can select or it is not selected. The problem is that sql server takes that field as null.
Now I am trying to get the value of the check box; something like "0" if not checked and "1" or "-1" if checked. If I can translate to some value, then I am fine with that and can store the same values in sql server.
In order to do that I am trying to use expression builder (IIF function), however, can't seem to figure out how to use an expression to relate check or uncheck option.
Can anyone help me in this regard ?
Thanks
Try - iif(CheckboxFieldName, 1, 0)
I am still struggling with IIF statement: the error suggests the circular reference, any help ?
"Circular reference caused by alias 'SOW' in query definition's SELECT list"
okay, that circular reference is settled, i used -
-
SOW: IIf([Design and Qualification].[SOW],-1,0)
-
but now another problem: It is displaying all as -1, i guess because it is looking at the check box field and is returning true for that.
My problem is to find the field checked or un checked and accordingly assign -1 for checked and 0 for un checked.
Need some help here,
Thanks
okay, that circular reference is settled, i used -
-
SOW: IIf([Design and Qualification].[SOW],-1,0)
-
but now another problem: It is displaying all as -1, i guess because it is looking at the check box field and is returning true for that.
My problem is to find the field checked or un checked and accordingly assign -1 for checked and 0 for un checked.
Need some help here,
Thanks
try CheckboxName = True instead.
thanks a lot for the help, case is resolved.
Actually I was using the wrong table name :), my bad. It works fine now.
The "IIF" sttement suggested earlier is right, I was wrong.
God Bless
Glad you got it working, good luck.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Greg |
last post by:
Hi. I have a rather large xml document (object) that can have one or
more nodes with a certain attribute throughout (at ANY depth, not at
the same level necessarily). I need to find this...
|
by: GSpiggle |
last post by:
I have a database with records that should have a consecutive number
ID (Check Register). Also has other records (deposits and adjusting
entries) that don't fit in the number range so...
|
by: Laurent Bugnion |
last post by:
Hi,
I am wondering what is the best way to find out which ASP.NET sessions
are still active.
Here is the reason: I have a custom control which can upload files. It
saves the files in a folder...
|
by: ElkGroveR |
last post by:
Hi there!
I'm using PHP to create a simple, dynamic MySQL SELECT query.
The user chooses a selection from a HTML Form SELECT element's many options
and submits the form via a POST action.
...
|
by: Darren Mar-Elia \(MVP\) |
last post by:
This is the situation I have. I have to read 8 registry values and assign
them to variables. The value held in each of those variables corresponds to
a different flag. So, for example, one set of...
|
by: Jerim79 |
last post by:
I am working on a script that will query a database for a FNAME/LNAME
combo. If it finds the combo, I need it to do one set of instructions.
If it doesn't find it, I need it to do something else....
|
by: Brad Baker |
last post by:
I am trying to programmatically set a placeholder control in csharp which is
nested inside a repeater control between <ItemTemplateand </ItemTemplate>
tags, however I am running into problems. I've...
|
by: Tom Gur |
last post by:
Hi,
It's seems that csh and tcsh acts a bit different when handling
special characters in quotes.
i.e: if i'll supply my program with the following arguments: -winpath
"c:\\temp\\"
tcsh will...
|
by: timothytoe |
last post by:
Situation:
I have an array of objects. I want to find the maximum value of a
given numeric value that exists in each of the objects. Suppose the
array of objects is called "stat" and the numeric...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |