Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Colleagues, good day!
Can you give an advice please, how we can ignore missing field in Table loading statement?
For example, i have this one:
Test:
Load * Inline
[A, B, C];
Final:
load
A,
B,
C,
D
resident Test;
Drop table Test;
How to ignore D field missing and to load A, B, C without fails?
Thanks.
You can't. Do try to load non-existing fields. It will not work.
If you want to load all the fields from table Test the do LOAD * RESIDENT Test;
That will work even if you don't know which fields table Test does or does not have.
You can't. Do try to load non-existing fields. It will not work.
If you want to load all the fields from table Test the do LOAD * RESIDENT Test;
That will work even if you don't know which fields table Test does or does not have.
Can you show me please how to do that?
Gysbert alread showed it using LOAD * RESIDENT Test;
But don't forget to use NOCONCATENATE when using LOAD * RESIDENT ...
Test:
Load * Inline [
A, B, C
1,2,3 // just to add a record
];
Final:
NOCONCATENATE
load
*
resident Test;
Drop table Test;
But can you describe what the use case for this is? Maybe there is a different but better solution.
i need to understand, in what way (maybe through the variable) i can check if table exist some field
You can make use of the table functions: