Format Database results

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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
 
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.
 
Hi Kathleen, absolutely spot on first time, thank you so much for your time
and help. Kind regards Mick
 
Back
Top