title: PERL SCRIPT ERROR (DBD ERROR: error possibly near <*> indicator atrror possibly near <*> indicator at char 53 in 'insert
body: <p>i am getting below error while running below perl script. Can anybody help to figure it out?</p>
  
  <pre><code>    $ENV{PATH}= '/appl/OMS/scripts:/etc:/usr/bin:/usr/sbin:/b...';
      $ENV{PATH}= '/appl/OMS/scripts:/etc:/usr/bin:/usr/sbin:/bin:/usr/local/bin:/usr/local/opt/oracle/client/11.2.0.4/bin';
      $ENV{ORACLE_HOME} ='/usr/local/opt/oracle/client/11.2.0.4';
      $ENV{NLSPATH} = '/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat';
      $ENV{CLASSPATH} = 'CLASSPATH=/usr/local/opt/oracle/client/11.2.0.4/jdbc/lib';
      $ENV{JAVA_HOME} = '/appl/OMS/Software/java';
      $ENV{PERL5LIB} = '/appl/OMS/perl/lib';
  
      use lib "/appl/OMS/perl/lib";
  
  }
  
  use DBI;
  use DBD::Oracle;
  use Data::Dumper;
  use POSIX qw/strftime/;
  use Switch;
  use Term::ANSIColor;
  
  print " Input the environment name:\n";
  chomp($env=&lt;STDIN&gt;);
  
  print " Input attuid:\n";
  chomp($attuid=&lt;STDIN&gt;);
  
  print " Input first name:\n";
  chomp($fname = &lt;STDIN&gt;);
  
  print " Input last name:\n";
  chomp($lname= &lt;STDIN&gt;);
  #chomp($lname);
  
  my $dbInst="t1oms4d8.db.att.com";
  my $dbUser="OMS1AT01utils";
  my $dbPass="pswd4conn";
  my $host = "t1oms5c1.sldc.sbc.com";
  #$dsn= "dbi:oracle:T2OMS1D4.db.att.com:t2oms1c1.hydc.sbc.com:1521";
  #$DBIconnect= DBI-&gt;connect($dsn,OMS0BT08utils,Pwd0wner1);
  
  my $dbh=DBI-&gt;connect("dbi:Oracle:$dbInst", $dbUser, $dbPass);
  my $sth = $dbh-&gt;prepare('create table temp_table1 as (select * from users where user_id like '%SR508W%')');
  $sth-&gt; execute();
  
  print "test1";
  
  my $sth = $dbh-&gt;prepare("update temp_table1 set user_id= ".$attuid.",  first_nm= ".$fname.", last_nm= ".$lname." where user_id like '%SR508W%' " );
  $sth-&gt; execute();
  
  print "test2";
  
  my $sth = $dbh-&gt;prepare("insert into users (select * from temp_table1)");
  $sth-&gt; execute();
  
  my $sth = $dbh-&gt;prepare("insert into user_password(user_id,password1) values (".$attuid." ,(select PASSWORD1 FROM user_password where user_id like '%SR508W%'))");
  $sth-&gt; execute();
  
  my $sth = $dbh-&gt;prepare("insert into user_role(user_id,role_id) values (".$attuid." ,'1')");
  $sth-&gt; execute();
  
  my $sth = $dbh-&gt;prepare("select * from temp_table1");
  $sth-&gt; execute();
  
  my $sth = $dbh-&gt;prepare("drop table temp_table1");
  $sth-&gt;execute();
  
  $sth-&gt;finish();
  
  $dbh-&gt;commit or die $DBI::errstr;
  </code></pre>
  
  <p>I am running the script as below:</p>
  
  <pre><code>  $ ./dbtrial.pl
       Input the environment name:
      oms1at01
       Input attuid:
      sm501u
       Input first name:
      swapnil
       Input last name:
      mahindrakar
  </code></pre>
  
  <p>The error message is the following:</p>
  
  <pre><code>DBD::Oracle::st execute failed: ORA-00904: "MAHINDRAKAR": invalid identifier (DBD ERROR: error possibly near &lt;*&gt; indicator at char 69 in 'update temp_table1 set user_id= sm501u,  first_nm= swapnil, last_nm= &lt;*&gt;mahindrakar where user_id like '%SR508W%' ') [for Statement "update temp_table1 set user_id= sm501u,  first_nm= swapnil, last_nm= mahindrakar where user_id like '%SR508W%' "] at ./dbtrial.pl line 45, &lt;STDIN&gt; line 4.
  DBD::Oracle::st execute failed: ORA-00984: column not allowed here (DBD ERROR: error possibly near &lt;*&gt; indicator at char 53 in 'insert into user_password(user_id,password1) values (&lt;*&gt;sm501u ,(select PASSWORD1 FROM user_password where user_id like '%SR508W%'))') [for Statement "insert into user_password(user_id,password1) values (sm501u ,(select PASSWORD1 FROM user_password where user_id like '%SR508W%'))"] at ./dbtrial.pl line 50, &lt;STDIN&gt; line 4.
  DBD::Oracle::st execute failed: ORA-00984: column not allowed here (DBD ERROR: error possibly near &lt;*&gt; indicator at char 47 in 'insert into user_role(user_id,role_id) values (&lt;*&gt;sm501u ,'1')') [for Statement "insert into user_role(user_id,role_id) values (sm501u ,'1')"] at ./dbtrial.pl line 52, &lt;STDIN&gt; line 4.
  commit ineffective with AutoCommit enabled at ./dbtrial.pl line 58, &lt;STDIN&gt; line 4.
  test1test2----- websphe cldv0011 /appl/OMS/scripts/trials ---
  </code></pre>