This script takes some input and creates an Oracle create user statement. I'm having trouble getting the date to appear after two dashes (comment)
I'm getting is this: (see bold)
--------------------------------------------------------------------------------
09/17/2008 2:47:58 PM--true
create user c12345 identified by password /* test user */
profile default
password expire
default tablespace the_tablespace
temporary tablespace temp
;
grant create session to c12345;
grant select_all_role to c12345;
I want is this: (see bold)
--------------------------------------------------------------------------------
--09/17/2008 2:47:58 PM
create user c12345 identified by password /* test user */
profile default
password expire
default tablespace the_tablespace
temporary tablespace temp
;
grant create session to c12345;
grant select_all_role to c12345;
I'm not sure where the "true" is coming from and cannot figure out why the dash string is being written after the timeDate().
Any help would be greatly appreciated
TD
Code: Select all
var input = UltraEdit.getString("enter 'ora_user first last' (ie 'C12345 Tom Slick')", 1);
var sep = " ";
var input_arr = new Array();
input_arr = input.split(sep);
var username = input_arr[0];
var person_name = input_arr[1] + " " + input_arr[2];
UltraEdit.activeDocument.write("--------------------------------------------------------------------------------\r\n");
UltraEdit.activeDocument.write("--" + UltraEdit.activeDocument.timeDate() + "\r\n");
UltraEdit.activeDocument.write("\r\n");
UltraEdit.activeDocument.write("create user " + username + " identified by password /* " + person_name + " */\r\n");
UltraEdit.activeDocument.write("profile default\r\n");
UltraEdit.activeDocument.write("password expire\r\n");
UltraEdit.activeDocument.write("default tablespace the_tablespace\r\n");
UltraEdit.activeDocument.write("temporary tablespace temp\r\n");
UltraEdit.activeDocument.write(";\r\n");
UltraEdit.activeDocument.write("grant create session to " + username + ";\r\n");
UltraEdit.activeDocument.write("grant select_all_role to " + username + ";\r\n");
--------------------------------------------------------------------------------
09/17/2008 2:47:58 PM--true
create user c12345 identified by password /* test user */
profile default
password expire
default tablespace the_tablespace
temporary tablespace temp
;
grant create session to c12345;
grant select_all_role to c12345;
I want is this: (see bold)
--------------------------------------------------------------------------------
--09/17/2008 2:47:58 PM
create user c12345 identified by password /* test user */
profile default
password expire
default tablespace the_tablespace
temporary tablespace temp
;
grant create session to c12345;
grant select_all_role to c12345;
I'm not sure where the "true" is coming from and cannot figure out why the dash string is being written after the timeDate().
Any help would be greatly appreciated
TD