Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
What's the correct syntax for joining two inline tables?
Supposed I have these:
STATE:
LOAD * INLINE
[
STATE
MA
IL
FL
CA
];
CITY:
LOAD * INLINE
[
STATE, CITY
MA, BOSTON
IL, CHICAGO
FL, MIAMI
];
[ CODE HERE ]
How do I write the code to join STATE and CITY and place the code inside the [ CODE HERE ] area? I know you can add
the JOIN clause before the "CITY:" in above like but I want to write the statement AFTER the two tables are created.
LEFT JOIN (STATE)
CITY:
LOAD * INLINE
[
STATE, CITY
MA, BOSTON
IL, CHICAGO
FL, MIAMI
];
Thanks!
Does that mean it's required? Just trying to understand the responses here.
Yes you do, without that you will get error
OK, I guess the more I do with QV, the more i will learn.
From the earlier responses, I was interpreting it as an option. pradeep said "The NoConcatenate prefix forces two tables with identical field sets to be treated as two separate internal tables". "forces" usually implies it's an option.
You explicitly places the code there but you don't have to. In this case, it will fail if you don't have to.
Thanks!
I guess what he is trying to say is that you would need NOCONCATENATE for something like this:
LOAD *,
but if you add a dummy field or rename one of the fields then you won't need it. For example:
LOAD *,
1 as Dummy
The above won't need NOCONCATENATE
Got it. I interpreted incorrectly. Sorry pradeep.
Great, we are glad we were able to help.