tesleen2025
New Member
- Joined
- Nov 23, 2016
- Messages
- 13
Hi,
I have a table that I access through ODBC. I can not edit or modify this table in any way. This table has multiple order types. Some order types have a reference id back to another order type. I would like to get the actual order number for those reference id's. I hope this makes sense. Here is a sample of what I want to do.
I'm not sure what I need to do to get the results I'm looking for.
[TABLE="width: 630"]
<tbody>[TR]
[TD="colspan: 2"]Current Table[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Type[/TD]
[TD]OrderID[/TD]
[TD]OrderNumber[/TD]
[TD]Amount[/TD]
[TD]RefOrderID[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Invoice[/TD]
[TD]123456[/TD]
[TD]401-1234[/TD]
[TD]$$$[/TD]
[TD]89645[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Invoice[/TD]
[TD]123789[/TD]
[TD]401-1235[/TD]
[TD]$$$[/TD]
[TD]87658[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Repair[/TD]
[TD]89645[/TD]
[TD]401-6785[/TD]
[TD]$$$[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Repair[/TD]
[TD]87658[/TD]
[TD]401-6786[/TD]
[TD]$$$[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Warranty[/TD]
[TD]646803[/TD]
[TD]401-0033[/TD]
[TD]$$$[/TD]
[TD]89645[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Warranty[/TD]
[TD]646899[/TD]
[TD]401-0034[/TD]
[TD]$$$[/TD]
[TD]87658[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 3"]What I want my filtered Query to look like[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Type[/TD]
[TD]OrderID[/TD]
[TD]OrderNumber[/TD]
[TD]Amount[/TD]
[TD]RefOrderID[/TD]
[TD]RefOrderNumber[/TD]
[/TR]
[TR]
[TD]Warranty[/TD]
[TD]646803[/TD]
[TD]401-0033[/TD]
[TD]$$$[/TD]
[TD]89645[/TD]
[TD]401-6785[/TD]
[/TR]
[TR]
[TD]Warranty[/TD]
[TD]646899[/TD]
[TD]401-0034[/TD]
[TD]$$$[/TD]
[TD]87658[/TD]
[TD]401-6786[/TD]
[/TR]
</tbody>[/TABLE]
Respectfully,
TSmith
I have a table that I access through ODBC. I can not edit or modify this table in any way. This table has multiple order types. Some order types have a reference id back to another order type. I would like to get the actual order number for those reference id's. I hope this makes sense. Here is a sample of what I want to do.
I'm not sure what I need to do to get the results I'm looking for.
[TABLE="width: 630"]
<tbody>[TR]
[TD="colspan: 2"]Current Table[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Type[/TD]
[TD]OrderID[/TD]
[TD]OrderNumber[/TD]
[TD]Amount[/TD]
[TD]RefOrderID[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Invoice[/TD]
[TD]123456[/TD]
[TD]401-1234[/TD]
[TD]$$$[/TD]
[TD]89645[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Invoice[/TD]
[TD]123789[/TD]
[TD]401-1235[/TD]
[TD]$$$[/TD]
[TD]87658[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Repair[/TD]
[TD]89645[/TD]
[TD]401-6785[/TD]
[TD]$$$[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Repair[/TD]
[TD]87658[/TD]
[TD]401-6786[/TD]
[TD]$$$[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Warranty[/TD]
[TD]646803[/TD]
[TD]401-0033[/TD]
[TD]$$$[/TD]
[TD]89645[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Warranty[/TD]
[TD]646899[/TD]
[TD]401-0034[/TD]
[TD]$$$[/TD]
[TD]87658[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 3"]What I want my filtered Query to look like[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Type[/TD]
[TD]OrderID[/TD]
[TD]OrderNumber[/TD]
[TD]Amount[/TD]
[TD]RefOrderID[/TD]
[TD]RefOrderNumber[/TD]
[/TR]
[TR]
[TD]Warranty[/TD]
[TD]646803[/TD]
[TD]401-0033[/TD]
[TD]$$$[/TD]
[TD]89645[/TD]
[TD]401-6785[/TD]
[/TR]
[TR]
[TD]Warranty[/TD]
[TD]646899[/TD]
[TD]401-0034[/TD]
[TD]$$$[/TD]
[TD]87658[/TD]
[TD]401-6786[/TD]
[/TR]
</tbody>[/TABLE]
Respectfully,
TSmith