Re: Need Meaning of Make-Table Query Code

Tech-Archive recommends: Speed Up your PC by fixing your registry



The SQL is:
SELECT Q_GenericpullKiKPrePostData.Date AS Expr1,
Q_GenericpullKiKPrePostData.Host AS Expr2, Q_GenericpullKiKPrePostData.Name
AS Expr3, Q_GenericpullKiKPrePostData.PrePost AS Expr4,
(Q_GenericpullKiKPrePostData![4]+Q_GenericpullKiKPrePostData![5])*-1 AS BC
INTO PrePostMilk
FROM Q_GenericpullKiKPrePostData;

and the SQL for Q_GenericpullKiKPrePostData is:

SELECT tblOldKIKPrePostTest.dtmDate AS [Date],
tblSessAttendance.chrPgmHostName AS Host, tblOldKIKPrePostTest.chrSessNbr AS
Sess, tblOldKIKPrePostTest.chrParticiName AS Name, tblOldKIKPrePostTest.bln1a
AS bln1a, tblOldKIKPrePostTest.bln1b AS bln1b, tblOldKIKPrePostTest.bln1c AS
bln1c, tblOldKIKPrePostTest.bln1d AS bln1d, tblOldKIKPrePostTest.bln1e AS
bln1e, tblOldKIKPrePostTest.bln2 AS bln2, tblOldKIKPrePostTest.bln3 AS bln3,
tblOldKIKPrePostTest.bln4 AS bln4, tblOldKIKPrePostTest.bln5 AS bln5,
tblOldKIKPrePostTest.bln6 AS bln6, tblOldKIKPrePostTest.bln7a AS bln7a,
tblOldKIKPrePostTest.chrQues8Comments AS Ques8Comments,
tblOldKIKPrePostTest.chrPrePost AS PrePost, tblOldKIKPrePostTest.bln7b AS
bln7b, tblOldKIKPrePostTest.bln7c AS bln7c, tblOldKIKPrePostTest.bln7d AS
bln7d, tblOldKIKPrePostTest.chrComments AS Comments
FROM tblOldKIKPrePostTest INNER JOIN tblSessAttendance ON
(tblOldKIKPrePostTest.chrSessNbr = tblSessAttendance.chrSessNbr) AND
(tblOldKIKPrePostTest.chrParticiName = tblSessAttendance.chrParticiName)
GROUP BY tblOldKIKPrePostTest.dtmDate, tblSessAttendance.chrPgmHostName,
tblOldKIKPrePostTest.chrSessNbr, tblOldKIKPrePostTest.chrParticiName,
tblOldKIKPrePostTest.bln1a, tblOldKIKPrePostTest.bln1b,
tblOldKIKPrePostTest.bln1c, tblOldKIKPrePostTest.bln1d,
tblOldKIKPrePostTest.bln1e, tblOldKIKPrePostTest.bln2,
tblOldKIKPrePostTest.bln3, tblOldKIKPrePostTest.bln4,
tblOldKIKPrePostTest.bln5, tblOldKIKPrePostTest.bln6,
tblOldKIKPrePostTest.bln7a, tblOldKIKPrePostTest.chrQues8Comments,
tblOldKIKPrePostTest.chrPrePost, tblOldKIKPrePostTest.bln7b,
tblOldKIKPrePostTest.bln7c, tblOldKIKPrePostTest.bln7d,
tblOldKIKPrePostTest.chrComments
HAVING (((tblOldKIKPrePostTest.dtmDate) Between
[Forms]![frmReportsPage]![txtStartDate] And
[Forms]![frmReportsPage]![txtStopDate]));

I am inclined to believe it is the fifth and sixth fields added together and
multiplied by -1. Since the fields are boolean, the checked value is -1, so
two added together would be -2 if both were checked, times -1 would make it a
value of 2.
--
Trying To Feed The Hungry


"John Spencer" wrote:

As a guess they are referrng to fields named 4 and 5 in a query named
Q_GenericpullKiKPrePostData. The other possibility is that this is
referring to the 5th and 6th field in the query.

If you could post the entire SQL for the make table query and
Q_GenericpullKiKPrePostData it might be easier to decipher.

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

"EarlCPhillips" <EarlCPhillips@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:A00B3C4D-D0F3-4581-BB73-36D5C7C3455F@xxxxxxxxxxxxxxxx
I have taken over an old Nutrition Services tracking system developed by
someone else. One of the old Make-Table queries has code for a field as
follows:

BC: (Q_GenericpullKiKPrePostData![4]+Q_GenericpullKiKPrePostData![5])*-1

where Q_GenericpullKiKPrePostData is a query extracting data from files of
test data recorded for the "Kids in the Kitchen" program Pre or Post test
results to teach nutrition and cooking skills to young disadvantaged kids.

The file contains: ID, SessNbr, Name, bln1a (boolean answer to question
1a),
bln1b, bln1c, bln1d, bln1e, bln2, bln3, bln4, bln5, bln6, bln7a, bln7b,
bln7c, bln7d, Comments, PrePost (whether it is a "pre" or "post" class
test),
Date.

The query it is drawing from has the following field order: Date, Host
(org.
that sponsored class), Session, Name, bln1a, bln1b, bln1c, bln1d, bln1e,
bln2, bln3, bln4, bln5, bln6, bln7a, Ques8Comments, PrePost, bln7b, bln7c,
bln7d, Comments.

The objective is to measure progress (BC or Behavior Change) in nutrition
knowledge to justify grant money for future programs.

What does the construct "Q_GenericpullKiIPrePostData![4]" or
"Q_GenericpullKiIPrePostData![5]" refer to? What would be the expected
value
in BC?

EarlCPhillips
Ex-Mainframer Learning Access To Help
Harvesters Food Network feed more
hungry people with the same staff
--------
Trying To Feed The Hungry



.



Relevant Pages

  • Re: DBMS and lisp, etc.
    ... Naively implemented with SQL, again for 10 ... (1 query for the initial orders, 1 query for each order for its ... soon as you upgrade to the SQL database. ... (eq (order-customer orderA) ...
    (comp.lang.lisp)
  • Re: Populating a list -- table structure?
    ... I had made a report already and figured out about adding the ... your responce below, but thanks to your help with SQL, I was able to get the ... It takes a summary from a select query and gives the ... KitID, long integer ...
    (microsoft.public.access.forms)
  • How do I do Paging through a large dataset via Stored Procedures
    ... Paging by dynamically altering the SQL Query ... Create stored procedures ... SELECT * FROM STUDENTS ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Populating a list -- learning Access
    ... It is kinda funny -- I started using databases in the early 80's with dBase and, for years, never knew that I knew SQL! ... If you are on a form or report, the most important property is the NAME, because that is how you refer to it in code. ... I don't mean to skip your responce below, but thanks to your help with SQL, I was able to get the query to pull the info the way I needed. ... Queries (just shows the QBE grid for convenience -- ...
    (microsoft.public.access.forms)
  • Re: Populating a list -- table structure?
    ... I don't mean to skip your responce below, but thanks to your help with SQL, I was able to get the query to pull the info the way I needed. ... I have one report complete, ... Queries (just shows the QBE grid for convenience -- ...
    (microsoft.public.access.forms)