G
Guest
I am wondering if you can run an inner join just using one table. I can
explain why I would want to do this and perhaps there could be a simpler way.
I have four fields in my table (TrackID, ShipID, Date, Status)
I need to query the earliest Date and obtain the ShipID. There will always
be a TrackID, however, if the Status is a specific value (38), there will be
no ShipID, but I still need that date. If a Status of 38 were to exist, it
would always be the earliest date. If the Status is anything else, there will
be a ShipID and no problem.
So what I wanted to do is query the TrackID and Date and do an inner join
with TrackID and ShipID. Each TrackID will have an unique ShipID regardless
of how many different status codes there are which would produce duplicates.
Is this achieveable or even an easier way to do this?
Any input will be greatly appreciated. Thanks ahead of time!
explain why I would want to do this and perhaps there could be a simpler way.
I have four fields in my table (TrackID, ShipID, Date, Status)
I need to query the earliest Date and obtain the ShipID. There will always
be a TrackID, however, if the Status is a specific value (38), there will be
no ShipID, but I still need that date. If a Status of 38 were to exist, it
would always be the earliest date. If the Status is anything else, there will
be a ShipID and no problem.
So what I wanted to do is query the TrackID and Date and do an inner join
with TrackID and ShipID. Each TrackID will have an unique ShipID regardless
of how many different status codes there are which would produce duplicates.
Is this achieveable or even an easier way to do this?
Any input will be greatly appreciated. Thanks ahead of time!