473,395 Members | 1,516 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,395 software developers and data experts.

Query Help

The end goal to this project is a system to track employee appraisals from when they are turned in, until they are coded into our computers.
I have two tables; tbl2009 has all of the employee data; name, SNN, etc. TblStatus has the current and past actions with the date/time that it was entered as that particular status... received, sent back, ready to code, coded etc.

I have my simple qry to determines if something is coded already, not a problem there. What I need is to create a qry for my records folks to determine when something is ready for coding. The problem I am running into is that when I qry for ="Ready To Code" I get the "Coded" as well. How do I query by social (SSN) for Action to equal "Ready To Code" and not "Coded" if the structure of the table looks like this:

SSN Action Date
111-11-1111 Received Jan 01, 2010 06:00am
111-11-1111 Ready To Code Jan 01, 2010 06:30am
111-11-1111 Coded Jan 01, 2010 07:00am
111-11-1111 Received Jan 01, 2010 06:00am
111-11-1111 Sent Back Jan 01, 2010 06:30am
111-11-1111 Received Jan 01, 2010 07:00am

I know I need to to separate the socials, look for "Ready To Code" look for "Coded" and ignore anything that does not say "Ready to Code" or if it does have "Ready To Code" I need to to ensure there is no "Coded" action associated with that SSN.

I still have time to get this done so if someone wants to point me in the right direction as opposed to doing the work for me, that is ok as well.
Sep 21 '09 #1
4 1093
ajalwaysus
266 Expert 100+
You may need to post your query that you are using now, because I at least cannot determine your issue without seeing the code.

-AJ
Sep 21 '09 #2
There is no code right now. For my other query, do determine if something has been coded already, I simply used the designer within Access to look for Social Security Numbers that have a record with a "Coded" action.

"Coded" is my final action indication everything is complete. "Ready to Code is before that" and there are several others before that.

Assuming there are multiple entries in the table for each Social security number, each entry with its own action, (I did this because it was the only way I knew how to create a historical record of when the different actions occured)I need to find only those with "Ready for Coding" and not "Coding" but only return one entry per Social. If I do the query just looking for <> "Coded" I get all entries for that social that came before coded, "Received", "Entered","Ready for Coding", etc. So now I have 5 records for each name.

I am thinking now that it would be easy to do two queries...one to find <> "Coded" and another to find ="Ready for Coding" to create that report from.
Sep 21 '09 #3
NeoPa
32,556 Expert Mod 16PB
@IntelSldr
I tend to agree. We don't know why you're having an issue as we cannot see the query you say you've tested.

An easy way of posting queries is simply to post the SQL (View / SQL) of your query. If we can see this we may be able to help you and guide you to a workable way of achieving what you require.

Please remember when posting any code (including SQL) that we require you to use the CODE tags provided.
Sep 21 '09 #4
ADezii
8,834 Expert 8TB
@IntelSldr
Try:
Expand|Select|Wrap|Line Numbers
  1. SELECT *
  2. FROM tblStatus
  3. WHERE tblStatus.Action="Ready To Code" And DCount("*", "tblStatus", "[Action] = 'Coded' and tblStatus.[SSN]=[SSN]") =0;
Sep 21 '09 #5

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

Similar topics

9
by: netpurpose | last post by:
I need to extract data from this table to find the lowest prices of each product as of today. The product will be listed/grouped by the name only, discarding the product code - I use...
7
by: Simon Bailey | last post by:
How do you created a query in VB? I have a button on a form that signifies a certain computer in a computer suite. On clicking on this button i would like to create a query searching for all...
4
by: d.p. | last post by:
Hi all, I'm using MS Access 2003. Bare with me on this description....here's the situation: Imagine insurance, and working out premiums for different insured properties. The rates for calculating...
4
by: Alan Lane | last post by:
Hello world: I'm including both code and examples of query output. I appologize if that makes this message longer than it should be. Anyway, I need to change the query below into a pivot table...
36
by: Liam.M | last post by:
hey guys, I have one last problem to fix, and then my database is essentially done...I would therefore very much appreciate any assistance anyone would be able to provide me with. Currently I...
5
by: elitecodex | last post by:
Hey everyone. I have this query select * from `TableName` where `SomeIDField` 0 I can open a mysql command prompt and execute this command with no issues. However, Im trying to issue the...
10
by: aaronrm | last post by:
I have a real simple cross-tab query that I am trying to sum on as the action but I am getting the "data type mismatch criteria expression" error. About three queries up the food chain from this...
11
by: funky | last post by:
hello, I've got a big problem ad i'm not able to resolve it. We have a server running oracle 10g version 10.1.0. We usually use access as front end and connect database tables for data extraction....
4
by: Doris | last post by:
It does not look like my message is posting....if this is a 2nd or 3rd message, please forgive me as I really don't know how this site works. I want to apologize ahead of time for being a novice...
6
by: jsacrey | last post by:
Hey everybody, got a secnario for ya that I need a bit of help with. Access 97 using linked tables from an SQL Server 2000 machine. I've created a simple query using two tables joined by one...
0
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
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...
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:
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...
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...
0
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
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...

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.