Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody,
I'm loading data from various qvd's from some predefined fields. The problem is when I try to load the field EVENTTYPE from a lot of qvd's at the same time, since in some of those it's called EVENTTYPE but in the others it's called EventType.
How can I tell the LOAD statement that those are, in fact, the same field?
Thanks in advance
The correct way to fix this is to make sure the field has the same name in all QVDs.
Otherwise, it makes sense to try something like this. Script runs ignoring errors:
SET ErrorMode=0
LOAD
ID,
EVENTTYPE
EVENTDESCRIPTION
FROM (path)\ *.qvd
followed by:
LOAD
ID,
EventType as EVENTTYPE
EVENTDESCRIPTION
FROM (path)\ *.qvd
LOAD
...
EventType as EVENTTYPE
...
FROM...
Thanks for your fast answer, Michael. I think I didn't write that well...
What's happening is that I have a list of qvd's with data in the same folder, each named according to the day it was created. My intention is to load the data on all of them, including the field EventType, whith is in all of the qvd's . In some of those the field is called EVENTTYPE (all in upper case), but on others it's called EventType (capitalized). when I run the LOAD routine it identifies the field EVENTTYPE but not EventType, so it shows me a field not found error. My with is to load both fields in the same resulting field.
My code is:
LOAD
ID,
EVENTTYPE //The problem is here. In some files the field is EVENTTYPE while in others it's EventType
EVENTDESCRIPTION
FROM (path)\ *.qvd
Thanks again for your help
The correct way to fix this is to make sure the field has the same name in all QVDs.
Otherwise, it makes sense to try something like this. Script runs ignoring errors:
SET ErrorMode=0
LOAD
ID,
EVENTTYPE
EVENTDESCRIPTION
FROM (path)\ *.qvd
followed by:
LOAD
ID,
EventType as EVENTTYPE
EVENTDESCRIPTION
FROM (path)\ *.qvd
Thank you very much, it worked like a charm!