Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have two qvd files and want to combine them to get the required data from both tables with a where clause in second qvd file.
Where clause will be "where [AccountNumber] = 'xyz'
can you please help me with the data load script.
thanks in advance
[Fact]:
LOAD [CountryName]
,[Geography]
,[AccountId]
FROM [lib://123/Fact.qvd]
(qvd);
[Account]:
LOAD [AccountId],
[AccountNumber],
[AccountName],
FROM [lib://123/Account.qvd]
(qvd);
Hi Prasanta,
Try like this
[Fact]:
LOAD [CountryName]
,[Geography]
,[AccountId]
FROM [lib://123/Fact.qvd]
(qvd);
Join([Fact])
[Account]:
LOAD [AccountId],
[AccountNumber],
[AccountName],
FROM [lib://123/Account.qvd]
(qvd)
where [AccountNumber] = 'xyz';
If want to join 2 tables and have it as a single table then use the above code .....if you don't you join link will automatically link both the tables with the common key between them
Order is most important here...
which ever the table you load fist will be taken as the reference , in the above post you have loaded Fact as the first table and if [AccountId] is loaded earlier than that column will be taken as the reference for load..if the [AccountId] is not loaded previously then it will have no effect it will not have any data reduction
Hi,
Try like this
TableB:
LOAD
AccountID,
AccountName
FROM TableB
WHERE AccountName = 'ABC';
TableA:
LOAD
*
FROM TableA
WHERE Exists(AccountID);
TableC:
LOAD
AccountID,
AccountLocation
FROM TableC
WHERE Exists(AccountID);
HOpe this helps you.
Regards,
Jagan.
hi,
thanks, in one of my table i have column as below
[Asset]&'-'&[Date] as AssetDateKey
while i trying to put that in below conditions, i am getting error msg like "the field does not exist.
WHERE Exists(AssetDateKey);
can you please advise on this what should i put in where clause in this case
Thanks
Prasanta
Hi,
This field Exists(AssetDateKey) should be loaded earlier and it should be present in the currently loading table then only it will work.
Can you attach your script so that it would be easier to provide answer.
Regards,
jagan.
AssetDateKey is composite build by you , on the same table than it won't recognize
any other solution around where i can use that calculated column in my where clause
Hi,
Try like this
Table1:
LOAD
*,
[Asset]&'-'&[Date] as AssetDateKey
FROM DataSource;
Table2:
LOAD
*
FROM DataSource2
WHERE Exists(AssetDateKey, [Asset]&'-'&[Date] );
Hope this helps you.
Regards,
Jagan.
Hi Jagan,
Thanks, this worked for me
WHERE Exists(AssetDateKey, [Asset]&'-'&[Date] );
Hi,
If you got the answer close this thread by giving Correct Answer.
Regards,
Jagan.