473,431 Members | 1,664 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,431 software developers and data experts.

Please explain how IIF Function works (was Access Help)

Can anyone tell me wht this expression does in ACCESS

IIf([Count]>1,([SumOfQty]-[Max])/([Count]-1),[Average]) AS ExcludeOutlierAvg

I Encountered this in a query

I do not Understand [COUNT], [Average] mean

Also in
[SumOfQty], SumOfQty is a field in the table I am trying to access.

Thanx in advance
Sep 1 '07 #1
2 2226
missinglinq
3,532 Expert 2GB
[Count], [SumOfQty], [Max] and [Average] are all field names.

The general syntax is IIf(expression, truepart, falsepart)
If the expression evaluates to True then you do/use the truepart
If the expression evaluates to Flase then you do/use the falsepart

IIf([Count]>1 means
If Count is greater than 1 then
[SumOfQty]-[Max]) / ([Count]-1) AS ExcludeOutlierAvg

If Count is equal to or less than 1 then
[Average] AS ExcludeOutlierAvg

Please remember to provide a meaningful Title for any threads you start! This helps to ensure that other members, and also the general public, will have a better chance of finding answers to any similar questions. It is difficult for the experts to answer questions when there is not enough details provided to understand the problem.

Please take the time to read the Posting Guidelines, paying particular attention to Give a clear title to your question.

Linq ;0)>
Sep 1 '07 #2
I am sorry abt the title .... but actually my q is more on database terms

my query is

Expand|Select|Wrap|Line Numbers
  1. SELECT BulkActivity_Max_Min_SubQuery_01.OrderDetail.Item AS Item, Count(BulkActivity_Max_Min_SubQuery_01.SumOfQty) AS [Count], Sum(BulkActivity_Max_Min_SubQuery_01.SumOfQty) AS SumOfQty, Max(BulkActivity_Max_Min_SubQuery_01.SumOfQty) AS [Max], Min(BulkActivity_Max_Min_SubQuery_01.SumOfQty) AS [Min], Avg(BulkActivity_Max_Min_SubQuery_01.SumOfQty) AS Average, Import_table_for_Planner.units_sold_per_day
  2. FROM BulkActivity_Max_Min_SubQuery_01 INNER JOIN Import_table_for_Planner ON BulkActivity_Max_Min_SubQuery_01.Item = Import_table_for_Planner.Item
  3. GROUP BY BulkActivity_Max_Min_SubQuery_01.OrderDetail.Item, Import_table_for_Planner.units_sold_per_day;
  4.  
check the part

Max(BulkActivity_Max_Min_SubQuery_01.SumOfQty) AS [Max]

is this like a array thing???

because there is a group by.

Could u explain this plz
Sep 1 '07 #3

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

Similar topics

2
by: Amanda | last post by:
From a guy in Microsoft newsgroups: | In *comp.databases.ibm-db2* there are always IBM guys | from the Toronto labs on line.Post with the | -for the love of god please help- | line...
9
by: hope | last post by:
Hi Access 97 I'm lost on this code please can you help ================================= Below is some simple code that will concatenate a single field's value from multiple records into a...
9
by: | last post by:
Hi All, I have allready tried to ask a similar question , but got no answer until now. In the meantime, I found, that I cannot understand some thread-settings for the Main() function . If I use...
1
by: Terrance | last post by:
Hello, I was wondering if someone can help me understand something. Below is some code that I got from the MS website that is suppose to authenticate for the username and password on the local...
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
0
by: Kermitus | last post by:
Hey I was hoping for a little help. I am a Domain reseller for Aplus.net. The problem is they really don't provide an API to automate Domain searches, registering etc... I see much potential in...
2
by: garyusenet | last post by:
I could do with something similiar, can you tell me if you think this would work for me, and if there's any advantage in working with controls this way than how I currently am. At the moment...
9
by: colin.mcnulty | last post by:
Hi, I'm a SQL Server DBA, but I guess that won't buy me any friends round here huh? ;-) I've been asked to look at the SQL that's being executed on a DB2 database from a web app, specifically...
5
by: =?Utf-8?B?TWljaGFlbA==?= | last post by:
Hello, I am in serious need of help. I have an ASP.NET application written in C#. I have a page that processes a file on the web server. The page uses a class I created and stored in the AppCode...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
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...

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.