RE: sub category nulls in a report?
- From: "KARL DEWEY" <KARLDEWEY@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 5 Aug 2005 12:44:03 -0700
Ok, this allows your nulls to come through. If there is a criteria for a
field, even when using Like [Xxxx] & "*" and the field is null you must add
Or Is Null.
It also has your field labels pretty.
SELECT queryfromtesttable.ClientName AS [Client Name],
queryfromtesttable.CollectedDate AS [Collected Date],
queryfromtesttable.location, queryfromtesttable.sample_number AS [Sample
Number], queryfromtesttable.TestType AS [Test Type],
queryfromtesttable.KitReturned AS [Kit Returned],
queryfromtesttable.DateofTest AS [Date of Test],
queryfromtesttable.testresult AS [Test Result],
queryfromtesttable.Averagetestresult AS [Average test result],
queryfromtesttable.sample_Tempertature AS [Sample Tempertature]
FROM queryfromtesttable
WHERE (((queryfromtesttable.ClientName) Like [Enter client name] & "*" Or
(queryfromtesttable.ClientName) Is Null) AND
((queryfromtesttable.CollectedDate)>=[Beginning Date] And
(queryfromtesttable.CollectedDate)<=[Ending Date]) AND
((queryfromtesttable.TestType) Like [Test type sought] & "*" Or
(queryfromtesttable.TestType) Is Null));
"Joshua K Briley" wrote:
> I've changed the names of some of the fields so they would make sense to the
> reader. The spelling of the field names can be overlooked. Can this be
> rewritten as to show the location, even though there are no corresponding
> test results? Or is that something that needs to be handled in the report
> itself?
> --
> Somecallmejosh
>
>
> "KARL DEWEY" wrote:
>
> > You had typos. Field names must match exactly. One missing opening [.
> >
> > SELECT queryfromtesttable.ClientName, queryfromtesttable.CollectedDate,
> > queryfromtesttable.location, queryfromtesttable.sample_number,
> > queryfromtesttable.TestType, queryfromtesttable.KitReturned,
> > queryfromtesttable.DateofTest, queryfromtesttable.testresult,
> > queryfromtesttable.Averagetestresult, queryfromtesttable.sample_Tempertature
> > FROM queryfromtesttable
> > WHERE (((queryfromtesttable.ClientName) Like [Enter client name] & "*") AND
> > ((queryfromtesttable.CollectedDate)>=[Beginning Date] And
> > (queryfromtesttable.CollectedDate)<=[Ending Date]) AND
> > ((queryfromtesttable.TestType) Like [Test type sought] & "*"));
> >
> >
> > "Joshua K Briley" wrote:
> >
> > > SELECT [Client Name],
> > > [location],
> > > [Collected Date],
> > > [sample_number],
> > > [Test Type],
> > > [Kit Returned],
> > > [Date of Test],
> > > [testresult],
> > > [Averagetestresult],
> > > [sample_Tempertature]
> > >
> > >
> > > FROM [queryfromtesttable]
> > >
> > > WHERE ((([queryfromtesttable].[Client Name]) Like "clientname*")
> > > AND (([queryfromtesttable].[Collected Date])>=[Beginning Date]
> > > And ([queryfromtesttable].[Collected Date])<=[Ending Date])
> > > AND (([queryfromtesttable].[Test Type]) Like "test type sought"
> > > Or([queryfromtesttable].Test Type]) Like "different test type sought"));
> > >
> > > --
> > > Somecallmejosh
> > >
> > >
> > > "KARL DEWEY" wrote:
> > >
> > > > Post your query.
> > > >
> > > > "Joshua K Briley" wrote:
> > > >
> > > > > I have a report that includes [test_results] which are subcategorized by
> > > > > client [location]. I'd like the report to show the [location], even if there
> > > > > are no [test_results] recorded for that [location]. The query supporting the
> > > > > report is based on a date range in which the test was conducted.
> > > > >
> > > > > I hope I've given enough information for this to make sense. Is it possible
> > > > > to pull in these [locations] without [test_results]? Any advice will be
> > > > > greatly appreciated.
> > > > > --
> > > > > Somecallmejosh
.
- Follow-Ups:
- RE: sub category nulls in a report?
- From: Joshua K Briley
- RE: sub category nulls in a report?
- References:
- sub category nulls in a report?
- From: Joshua K Briley
- RE: sub category nulls in a report?
- From: KARL DEWEY
- RE: sub category nulls in a report?
- From: Joshua K Briley
- RE: sub category nulls in a report?
- From: KARL DEWEY
- RE: sub category nulls in a report?
- From: Joshua K Briley
- sub category nulls in a report?
- Prev by Date: Re: Ranking formular in Access?
- Next by Date: Total transactions by month
- Previous by thread: RE: sub category nulls in a report?
- Next by thread: RE: sub category nulls in a report?
- Index(es):