select all statement in Oracle not working as expected? - oracle

I learnt SQL in SSMS, but I'm using Oracle (Version 21.4.3.063) and have written a standard select ALL statement, which is surprisingly giving me an error!
Does anyone know why this query would produce an error?
The table name definitely exists!
Select * from TTLS532100;
The error I get is this (the code is preceded by comments):
Error starting at line : 5 in command -
select *
from TTLS532100
Error at Command Line : 6 Column : 6
Error report -
SQL Error: ORA-00942: table or view does not exist
00942. 00000 - "table or view does not exist"
*Cause:
*Action:

Related

ORA-00904: "TIMESTAMP": invalid identifier on perl script

DBI->connect using 'old-style' syntax is deprecated and will be an error in future
versions at /home/dbadmin/perl/adm_audit_mhs line 43
Can't prepare SQL statement: ORA-00904: "TIMESTAMP": invalid identifier (DBD ERROR:
error possibly near <*> indicator at char 281 in
'SELECT OS_USERNAME, USERNAME, TERMINAL, TIMESTAMP,
SQL_TEX,0,'Successful','Failed') RETURNCODE
FROM unified_audit_trail
WHERE action IN (43,51,53)
AND <*>timestamp between Trunc(SYSDATE-1) AND Trunc(SYSDATE)')
Please help I'm getting this error while running a perl script to pull information from unified_audit_trail view. Thanks in advance
As the error indicates, there is no timestamp column in unified_audit_trail. There is an event_timestamp column which is what I'm guessing you meant to reference.

Problem execute procedure in oracle ORA-06550

I try to execute a package in oracle that it works when call him with software, but in sql developer no
show me the following error:
ORA-06550: Line 2 column 11
PLS-00103 Encountered the symbol "package name" when expection one the following
:= . ( # % ; was substituted form "package name" to continue.
06550. 000000 - "line%s column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action
Vendor code 6550 Error at Line:1
the line 11 start of name package
begin
execute packageName.procedureName(parameter1,parameter2,parameter3,...);
end
Remove EXECUTE. It is used when you want to run a procedure at SQL*Plus prompt. In PL/SQL, you don't use it.
Code that should work is:
begin
packageName.procedureName(parameter1,parameter2,parameter3,...);
end;
/

in SQuirrel SQL - unable to use old or new in oracle trigger

using Oracle DB 10 and SQuirrel 3.7.1
I need to access inserted-fields
If I write in an Oracle trigger script - :new.fieldName,
when running the script - I get an input window that says:
"Please input the parameter values
Value for ' :new' ___________ "
the trigger is compiled with a warning - "EDT violation detected"
when the trigger is executed (using an insert) , there's an error:
" Error: ORA-04098: trigger 'schemeName.triggerName' is invalid and failed re-validation
SQLState: 42000
ErrorCode: 4098
Position: 2172 "
what am I missing ?
trigger script:
CREATE OR REPLACE TRIGGER schemeName.triggerName
AFTER INSERT ON schemeName.tableName1
FOR EACH ROW
BEGIN
Insert into schemeName.tableName2 (fieldName1, fieldName2) values (:new.fieldName, 'someString');
END;
/
Your tool (SQuirrel 3.7.1) understands : as if you wanted to enter a substitution variable.
There should be an option which turn that OFF (at least temporarily) so that you could create a trigger.
goto plugins -> summary, disable sqlparam-plugin and restart squirrel.

Getting error - Unknown Command , while deleting view if exists in oracle

IF EXISTS(select 1 from sys.views where name='release_testcase_count')
DROP VIEW ITCC.release_testcase_count4;
i am able to delete this view but it is saying -
Error starting at line : 1 in command -
IF EXISTS(select 1 from sys.views where name='release_testcase_count')
Error report -
Unknown Command
View ITCC.RELEASE_TESTCASE_COUNT4 dropped.
so in this case 1 line have a error, it is not checking it exist or not.
IF EXISTS command is valid in SQL Server or other databases but not in ORACLE.
Your first line is completely ignored and signaled as unknown command as Oracle does not recognize any command starting with IF EXIST.
Second line is a valid command, so the view is dropped as a result.

Oracle triggers error on sqldeveloper export script

I had built a few tables with sequences and triggers, since I need to share the script with my team at uni I did an export with sqldeveloper, now when I try to import/execute the resulted .sql I'm getting errors with triggers.
This is the error message:
"Error starting at line 250 in command:
CREATE OR REPLACE EDITIONABLE TRIGGER "TRG_ACCOUNTS"
BEFORE INSERT ON ACCOUNTS
FOR EACH ROW
BEGIN
SELECT SEQ_ACCOUNTS.NEXTVAL INTO :NEW.ACCOUNT_ID FROM DUAL
Error report:
SQL Command: editionable TRIGGER
Failed: Warning: execution completed with warning
Error starting at line 258 in command:
END
Error report:
Unknown Command
trigger "TRG_ACCOUNTS" altered."
This is the part of the script it's complaining about. I have a few other triggers and it's giving me the same error on all of them. I've checked how the triggers are created after executing the script, and all of them seem to be missing a semi colon and the "END;" at the end.
Example:
create or replace
TRIGGER "TRG_FL_AR"
BEFORE INSERT ON FLOOR_AREAS
FOR EACH ROW
BEGIN
SELECT SEQ_FL_AR.NEXTVAL INTO :NEW.FLOOR_AREA_ID FROM DUAL <-- missing ";" here
<missing "END;" here>
Could you please help me?
Thank you.
Try to put a back slash / after line 258 and check again

Resources