You are here: Re: SQL in Access Report « MsSQL Server « IT news, forums, messages
Re: SQL in Access Report

Posted by MGFoster on 04/26/06 05:24

ApexData@gmail.com wrote:
> Thanks for the response.
>
> I took your advice and tried the following code:
>
> SELECT IIf([RPR]=True,"RPR",
> IIf([MNT]=True,"MNT",
> IIf([BAT]=True,"BAT","Unknown"))) AS GroupByThis,
> [RPR],
> [BAT],
> [MNT],
> *
> FROM [T-SERVICE];
>
> The repairs have grouped just fine, but the battery and maint will only
> group with records that are not already displayed in the repairs group.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You may have to go back to your original UNION query, with the addition
of a GroupByThis column. E.g.:

SELECT "RPR" As GroupByThis, *
FROM [T-Service]
WHERE [RPR] = True
UNION
SELECT "BAT" As GroupByThis, *
FROM [T-Service]
WHERE [BAT] = True
UNION
SELECT "MNT" As GroupByThis, *
FROM [T-Service]
WHERE [MNT] = True
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBRE7ZwIechKqOuFEgEQKwrwCg4/+EDv8jV+47+CAGLaCoH/WDcCMAni3n
Dx9Xa1Cla3dw3zNvYjxuoxXA
=45Cm
-----END PGP SIGNATURE-----

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация