Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Heads-up! I am new to all of this, so patience with me will be appreciated.
I have recently started looking at bringing in Accpac data from SQL into QlikView. I have run into a bit of a problem that I can't get my head around. I have a ACCTID field that has the following format: 000000AA00000. E.g. one of the 1000's of values for ACCTID is 001140AB91004. This field's composition can be explained as follows:
I want to be able to extract each of these five "subfields" as separate list boxes to be able to filter on. In addition I need to be able to combine the 3rd and 4th set of "subfields" as one field being AA000 (AB910) in the example above).
Solutions I've tried
Thank you all for assisting. I am looking forward to your feedback.
Take care,
Jacques
Hi All,
Strange how nicely things work out once you apply your mind. I managed to solve my problem. Just added this to my script load.
LOAD *,
left(ACCTID,4) as ACCTNO,
mid(ACCTID,5,2) as REGION,
mid(ACCTID,7,2) as DEPOT,
mid(ACCTID,9,3) as CUSTOMER,
mid(ACCTID,7,5) as SCHEDULE_BOARD,
right(ACCTID,2) as DIVISION;
SQL SELECT *
FROM "AP_TSFG_DAT".dbo.GLAFS;
SQL SELECT *
FROM "AP_TSFG_DAT".dbo.GLAMF;
I've just noticed that although I have a list box for each of the five values mentioned above, the field name remains ACCTID. No wonder values are discarded when I select multiple selections. I suppose I need to rename the new fields to appropriate names. Just don't know how to do it. For example, I would like to call the AB910 as "Cost_Centre" in my example above. Any suggestions?
Hi All,
Strange how nicely things work out once you apply your mind. I managed to solve my problem. Just added this to my script load.
LOAD *,
left(ACCTID,4) as ACCTNO,
mid(ACCTID,5,2) as REGION,
mid(ACCTID,7,2) as DEPOT,
mid(ACCTID,9,3) as CUSTOMER,
mid(ACCTID,7,5) as SCHEDULE_BOARD,
right(ACCTID,2) as DIVISION;
SQL SELECT *
FROM "AP_TSFG_DAT".dbo.GLAFS;
SQL SELECT *
FROM "AP_TSFG_DAT".dbo.GLAMF;