0

I am trying to run multiple lines of statements at the same time but keep getting an error in RazorSQL. Any suggestions?

ERROR: [Teradata Database] [TeraJDBC 16.10.00.07] [Error 3932] 
[SQLState 25000] Only an ET or null statement is legal after a 
DDL Statement. Error Code: 3932 

enter image description here

alexsmith2
  • 331
  • 4
  • 12
  • 1
    DDL Statements need to be committed before you can run a DML statement. If your session is in Teradata mode I believe there is an implicit commit. If you are in ANSI mode then the commit does not happen automatically and you get the error saying that it expects an ET(End Transaction). So I would suggest trying to run in Teradata mode. – David Cram May 30 '18 at 13:02
  • I would also suggest posting code as text rather than an image. A lot of people on here will down vote for code that is displayed as an image – David Cram May 30 '18 at 13:04
  • HI David, thank you. I have changed it to: jdbc:teradata://SYMCTDPRD/TMODE=TERA,CHARSET=ASCII,DATABASE=database,LOGMECH=LDAP Now I get the following error: ERROR: [Teradata Database] [TeraJDBC 16.10.00.07] [Error 3807] [SQLState 42S02] Object 'midlife_a' does not exist. Error Code: 3807 – alexsmith2 May 30 '18 at 13:21
  • The drop statement will generate an error if the volatile table does not exist. Take a look at this: https://stackoverflow.com/questions/39769966/check-if-volatile-table-exists-in-teradata – David Cram May 30 '18 at 13:26
  • In Teradata, I can run the same code without error. It would continue to create the table and not stop the execution because the table doesn't exist. I have attached a screenshot of my RazorSQL settings as well. Is there no workaround for this? – alexsmith2 May 30 '18 at 13:37
  • I'm not sure. I'm not familiar with RazorSQL. The tool I use has an option to ignore errors but it then ignores ALL errors. So I find it safer to use a stored procedure (similar to one of the answers in the link in my last comment). An alternative would be to move the drop statement so that it is after you are done with your table rather than before you start. – David Cram May 30 '18 at 13:45
  • Figured it out. There are three arrows at the top of the UI. You need to select the arrow that points down. However, I wouldn't have gotten to that stage if it weren't for your answer. Thank you. – alexsmith2 May 30 '18 at 15:19

0 Answers0