SELECT TrendRemedytbl.[Job Name], Count(*) AS [Count]
FROM TrendRemedytbl
GROUP BY TrendRemedytbl.[Job Name];
This query generates a barchart with jobname in xaxis and counts in yaxis .
Can i also get the color of bar populated CORRECTLY based on if conditions within the query
I want something like what I have pasted below but the syntax is incorrect. Please help ...
SELECT iif TrendRemedytbl.[Job Name] = "A" THEN TrendRemedytbl.[Job Name] AS RED,iif TrendRemedytbl.[Job Name] = "B" THEN TrendRemedytbl.[Job Name] AS BLUE,iif TrendRemedytbl.[Job Name] = "C" THEN TrendRemedytbl.[Job Name] AS GREEN, Count(*) AS [Count]
FROM TrendRemedytbl
GROUP BY TrendRemedytbl.[Job Name];
I think you want this: -
SELECT Switch(TrendRemedytbl.[Job Name] = "A","Red",TrendRemedytbl.[Job Name] = "B","Blue",TrendRemedytbl.[Job Name] = "C","Green") As Job,Count(*) AS [Count]
-
FROM TrendRemedytbl
-
GROUP BY Switch(TrendRemedytbl.[Job Name] = "A","Red",TrendRemedytbl.[Job Name] = "B","Blue",TrendRemedytbl.[Job Name] = "C","Green")
-
1 1474
I think you want this: -
SELECT Switch(TrendRemedytbl.[Job Name] = "A","Red",TrendRemedytbl.[Job Name] = "B","Blue",TrendRemedytbl.[Job Name] = "C","Green") As Job,Count(*) AS [Count]
-
FROM TrendRemedytbl
-
GROUP BY Switch(TrendRemedytbl.[Job Name] = "A","Red",TrendRemedytbl.[Job Name] = "B","Blue",TrendRemedytbl.[Job Name] = "C","Green")
-
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Bhavin |
last post by:
How can I check NTFS permission and how to give the IUSR
account sufficient privileges to update the database
which is in MSACCESS. It's always give error operation
must use updatable query....
|
by: (Pete Cresswell) |
last post by:
I've got a .BAT file that I use for executing various MS Access apps that I
wrote way back in the days of 2.0.
It's evolved over time, but it still contains a number of possible paths to...
|
by: Pedro Maria Ferro da Cunha |
last post by:
I spend a lot of time making 2 thousand pictures and saving them as an
article name. jpg.
I have a table with the article name and name of the file in jpg (format).
How can I make an...
|
by: g_sharad |
last post by:
hi friends
I am facing problems generating a query from access database.
I have a form which fills all the records, validates and then send the
collected info to the db.
Now the problem part,...
|
by: rlayberry |
last post by:
Hi
I have found what looks like a huge bug in MSAccess.
When I have the following in a table in Access
1996 0.08715292
|
by: contiw |
last post by:
With ColdFusion and MSAccess 2003, the folowing query :
SELECT A.*, B.entry_id
FROM A.blog_entries, B.blog_subscriptions
WHERE B.blog_id = #variables.blog_id#
AND B.user_id =...
|
by: syampjt011170 |
last post by:
I need help to solve my problem's cummulative calculation.
here, i have table's data input :
station time rh
mlg 03/01/07 01:00 2
mlg 03/01/07...
|
by: cori25 |
last post by:
I have data that I want to import from access into excel, I need to be able to pull in the data so that it can be automated to appear in calendar format. The dates are in the db, so I want it to be...
|
by: eogyamfi |
last post by:
I have field called Datoutkd in my table, I need this field to rename date in the query. I used the replace function in order to create a new column with date as the field but could not work. ...
|
by: slickdock |
last post by:
I need to break my query into 3 groups:
First 60 records (records 1-60)
Next 60 records (records 61-121)
Next 60 records (records 122-182)
Of course I could use top values 60 for the first...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
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...
| |