header

useful EXCEL formula to generate SQL DDL/grant scripts

TO generate update script:

---------------------------
Enter the formula as below to generate the multiple statement and drag colums to generate DDL statements
=CONCATENATE($E$3,A2,"';")
Where
$E$3 Excel cell -->update psoprdefn set operpswd = ' ' where oprid='  (or similar insert statement)
A2 Excel  cell --> list table names or user name
“’;” --> is a string


To Generate role and permision and grants
----------------------------------------------
="grant select, update, delete, insert on " & A1 & " to user_role;"
="create public synonym " & A1 & " for sysadm." & A1 & ";"


Where
& A1 & Excel column  contains the table list

No comments: