Right now I am working in Power BI Desktop but I can see a scenario where I may need to use these tables in Power Query in Excel.
The data is in a MySQL database that is linked and pulls data properly.
I have a couple of cases where I have to pull data from multiple tables where the ON statement in MySQL would look something like
I need to ultimately transform the data to pull the table2.ID field and add it to table 1 for further use.
I've tried to unpivot Start and End but only some records match. I considered trying to temporarily add enough records to match every number between start and end for every record, but I don't know how to do that either and I must not be searching the correct terms or it is not possible.
Table 2 has less than 10 records. A record for start Start could be something like 24 and End 177 (all numeric) or 355 and 827 respectively.
Is there a way to accomplish this? Any help is appreciated. TIA rasinc.
The data is in a MySQL database that is linked and pulls data properly.
I have a couple of cases where I have to pull data from multiple tables where the ON statement in MySQL would look something like
SQL:
ON (`table1`.`ID` >= `table2`.`Start`) AND (`table1`.`ID` <= `table2`.`End`)
I need to ultimately transform the data to pull the table2.ID field and add it to table 1 for further use.
I've tried to unpivot Start and End but only some records match. I considered trying to temporarily add enough records to match every number between start and end for every record, but I don't know how to do that either and I must not be searching the correct terms or it is not possible.
Table 2 has less than 10 records. A record for start Start could be something like 24 and End 177 (all numeric) or 355 and 827 respectively.
Is there a way to accomplish this? Any help is appreciated. TIA rasinc.