473,659 Members | 3,117 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

exe a query that does not inc the specified expresion as part of an aggregate functio

1 New Member
I'm stress out here, I know its simple but I cant seem to get to work. I hope any body would help me.

I have two query:
QProgress_FM
Fullname
School_ID
Visit Date
Cluster Number
School Progress %
S Curve Forecast %

and QProgressCDC_MO NE
School ID
CDC Report Date
Cluster Number
School Progress %
S Curve Forecast %

Each month the CDC sends us 2 report the first and the last week of each month. I'm trying to count the Date Variance between the FM Visit Date and CDC Report Date. With the criteria that if the FM visit < 15 it would count the variance on the first week of the month from the CDC.
the sql i'm using is
Expand|Select|Wrap|Line Numbers
  1. SELECT QProgress_FM.[Visit Date], 
  2.        QProgress_FM.Fullname, 
  3.        QProgress_FM.[School ID], 
  4.        QProgress_FM.[School Progress %], 
  5.        IIf("d",[Visit Date]>15,Max([CDC Report Date])) AS DateVar1, 
  6.        QProgressCDC_MONE.[School Progress %], 
  7.        QProgressCDC_MONE.[S Curve Forecast %], 
  8.        [Visit Date]-[QProgressCDC_MONE]![CDC Report Date] AS DateVar 
  9.  
  10. FROM   QProgress_FM INNER JOIN QProgressCDC_MONE 
  11.  
  12. ON     QProgress_FM.[School ID] = QProgressCDC_MONE.School_ID; 
Nov 20 '08 #1
0 970

Sign in to post your reply or Sign up for a free account.

Similar topics

20
10133
by: | last post by:
If I need to check if a certain value does exist in a field, and return either "yes" or "not" which query would be the most effestive?
14
9286
by: Bob | last post by:
Hi there, Need a little help with a certain query that's causing a lot of acid in my stomach... Have a table that stores sales measures for a given client. The sales measures are stored per year and there could be multiple sales measures every year per client. There is another field called last update date. If there are multiple sales measures then need to select the one that's been entered last based on this field. Also, if there
5
3710
by: John | last post by:
I need help understanding how to get a query to lookup an employee's sales (tblSales) and calculate and expression (Commission) based on a CommissionRate (tblCommissionSchedule) that corresponds to that employee's sales. table (example record): tblSales --------------- 1.lngEmployeeID (1) curSales ($20,000)
5
6057
by: Jim | last post by:
Need help with aggregate function...for each unique product, I need the provider with the cheapest cost factor Here't the table (Table1) ID product provider factor 1 123456 abc .050 2 123456 def .035 3 666666 def .040 4 123456 ghi .080
5
1757
by: Otie | last post by:
I have a select query that groups records together, specifically baseball players and their home runs and at-bats. I want to create a query that displays , , and and that sorts ASCENDING on the field. My field is: AB_per_HR: / If I set the SORT to Ascending, I get an error message saying I tried
2
2225
by: Jimmy Stewart | last post by:
Ok, I'm trying to write a query that is starting to wear me down. What I'm trying to do is create a year end report that gets sent to all of my customers who meet two criteria. One they are 'Residential' customer AND they have had business with us during this past year. My report is based on a query. The query has two tables associated with it. One is tblClients which provides client name, account type and the other relevant mailing...
3
12459
by: ncsthbell | last post by:
I am pulling my hair out on this! Seems like it should be easy, I just can not get it to work like I want. I know I am doing something wrong, so I hope someone can be so kind to guide me!!! I have 2 tables: Table1 - columns: Period FuelType Table2 - columns: Period
11
1835
by: Stan | last post by:
I am using MS Office Access 2003 (11.5614). I have been running the following query with good results. The query lets me enter the month period and returns the SUM of the age fields. SELECT AS , SUM() AS , SUM() AS , SUM() AS , SUM() AS FROM WHERE FORMAT(,"mm/yyyy")=; I now want to add an additional criteria of the city field. I added
1
916
by: phill86 | last post by:
Hi, I have a select query that works out the difference between a start and an end time using datediff as follows SELECT T_ActiveSession.SessionID, T_ActiveSession.ProjID, T_ActiveSession.StartTime, T_ActiveSession.EndTime, T_ActiveSession.SessTypeID, DateDiff("n",,) AS Expr1 FROM T_ActiveSession GROUP BY T_ActiveSession.SessionID, T_ActiveSession.ProjID, T_ActiveSession.StartTime, T_ActiveSession.EndTime, T_ActiveSession.SessTypeID...
0
8428
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8627
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7356
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6179
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4335
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2752
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1976
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1737
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.