First create a variable that will accept the values of prompt.
VAR PDSTRING VARCHAR2(30)
VAR SOSTRING VARCHAR2(30)
VAR CONSTRING VARCHAR2(30)
Next You need to prompt for getting user defined values.
prompt Enter the Connect Information.
accept DB char prompt 'Username: '
accept Password char prompt 'Password: '
accept constring char prompt 'Connect String : '
Define Column for it
COLUMN SOSTRING NEW_VALUE SOSTRING NOPRINT
SELECT NVL(TRIM('&DB'), to_char(SYSDATE)) AS SOSTRING FROM DUAL;
COLUMN PDSTRING NEW_VALUE PDSTRING NOPRINT
SELECT NVL(TRIM('&Password'), to_char(SYSDATE)) AS PDSTRING FROM DUAL;
COLUMN CONSTRING NEW_VALUE CONSTRING NOPRINT
SELECT NVL(TRIM('&constring'), to_char(SYSDATE)) AS CONSTRING FROM DUAL;
Use this column values
CONN &SOSTRING/&PDSTRING@&CONSTRING
No comments:
Post a Comment