Append Data Type Text Y/N to Data Type Y/N in Query HELP!

T

troy

I have a query that has a text field with Y and N 0 and need to append that
data to an SQL side that is set up as data type Y/N.
It looks like this..

My Query..How do I append the text yes and no to the datatype Y/N in a
record (field)?

Here is the way it is now but does not work..
Field (is yes/no data type) (SQL side)
EAandOFlag: IIf(dbo_TblProductVersion.EAndOFlag=-1,"Y" Or 0,"N")
append to: EAndOFlag

The SQL side is Y/N field. The database side is Data Type text field

PLEASE HELP ME TO SET UP THE QUERY SO I CAN APPEND THE TEXT DATA INTO THE
DATATYPE y/n.

Thank you
 
M

MGFoster

troy said:
I have a query that has a text field with Y and N 0 and need to append that
data to an SQL side that is set up as data type Y/N.
It looks like this..

My Query..How do I append the text yes and no to the datatype Y/N in a
record (field)?

Here is the way it is now but does not work..
Field (is yes/no data type) (SQL side)
EAandOFlag: IIf(dbo_TblProductVersion.EAndOFlag=-1,"Y" Or 0,"N")
append to: EAndOFlag

The SQL side is Y/N field. The database side is Data Type text field

PLEASE HELP ME TO SET UP THE QUERY SO I CAN APPEND THE TEXT DATA INTO THE
DATATYPE y/n.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

EAandOFlag: IIf(dbo_tblProductVersion.EAandOFlag=-1,"Y","N")

The IIf() syntax is:

IIf(<evaluation expression>, <true expression>, <false expression>)

Which can be show in VBA pseudo-code like this:

If <evaluation expression> = True Then
<true expression>
Else
<false expression>
End If

Since the only values of the field are Y, N, and 0 then the True would
translate to Y, and the N and 0 would translate to N (since 0 = False).
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBRE1pR4echKqOuFEgEQJu2QCbBEVFbD1yDiqHm22wGTEEymsYJMgAnior
VCOnzbDeAgFx73NA6qM5LiP+
=vewo
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top