Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I've hit an unexpected error. Here's the simplified version:
I need to join some tables together. One table contains application details. The other contains application statuses.
AppDetails:
AppId | AppName | AppDetail1 | AppDetail2 |
---|---|---|---|
12345 | John Doe | 1 | Blue |
12346 | Jane Doe | 0 | Yellow |
12347 | Mickey Mouse | 1 | Blue |
AppStatuses:
AppId | Status | StartDate |
---|---|---|
12345 | ApplicationStarted | 9/9/2018 |
12345 | ApplicationCompleted | 9/10/2018 |
12346 | ApplicationStarted | 9/9/2018 |
12346 | ApplicationAbandoned | 9/11/2018 |
I needed to measure time between statuses, so I used the generic load to make AppStatuses more workable:
AppId | ApplicationStarted | ApplicationCompleted | ApplicationAbandoned |
---|---|---|---|
12345 | 9/9/2018 | 9/10/2018 | |
12346 | 9/9/2018 | 9/11/2018 |
I am now trying to join the two together, but I'm getting an error that the table is not found. Here's what my simplified script would look like:
[AppStatuses]:
Generic Load
AppId,
Status,
StartDate
From ...[Source];
[Table Join]:
Load
AppId,
AppName,
AppDetail1,
AppDetail2
From ...[Source];
Join
Load
AppId,
ApplicationStarted,
ApplicationCompleted,
ApplicationAbandoned
Resident [AppStatuses];
Drop Table [AppStatuses];
The error I get while loading the script is "Table 'AppStatuses' not found." I searched the error and found suggestions that I should use the NOCONCATENATE prefix on the first table, but that gives me an "Illegal Prefix Combination" error. Someone might suggest not using JOIN at all, but in this case I need to because later in the script, I am creating calculated fields based off of fields in both tables.
Any ideas? All help is greatly appreciated.
The reason for table not found is because Generic Load creates Multiple tables.
You might have to do multiple joins post the generic load statement to merge them back into single table.
If you want to get the time between statuses try Age()