Convert -1 or 0 to Y or N in append query

T

troy

I am trying to convert the -1 or 0 in a field I call attachment into a Y or N
field in another table as an append query. The data in the other table
(target table) is set up as a TEXT field Y or N as the data. What is the
expression I can put in my query under my "Attachment" field that is set up
as a Y/N datatype to append to a table that is set up as a TEXT filed with Y
or N as the data.
Thank you for your help. I dot think I made myself clear enough on my last
post?
 
T

troy

I get a error stating that the specified tbl could refer to more than one
table listed in my SQL statement.

KARL DEWEY said:
Text Results: IIF([YourLogicField]=-1,"Y","N")

troy said:
I am trying to convert the -1 or 0 in a field I call attachment into a Y or N
field in another table as an append query. The data in the other table
(target table) is set up as a TEXT field Y or N as the data. What is the
expression I can put in my query under my "Attachment" field that is set up
as a Y/N datatype to append to a table that is set up as a TEXT filed with Y
or N as the data.
Thank you for your help. I dot think I made myself clear enough on my last
post?
 
T

troy

I used this SQL statement and it almost works but does not return the "T" it
only returns the "n". Any idea on how to help?

Thank you

troy said:
I get a error stating that the specified tbl could refer to more than one
table listed in my SQL statement.

KARL DEWEY said:
Text Results: IIF([YourLogicField]=-1,"Y","N")

troy said:
I am trying to convert the -1 or 0 in a field I call attachment into a Y or N
field in another table as an append query. The data in the other table
(target table) is set up as a TEXT field Y or N as the data. What is the
expression I can put in my query under my "Attachment" field that is set up
as a Y/N datatype to append to a table that is set up as a TEXT filed with Y
or N as the data.
Thank you for your help. I dot think I made myself clear enough on my last
post?
 
T

Tom Ellison

Dear Troy:

I missed that you had said the column name is "attachment" so I'll fill that
in:

IIf(attachment, "Y", "N")

Now, perhaps you must specify which table it is in. And perhaps it is text,
not numeric, so a rather complete syntax would be:

IIf(CInt([Table Name].attachment), "Y", "N")

You must substitute the Table Name above.

Is this any better?

Tom Ellison
 
K

KARL DEWEY

Text Results: IIF([YourTableName].[YourLogicField]=-1,"Y","N")


troy said:
I get a error stating that the specified tbl could refer to more than one
table listed in my SQL statement.

KARL DEWEY said:
Text Results: IIF([YourLogicField]=-1,"Y","N")

troy said:
I am trying to convert the -1 or 0 in a field I call attachment into a Y or N
field in another table as an append query. The data in the other table
(target table) is set up as a TEXT field Y or N as the data. What is the
expression I can put in my query under my "Attachment" field that is set up
as a Y/N datatype to append to a table that is set up as a TEXT filed with Y
or N as the data.
Thank you for your help. I dot think I made myself clear enough on my last
post?
 
K

KARL DEWEY

but does not return the "T" it only returns the "n". Any idea on how to help?
You lost me on this post. Where does the "T" come from?

Post your SQL statement.

troy said:
I used this SQL statement and it almost works but does not return the "T" it
only returns the "n". Any idea on how to help?

Thank you

troy said:
I get a error stating that the specified tbl could refer to more than one
table listed in my SQL statement.

KARL DEWEY said:
Text Results: IIF([YourLogicField]=-1,"Y","N")

:

I am trying to convert the -1 or 0 in a field I call attachment into a Y or N
field in another table as an append query. The data in the other table
(target table) is set up as a TEXT field Y or N as the data. What is the
expression I can put in my query under my "Attachment" field that is set up
as a Y/N datatype to append to a table that is set up as a TEXT filed with Y
or N as the data.
Thank you for your help. I dot think I made myself clear enough on my last
post?
 

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