Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Problem connection table

I have a problem with connection to the differnt table.

Many cash system in our country sending files to our global system, every night makes this system a xml file see attachment.

This xml file import every day to qlikview kassa demo see attachment.

the problem is that the connnection to the different table not work, the ticketnumber must show the site ( cash system) oderdate, time

i can't change the xml

can anyone help me to use the correct settings in the script.

1 Solution

Accepted Solutions

Re: Problem connection table

You can't join the two tables on order date since many tickets have the same date. So you get a many-to-many join. You need to rename Orderdate to something like Ticketdate in the ticket table and uncomment the %Key_Ticket... field so it joins correctly with Orders.

Ticket:

LOAD Date#(Date,'YYYYMMDD')  as TicketDate,

   TicketNr,

    CentNr,

    CentName,

    SiteNr,

    SiteName,

    TotTicket,

    Tot2Pay,

    Reprint,

    Kill,

    B2Table,

    Void,

    ChkDiscTot,

    ChkTotal,

    AccKind,

    AccNr,

    AccName,

    TableNr,

    [Paymode/PayLine/PaymNr] as PaymNr,

    [Paymode/PayLine/PaymName] as PaymName,

    [Paymode/PayLine/Qty] as [PayLine/Qty],

    [Paymode/PayLine/Value] as Value,

   %Key_Ticket_369F651F33B57014  

FROM [..\..\..\..\qlikview\nieuwe export hq\FX20121103.xml] (XmlSimple, Table is [Tickets/Ticket]);


talk is cheap, supply exceeds demand
4 Replies

Re: Problem connection table

Use Date#(OrderDate,'YYYYMMDD') AS OrderDate

for the OrderDate field in the Ticket table.

You had done for the order table but missed to do it in the Ticket table.

Hope it solves the problem.

Not applicable

Re: Problem connection table

thank you,

but when i load the script and select ticketnr he shows me all off the products.

he must show the products they are sold  on this ticket.

the ticket si the key to show sitename products odredate etc.

Re: Problem connection table

You can't join the two tables on order date since many tickets have the same date. So you get a many-to-many join. You need to rename Orderdate to something like Ticketdate in the ticket table and uncomment the %Key_Ticket... field so it joins correctly with Orders.

Ticket:

LOAD Date#(Date,'YYYYMMDD')  as TicketDate,

   TicketNr,

    CentNr,

    CentName,

    SiteNr,

    SiteName,

    TotTicket,

    Tot2Pay,

    Reprint,

    Kill,

    B2Table,

    Void,

    ChkDiscTot,

    ChkTotal,

    AccKind,

    AccNr,

    AccName,

    TableNr,

    [Paymode/PayLine/PaymNr] as PaymNr,

    [Paymode/PayLine/PaymName] as PaymName,

    [Paymode/PayLine/Qty] as [PayLine/Qty],

    [Paymode/PayLine/Value] as Value,

   %Key_Ticket_369F651F33B57014  

FROM [..\..\..\..\qlikview\nieuwe export hq\FX20121103.xml] (XmlSimple, Table is [Tickets/Ticket]);


talk is cheap, supply exceeds demand
Not applicable

Re: Problem connection table

hello

thank you

you can see i am a beginner with stupid mistake's

regards

anton

Community Browser