Home > database >  Define cannot use to_char up sqlplus
Define cannot use to_char up sqlplus

Time:10-12

I want to define tbname='mytbale_' | | to_char (sysdate, 'yyyymmdd'); Make & amp; Value is mytbale_20200113 tbname, but define view

DEFINE tbname="mytbale_" (CHAR)

Want to ask next should be how to write,

CodePudding user response:

refer to the original poster passion little clumsy bear reply:
I want to define tbname='mytbale_' | | to_char (sysdate, 'yyyymmdd'); Make & amp; Value is mytbale_20200113 tbname, but define view

DEFINE tbname="mytbale_" (CHAR)

Should be how to write, want to ask next


Up sqlplus username/password @ tnsname
SQL> Var tbname varchar2 (100);
SQL> The exec: tbname:='mytbale_' | | to_char (sysdate, 'yyyymmdd');
SQL> Print tbname;
  • Related