Subscribe Bookmark RSS Feed

update table using JSL without adding missing columns

tom_e_dunn

Community Trekker

Joined:

Jul 28, 2014

I'm trying to update the values of a specific column in a data table using values in another data table. The update function seems like the logical choice but it always seems to add extra unmatched columns to the updated table. From the update utility there is an option for this

8498_Capture.PNG

However there isn't any mention of this in either the scripting index

8499_Capture.PNG

or in the help search. I've tried

dt << update(

     with(dt2),

     match(:name=:name),

     ignore missing,

     add columns from update(none)

);

but that doesn't seem to work. Does anyone know what the correct option is for this?

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

You're almost there!

Looking at the Source script that's added to my table after I do an Update with that option I see that the script is:


Data Table( "Trial1.jmp" ) << Update(


  With( Data Table( "Little.jmp" ) ),


  Match Columns( :popcorn = :popcorn, :oil amt = :oil, :batch = :batch ),


  Add Columns from Update table( None )


);






8501_JMPScreenSnapz001.png


-Jeff

-Jeff
2 REPLIES
Solution

You're almost there!

Looking at the Source script that's added to my table after I do an Update with that option I see that the script is:


Data Table( "Trial1.jmp" ) << Update(


  With( Data Table( "Little.jmp" ) ),


  Match Columns( :popcorn = :popcorn, :oil amt = :oil, :batch = :batch ),


  Add Columns from Update table( None )


);






8501_JMPScreenSnapz001.png


-Jeff

-Jeff
tom_e_dunn

Community Trekker

Joined:

Jul 28, 2014

Thanks Jeff!