Getting "invalid identifier" error while inserting dynamic date value in table
Hi,
I am creating a script wherein I am trying to fetch "PASSWORD_CHANGE_DATE" & LAST_LOGIN details of user via dba_users view into an table. This script will run via tool to print the details in csv file.
Now while running this part of script I am getting error:
declare
TYPE LoginRecTyp IS RECORD (
USERNAME VARCHAR2(200),
last_login DATE,
password_change_date DATE
);
TYPE LoginList IS TABLE OF LoginRecTyp;
logins LoginList;
begin
EXECUTE IMMEDIATE ('select USERNAME,last_login,password_change_date from dba_users where USERNAME in ( select name from sys.user$ where type# = 1 and EXPTIME is null)')