Download eShell
Transcript
eShell User’s Manual Finally, subqueries may be used in the UPDATE command to determine the range of entries to be updated, as shown in the next example. Example 9-4. Change the property identification number of all NEW_QUAD4 elements having normal-y stresses greater than 2.0E+6 in Subcase 1 to PID=3. eSh> UPDATE NEW_QUAD4 SET PID=3 2> WHERE EID IN 3> ( SELECT EID FROM /RESULT/Q4STR[1] 4> WHERE SIGY > 2.0E+6 ); .... 2 Entries Updated eSh> SELECT EID,PID FROM NEW_QUAD4 WHERE PID=3; EID -------2 3 PID -------3 3 .... 2 Entries Selected In order to UPDATE a Relation, it is necessary to have the WRITE privilege for the database. UPDATING MATRIX ENTITIES It is also possible to selectively update columns or rows of Matrix entities subject to specific restrictions. To do this, the command: UPDATE MATRIX matrix_name value_list ROW WHERE COLUMN = rorc_id ; is used. The matrix_name must be the name of an existing Matrix entity. The new data values are given in the value_list which is composed of a list ofvalue_terms: UPDATE MATRIX mat_name SET rorc_id TO value_list value_term ⇒ SET VALUES AT TERM corr_id TO ( values ) The corr_id is an integer value indicating the starting column or row position of the numbers found in the list of values. Special rules, described in the next section, must be obeyed when specifying the corr_id and values for Matrix entities which use the COMPRESSed Storage Mode. The next example shows how a Matrix column may be updated. Finally, the rorc_id is the column or row identification number that will be updated. For the Column-major Orientation, it indicates a column, and for the Row-major Orientation, a row. UPDATING ENTITY DATA 9-3