Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Inner Join Tables/QVD

Hi

I need to join Tables Created from QVD files.

Data Structure is as follows:

QVD1(Item Code, Item Description)

QVD2(Ship Item Code, Quantity, Value)

Note:

a. Ship Item Code = Item Code

Report Output should be as below:

Ship Item Code, Item Description, Quanitty, Value

1 Solution

Accepted Solutions
SunilChauhan
Champion
Champion

hi try this ,

Operations:                                         // you need to change table name

Load DISTINCT

[Job Code] , [Step Type Code], [Step Type], [Step Item Code]
FROM $(_SysPathQVDDirectory)\Operations.qvd                                   //  you  need to put here slash

where ( [Step Type Code] = 113);

Below code is also not working where I first loaded data from Operations QVD

Table1:

Load DISTINCT

[Job Code] , [Step Type Code], [Step Type], [Step Item Code]
Resident Operations

where ( [Step Type Code] = 113);

hope this helps

Sunil Chauhan

View solution in original post

9 Replies
SunilChauhan
Champion
Champion

QVD1:

Load

[Item Code], [Item Description]

from QVD1;

QVD2:

Inner Join(QVD1)

Load

[Ship Item Code] as [Item Code]

[Ship Item Code], Quantity, Value

from QVD2;

take

Ship Item Code, Item Description, Quanitty  into dimension

and  value Or sum( Value) in expression

Sunil Chauhan
Not applicable
Author

Above answer is helpful but I have one more condition to add...

I want to only pick [Item Code] and [Item Description] that comes from 3rd table.

QVD3(Job Code, Step Item Code, Step Type = 'Substrate')

Item Code = Step Item Code where Step Type = Substrate

Can you help pl?

Not applicable
Author

Hi, Try this to get correct values.

T1:

Load

     [Item Code],

     [Item Description]

from qvd1.qvd;

T2:

inner join Load

     [Ship Item Code] as [Item Code],

     Quantity,

     Value

from qvd2.qvd;

T3:

inner join Load

Step Item Code as [Item Code],

[Job Code]

from qvd3.qvd where [Step Type] = 'Substrate';

*******

Regards,'

Ashutosh

Not applicable
Author

I am stuck at 1st step...

Can someone tell me why below script code is not working?

Table1:

Load DISTINCT

[Job Code] , [Step Type Code], [Step Type], [Step Item Code]
FROM $(_SysPathQVDDirectory)Operations.qvd

where ( [Step Type Code] = 113);

Below code is also not working where I first loaded data from Operations QVD

Table1:

Load DISTINCT

[Job Code] , [Step Type Code], [Step Type], [Step Item Code]
Resident Operations

where ( [Step Type Code] = 113);

Not applicable
Author

Hi,

Don't use parenthesis with where keyword. Then it should work.

SunilChauhan
Champion
Champion

in resident you are using Operations  table .check weither this table is available or not.

also tell us what is the error you are getting?

Sunil Chauhan
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

HI,

     Try this.

    Table1:

     Load DISTINCT

     [Job Code] , [Step Type Code], [Step Type], [Step Item Code]
     Resident Operations.qvd(qvd)

     where ( [Step Type Code] = 113);

Regards,

Kaushik Solanki    

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
SunilChauhan
Champion
Champion

hi try this ,

Operations:                                         // you need to change table name

Load DISTINCT

[Job Code] , [Step Type Code], [Step Type], [Step Item Code]
FROM $(_SysPathQVDDirectory)\Operations.qvd                                   //  you  need to put here slash

where ( [Step Type Code] = 113);

Below code is also not working where I first loaded data from Operations QVD

Table1:

Load DISTINCT

[Job Code] , [Step Type Code], [Step Type], [Step Item Code]
Resident Operations

where ( [Step Type Code] = 113);

hope this helps

Sunil Chauhan
Not applicable
Author

Hi,

    I am sorry that first time I missed it, just relied on syntax check   ...you need to use

FROM $(_SysPathQVDDirectory)\Operations.qvd (qvd)          in first load and in second load just check it table and fields are available with same name.

Regards,

Ashutosh