PC Review


Reply
Thread Tools Rate Thread

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

 
 
=?Utf-8?B?dHJveQ==?=
Guest
Posts: n/a
 
      24th Apr 2006
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


 
Reply With Quote
 
 
 
 
MGFoster
Guest
Posts: n/a
 
      25th Apr 2006
troy wrote:
> 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-----
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert a Number data type to a Text data type TKM Microsoft Access Queries 9 6th Nov 2008 09:59 PM
Convert a Number data type to Text using a query dfredriksson Microsoft Access Queries 3 31st Jul 2008 08:42 PM
Data Type Mismatch in Expression - can I force a query to read as a diferent data type? S Davis Microsoft Access Queries 1 7th Jun 2007 11:33 PM
Change Memo data type to Text data type DS Microsoft Access Getting Started 1 26th Jan 2005 04:56 PM
Re: Query which includes a column whose data type is memo type is crashing david epsom dot com dot au Microsoft Access 0 28th Aug 2003 10:44 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:52 PM.