Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

load

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!

1 Solution

Accepted Solutions
marcus_malinow
Partner - Specialist III
Partner - Specialist III

Hi Jan,

use the Mid function.

LOAD *,

       mid(job_nummer, 11,2) as Gesellschaft;

SQL SELECT [the rest of your SQL]

Marcus

View solution in original post

6 Replies
Anonymous
Not applicable
Author

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

anbu1984
Master III
Master III

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)

marcus_malinow
Partner - Specialist III
Partner - Specialist III

Hi Jan,

use the Mid function.

LOAD *,

       mid(job_nummer, 11,2) as Gesellschaft;

SQL SELECT [the rest of your SQL]

Marcus

ashfaq_haseeb
Champion III
Champion III

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

Not applicable
Author

It is a Pervasive database. I would like to read out only characters 11 and 12.

Not applicable
Author

Thanks Marcus. Works!