- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Join in JSL recreating tables?
I have some JSL I'm running that appears to be re-creating the tables I am joining. So I start with TableA and TableB, and want to make TableC. What ends up happening is I make TableA2, TableB2, and TableC, while still having TableA and TableB . It's the exact same JSL I'm used to using for this so I can't figure out what's up here. Any help would be appreciated.
TableC = TableA << Join (
With( TableB ),
Match Flag(0),
Select( :ID, :PROP, :DATE_, :VALUE_, :CASE, :CMSQID),
SelectWith( :Name
,:origin
,:region
,:Season ),
By Matching Columns( :CMSQID = :CMSQID ),
Drop multiples( 0, 0 ),
Include Nonmatches( 1, 0 ),
Preserve main table order( 1 )
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Join in JSL recreating tables?
The behavior you are describing is the standard behavior for the Join platform. If you want to close Table A and Table B after the join, just specify
close( TableA, nosave );
close( TableB, nosave );
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Join in JSL recreating tables?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Join in JSL recreating tables?
The Join does not make duplicate copies. I read your initial question as to why the original TableA and TableB tables were still there after the join. Below is a rework of your Join statement, using the Big Class and Big Class Families data tables. It opens the 2 tables and then joins them together into a third table. This is the expected behavior
Names Default to Here( 1 );
// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
TableA = Open( "$SAMPLE_DATA/Big Class.jmp" );
// Open Data Table: Big Class Families.jmp
// → Data Table( "Big Class Families" )
TableB = Open( "$SAMPLE_DATA/Big Class Families.jmp" );
TableC = TableA << Join (
With( TableB ),
Match Flag(0),
Select( :Age, :Height),
SelectWith( :Name
,:sports
,:family cars
,:sibling ages ),
By Matching Columns( :Name = :Name, :Age == :Age ),
Drop multiples( 0, 0 ),
Include Nonmatches( 1, 0 ),
Preserve main table order( 1 )
);