Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i have multiple databases for different operating sites but all of them have the same tables and i do not have a column that says where the record is from since all of them reside in site-specific databases so there was no need in the first place...
how do i join them together but still be able to differentiate which sites the records are from?
thanks in advance...
i can't do this?
connect site1
load table1
load table2
...more tables...
connect site2
concatenate table1
concatenate table2
...more tables...
and so on...
Sure you can
but im getting suffixes adding on to the concatenated tables when i connect to a database once to retrieve all the tables and then the next database instead of repeatedly connect to the databases for the next table...
table.fieldA
table.fieldB
table-1.fieldA
table-2.fieldB
for kris' example, he consantly connects to the database to simulate multiple databases
So what does your script look like then? Could you paste the doc here?
You do not need to connect to the database for each table.
Connect to Site1 database
// load tables
table1:
...
table2:
..
Then connect to site2 database
load tables
Hope this helps.
thanks to kris, johannes and nick i have managed to get what i wanted
it was actually my qualify/unqualify statements that were causing the suffixes to be appended instead of concatenating to the tables...
ahhhhh now i got another problem
i wasn't joining all tables yet when i removed the qualify/unqualify statements
i was only joining tables with 2 similar columns
but once i started joining the other tables which were similar but site-specific i will be stuck at the loading script window...
why are you using join and not concatenate ?
For any table, if there are site-specific fields in addition to common fields, you need to define all the fields of a table before you start loading from the sites. For example,
Common fields of all sites: Com1, Com2, Com3
Site1-specific fields: Site1a, Site1b
Site2-specific fields; Site2a, Site2b
Define all fileds of the Table1 using the script
Table1:
LOAD * Inline [
Com1, Com2, Com3, Site1a, Sit1b, Site2a, Site2b
];
Connect to Site0 and load data
Concatenate (Table1) LOAD * From Table1
Connect to Site1 and load data
Concatenate (Table1) LOAD * From Table1
...
Hope this helps.