Link to home
Start Free TrialLog in
Avatar of SteveL13
SteveL13Flag for United States of America

asked on

How format result in a SQL query

I have this in a query design (SQL view) for a listbox:

Format(tblPrintOrdDistribution.PrintOrdDetailComplete) AS Complete

Which is fine.  The name of the column is "Complete" which is what I want.  But the result is showing -1 and I want it to be Yes or No.  

What do I do with the syntax to make that happen?

--Steve
Avatar of Kyle Abrahams, PMP
Kyle Abrahams, PMP
Flag of United States of America image

is PrintOrdDetailComplete an integer?

can you do Format(case when PrintOrdDetailComplete = -1 then 'No' else 'Yes' end)  AS Complete
If possible use case when x = -1 then no else yes end as complete
ASKER CERTIFIED SOLUTION
Avatar of Norie
Norie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Nothing with the syntax...

- Select the column in the query designer
- Right-click and select "Properties"

You can set the format of your Boolean field to Y/N here.
Here's a screenshot from the query builder:

User generated image