Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone
I have the following load statement:
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;
I would like to generate a new field called "Gesellschaft" that contains characerts 11-12 from all entries in "job_nummer".
Could somebody give me advise how to script this?
Thank you very much for your help!
Hi Jan,
use the Mid function.
LOAD *,
mid(job_nummer, 11,2) as Gesellschaft;
SQL SELECT [the rest of your SQL]
Marcus
How do you want to read the characters from Left or Right,
You can try like below
left(job_nummer,12) as Gesellschaft
or send me the conditions
In Oracle you can use SUBSTR
SQL SELECT "job_nummer",
jobnr,
"datum_auftrag",
Year ("datum_auftrag") as Jahr,
Month ("datum_auftrag") as Monat,
jobkategorie,
SUBSTR(job_nummer,11,2) As Gesellschaft
FROM EASY.job where "datum_auftrag" is not null;
In qlikview
Mid(job_nummer,11,2)
Hi Jan,
use the Mid function.
LOAD *,
mid(job_nummer, 11,2) as Gesellschaft;
SQL SELECT [the rest of your SQL]
Marcus
Hi try below
Load "job_nummer",
jobnr
"datum_auftrag"
Year ("datum_auftrag") as Jahr,
mid("job_nummer",11,2) as "Gesellschaft",
Month ("datum_auftrag") as Monat;
SQL SELECT "job_nummer",
jobnr,
"datum_auftrag",
jobkategorie
FROM EASY.job where "datum_auftrag" is not null;
Regards
ASHFAQ
It is a Pervasive database. I would like to read out only characters 11 and 12.
Thanks Marcus. Works!