Hello,
I'm making a query to grab the latest B record for each A record that is before the A record date. (I hope that makes sense)
And I have no idea how to do it! Please help!
My Final view will be
AID, AData, ADate, BData
Rough table schema
table A
(
AID,
ADate,
AData
)
table B
(
BID,
AID,
BDate,
BData
)
Things to note are:
- Table A is in SQL DB
- Table B is from link server to Oracle
- Table B is super gigantic
Thanks!