Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone
I have the following script:
LOAD *,
mid(job_nummer, 11,2) as Gesellschaft;
I would like to include only values that are "AG", "AP" and "DC"
How would I have to script this?
Thank you very much for your help!
Hi treseco
I am not sure i got what you were trying to do. Could you write the whole script?
Thank you for your help!
I guess, there is a understanding gap. Could you explain expected output against a sample input?
Here is what I would like to do:
I have the following script:
LOAD *,
mid(job_nummer, 11,2) as Gesellschaft;
I would like to include only values that are "AG", "AP" and "DC"
The data I load from a pervasive database so the whole script looks like this:
LOAD *,
mid(job_nummer, 11,2) as Gesellschaft;
SQL SELECT "job_nummer",
jobnr,
"datum_auftrag",
Year ("datum_auftrag") as Jahr,
Month ("datum_auftrag") as Monat,
jobkategorie
FROM EASY.job where "datum_auftrag" is not null;
Try
LOAD *,
mid(job_nummer, 11,2) as Gesellschaft
where match(mid(job_nummer, 11,2),'AG', 'AP', 'DC');
SQL SELECT "job_nummer",
jobnr,
"datum_auftrag",
Year ("datum_auftrag") as Jahr,
Month ("datum_auftrag") as Monat,
jobkategorie
FROM EASY.job where "datum_auftrag" is not null;
LOAD *,
mid(job_nummer, 11,2) as Gesellschaft
Where Match(mid(job_nummer, 11,2), 'AG', 'AP' ,'DC');
SQL SELECT "job_nummer",
jobnr,
"datum_auftrag",
Year ("datum_auftrag") as Jahr,
Month ("datum_auftrag") as Monat,
jobkategorie
FROM EASY.job where "datum_auftrag" is not null;
You can filter it at the DB level like:
LOAD *,
mid(job_nummer, 11,2) as Gesellschaft;
SQL SELECT "job_nummer",
jobnr,
"datum_auftrag",
Year ("datum_auftrag") as Jahr,
Month ("datum_auftrag") as Monat,
jobkategorie
FROM EASY.job where "datum_auftrag" is not null And "Job_number" in ('AG', 'AP' ,'DC');
AWESOME! Thank you anbu
And what's wrong with my answer?
I think it is fair to mark the first correct answer as correct.
Sorry GandalfGray. I do not get your answer to work. I will try again. I definately appechiate your help...
You are right, you entered the same code. My apologies...