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

best way to script to eliminate synthetic table

Hi,

I have 3 files, cutomer table, invoice table, credits table.

The invoice and cresits table both contain 5 identical fields and another 3 fields which are independant of each other.

The customer table contains one key link - Acc No which is in all files.

What is the best way to develop this script to prevent synthetic table because if the files are all loaded they will automatically associate.

Concatenation into the customer table?

Thanks,

Gregg

1 Solution

Accepted Solutions
m_woolf
Master II
Master II

qualify *;

unqualify AccNo;

View solution in original post

9 Replies
m_woolf
Master II
Master II

qualify *;

unqualify AccNo;

Not applicable
Author

Hi,

Concatenation is not necessary. Just give the fields not to be used for linking tabeles different names by renaming them (AS...). You can also use QUALIFY.

Examples:

load Credit AS CreditTab1;

QUALIFY *; UNQUALIFY YourKeyField;

LOAD ...

;

Regards,

sebablum

Miguel_Angel_Baeyens

Hi Gregg,

Although the QUALIFY will work, preceding the fields with the table name, I'd rather concatenate Invoice and Credit tables, so the key field to Customer table is from the concatenated (fact) table to the Customer table.

Hope that helps.

Miguel

perumal_41
Partner - Specialist II
Partner - Specialist II

Hi Gregg,

Use QUALIFY *; UNQUALIFY,othsrwise Given Different File name common Filed except Link.

Regards

Perumal

Not applicable
Author

Hi,

This does work but I have one final issue.

The invoices/credits tables contain a date field and I need to link them.

A synthetic key is still linked for them.

Thanks,

Gregg

perumal_41
Partner - Specialist II
Partner - Specialist II

Hi

invno&'-'Datefield Create in Inv ,Credits table Given one link those table

Regards

Perumal A

Not applicable
Author

Hi,

This wont work as there could be different dates or the same dates for credits/invoices. there is only one date field to be used.

Gregg

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Create a key filed based on the 5 fields that are common in invoice and credits table in both the tables.

     Make the key field as unqualify.

     Like below

     Unqualify Key;

     invoice:

     Load

          field1&field2&field3&field4&field5 as Key,

          ....

     From...

     credits:

      Load

          field1&field2&field3&field4&field5 as Key,

          ....

     From...

Hope it helps

Celambarasan

Not applicable
Author

Hi,

Qualify works, if loading in multiple invoice files (same headings) they duplicate each week.

Is there something I am missing.

Thanks Again

Gregg