Copy of same table and get the records

Waqas ali

Board Regular
Joined
Nov 6, 2010
Messages
163
dear all,

i have a table with date and time in single column from that column i got min date&time and max date&time against each jobid.

now in same table there are more entries in between min and max date&time range i want to retrieve if it exist in between min and max date&time range.

how to write a sub query i put alias for min as startjob and max as endjob but sub query is not accepting these alias in itself.
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Always post code or sql that you tried. You could be 99% there but are asking someone to start from scratch. See 'tips' below. You might need a second query that uses the first as a data source to provide the dates (you say you got min and max date&time already) and a field in the second query gets all the records that span those dates. If you use the BETWEEN operator in your second query, there is a not so well known issue about how it handles date fields that also have time. Might be best to use >= and <=.
 
Upvote 0

Forum statistics

Threads
1,221,825
Messages
6,162,165
Members
451,750
Latest member
dofrancis

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