I need to find the first occurance of something.

Carrie

Active Member
Joined
Nov 20, 2002
Messages
418
I need to find what time the first occurance of an outbound event occured.

Currently I have...

SELECT Call.OpenDate, Call.Call_Num
FROM Call
WHERE (((Call.OpenDate)>=[Start Date] And (Call.OpenDate)<=[End Date]));

I need to find out who opened the call and the Time (which opendate shows the time as well as the date). I need to know who made the first contact with the customer after the call was opened. And what time they made it.

The outcome is to find how long it took person A to call back the customer.

I will know that the customer was called back because the tech (person A) will need to comment the call and put the direction of the call.

Commenting the call is called an Event and the direction is either inbound or outbound. I need the first outbound event after the call was opened.

The tabe that the event stuff comes out of is called.

Table Event
Record contactdirection.

Please help.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Sounds like you need a nested query. See if you can adapt this to your needs.

SELECT T_sales.client, T_sales.sale_d
FROM (
SELECT Min(T_sales.sale_d) AS Minimum
FROM T_sales ) AS mini
INNER JOIN
T_sales
ON
mini.Minimum = T_sales.sale_d
 
Upvote 0
SELECT T_sales.client, T_sales.sale_d
FROM (
SELECT Min(T_sales.sale_d) AS Minimum
FROM T_sales ) AS mini
INNER JOIN
T_sales
ON
mini.Minimum = T_sales.sale_d

That sounds great except what does this mean.

I appologize that I don't understand but I am learning access by doing and I have no idea what a nested querey is or how to use one. :oops:

Could you please help a little more?
 
Upvote 0
When you select to view a query you have 3 choices, table, design and SQL. The text in the responses to your question are in SQL.
 
Upvote 0
I appreciate your help...

I knew about the SQL view but what I don't understand is what the words mean.

I don't understand how you know when to use SELECT, WHERE, WHEN, WHY AND HOW.

I know those aren't really the right words but that would just show you how much I know. :oops:

I looked on the help and it doesn't really explain why you use them and when. I think this is the key to my understanding. I think if I can understand them then I could understand a lot more of everything.

Thanks for replying.
 
Upvote 0
You can build a query, then from Views menu select totals. The totals gives you several options one of which is First. This may help,
Then if you select SQL it will show you where access uses the Where When and all that other sql stuff, I have to admit I am a SQL wimp and even if I use SQL code I still let access build it for me.

Hope this isn't even more confusing :p
 
Upvote 0

Forum statistics

Threads
1,221,573
Messages
6,160,591
Members
451,657
Latest member
Ang24

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top