Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I try to use Load Inline (shows as below) to create the customized sort value of "Report Type" in table B.
However, I want to connect table B with another table A with "Case ID" as the primary key. I also want to add data field "Case Date" in table B.
My question is can I add "Case ID" and "Case Date" in table B? If so, where I should place them?
It shows error if I do this:
Load
Case ID,
Case Date
Inline [
Report Type
Spontaneous
Report from Study
Others
];
Thanks in advance,
Becky
If you want to set a specific load order for Report Type to determine the sort order by using sort option 'load order', all you have to do is use the INLINE LOAD before you are loading your Report Type fields in any other table LOAD.
I assume you have another table with Report Type, Case ID and Case Date, so just do this:
Dummy:
LOAD * INLINE [
Report Type
...
];
FactTable:
LOAD [Case ID],
[Case Date],
[Report Type],
...
FROM YourTableSource;
DROP TABLE Dummy;
How is Case ID and Case Date related to Report Type?
If you want to set a specific load order for Report Type to determine the sort order by using sort option 'load order', all you have to do is use the INLINE LOAD before you are loading your Report Type fields in any other table LOAD.
I assume you have another table with Report Type, Case ID and Case Date, so just do this:
Dummy:
LOAD * INLINE [
Report Type
...
];
FactTable:
LOAD [Case ID],
[Case Date],
[Report Type],
...
FROM YourTableSource;
DROP TABLE Dummy;
Thanks so much. It works. And easy for me to understand how to use it.
You are welcome.
Just remember that load order is determined by the first appearance of a field value during your script execution.
And that we are talking about field values, not table records, so if your field is a key field (like in the sample above) both table loads need to be considered to determine the load order (that's what we benefit from when using an INLINE LOAD first in the script).
Thank you again for adding this helpful note.