Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
ISQL Reference Manual for ALLBASE/SQL and IMAGE/SQL: HP 3000 MPE/iX Computer Systems > Chapter 4 ISQL Commands

CHANGE

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

The CHANGE command modifies the first occurrence or all occurrences of a string in the command buffer.

Scope

ISQL only.

ISQL Syntax

C [ HANGE ] Delimiter OldString Delimiter NewString Delimiter [@]

Parameters

Delimiter

is a one-byte nonblank character delimiting OldString and NewString.

OldString

is the string in the command buffer to be replaced. Its maximum length is 32K bytes.

NewString

is the string to replace the OldString. Its length does not have to equal that of OldString. Its length can range from 0 to 32K bytes.

@

is specified to change all occurrences of OldString. If omitted, only the first occurrence of OldString is changed.

Description

  • If Delimiter, OldString, or NewString contains one of the following special characters, precede the special character with the escape character defined with the ESCAPE option of the SET command:

       '
    
       "
    
       &
    
       ;
    
       SET ESCAPE Character (initial setting = \)
    
  • In prompting mode, do not enter delimiters. For example:

       isql=> CHANGE;
    
    
    
       Old string> OldString;
    
       New string> NewString;
    
       Change all occurrences (Y/N)> Y
    
    
    
       Changed command is displayed.
    

Example

   isql=> RECALL CURRENT;



   SELECT Name,Owner FROM System.Table WHERE Type = '0';



   isql=> CHANGE |\'||@;



   When nothing is inserted for the new string, the old string is deleted.



   SELECT Name,Owner FROM System.Table WHERE Type = 0;



   isql=> CHANGE |Owner|Nrows,Avglen|;



   SELECT Name,Nrows,Avglen FROM System.Table WHERE Type = 0;



   isql=> CHANGE |,Avglen||;



   SELECT Name,Nrows FROM System.Table WHERE Type = 0;



   isql=> START;
Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.