Format Database results

G

Guest

I am using an Access database with a table field type selected as a Yes/No.
When the results using DIW are brought out to an asp the Yes/No shows as
"True" or "False". Can I make the asp show as "Yes" "No" Thanks.
 
G

Guest

Hi Kathleen, still struggling with this one Im afraid. This is the existing
SQL statement in the asp
SELECT * FROM hiremodels WHERE (adults >= ::adults:: AND children >=
::children:: AND suitcases >= ::suitcases:: AND golfer <= ::golfer:: AND
Auto <= ::Auto:: AND aircon <= ::aircon::) ORDER BY pricestandardeuros ASC
So far so good except the aircon field shows "True" (same applies to the
fields "golfer" & "Auto")

Ive tried adding to the statement so if the car has aircon it shows "yes"
but I think my syntax is wrong.

SELECT * FROM hiremodels WHERE (adults >= ::adults:: AND children >=
::children:: AND suitcases >= ::suitcases:: AND golfer <= ::golfer:: AND
Auto <= ::Auto:: AND aircon <= ::aircon::) iif(aircon = true, 'yes',
'no'),ORDER BY pricestandardeuros ASC

Can you help a little more please
Thanks Mick
 
K

Kathleen Anderson [MVP - FrontPage]

Hi Mick:
Try this:

SELECT *,iif(aircon = true, 'yes', 'no') AS newaircon FROM hiremodels WHERE
(adults >= ::adults:: AND children >= ::children:: AND suitcases >=
::suitcases:: AND golfer <= ::golfer:: AND Auto <= ::Auto:: AND aircon <=
::aircon::) ORDER BY pricestandardeuros ASC


--

~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
web: http://www.spiderwebwoman.com/resources/
Please reply to the newsgroup for the benefit of others.
 
G

Guest

Hi Kathleen, absolutely spot on first time, thank you so much for your time
and help. Kind regards Mick
 

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