Overview
This guide helps you resolve common SQL query errors when using Koala Data Explorer with Oracle Fusion Cloud.Common Oracle Errors
ORA-00942: Table or View Does Not Exist
Symptoms:- Query fails with “table or view does not exist”
- Table shows in Data Sources but query fails
- Schema qualification: Table exists in different schema
- Permissions: No SELECT permission on table
- Typos: Misspelled table or column names
- Case sensitivity: Oracle is case-sensitive with quoted identifiers
- Use schema prefix:
SCHEMA_NAME.TABLE_NAME
- Check permissions: Verify SELECT access with DBA
- Verify spelling: Double-check table and column names
- Use Data Sources: Drag table names from explorer to avoid typos
ORA-00936: Missing Expression
Symptoms:- “Missing expression” error
- SQL syntax appears correct
- Missing SELECT columns: Empty SELECT clause
- Trailing commas: Extra comma after last column
- Missing FROM clause: SELECT without FROM
- Reserved words: Using Oracle reserved words as identifiers
ORA-01017: Invalid Username/Password
Symptoms:- Authentication fails during query execution
- Previously working queries now fail
- Refresh connection: Reconnect to Oracle Fusion
- Update credentials: Password may have expired
- Check session: Session may have timed out
- Re-authenticate: Use connection manager to re-authenticate
ORA-00904: Invalid Identifier
Symptoms:- Column name not recognized
- “Invalid identifier” error
- Column doesn’t exist: Column name is incorrect
- Case sensitivity: Quoted identifiers are case-sensitive
- Reserved words: Using Oracle reserved words
- Special characters: Invalid characters in names
- Verify column names: Check in Data Sources explorer
- Use proper quoting:
"Column Name"
for case-sensitive names - Avoid reserved words: Use different names or quote them
- Check spelling: Ensure correct column spelling
Query Syntax Issues
JOIN Problems
Common JOIN errors:Date Format Issues
Common date problems:NULL Handling
NULL comparison issues:Performance-Related Errors
Query Timeout
Symptoms:- Query runs for long time then fails
- Timeout error messages
- Add row limits: Use
WHERE ROWNUM <= 1000
- Optimize WHERE clauses: Filter data more effectively
- Check indexes: Ensure filtered columns are indexed
- Increase timeout: Adjust timeout in extension settings
Memory Issues
Symptoms:- Out of memory errors
- VS Code becomes unresponsive
- Reduce result size: Select fewer columns
- Add row limits: Limit rows returned
- **Avoid SELECT ***: Select only needed columns
- Process in batches: Break large queries into smaller parts
Data Type Issues
Number Format Errors
Common problems:Character Set Issues
Symptoms:- Special characters display incorrectly
- Encoding errors
- Check database encoding: Verify Oracle character set
- Use proper functions: CONVERT or TRANSLATE functions
- Escape special characters: Use proper escaping for special chars
Bind Variable Errors
Parameter Issues
Common problems:- Undefined parameters: Using
:param
without defining value - Type mismatches: Parameter type doesn’t match column type
- Missing parameters: Not providing all required parameters
Row Limit Errors
Export Limitations
Symptoms:- “Too many rows” errors
- Excel export not available
- Add ROWNUM limits:
WHERE ROWNUM <= 10000
for Excel compatibility - Use CSV for large datasets: CSV supports more rows than Excel export
- Filter data: Use more restrictive WHERE clauses
- Process in batches: Split large results into multiple queries
Debugging Strategies
Systematic Approach
- Start simple: Begin with basic SELECT * FROM table
- Add complexity gradually: Add WHERE, JOIN, ORDER BY one at a time
- Test components: Test each part of complex queries separately
- Use EXPLAIN PLAN: Check query execution plan
Common Debugging Techniques
Error Message Reference
Understanding Oracle Error Messages
Oracle error messages follow this pattern:- ORA-#####: Oracle error number
- Description: Brief error description
- Cause: What caused the error
- Action: Suggested resolution
Most Common Errors
Error Code | Description | Common Cause |
---|---|---|
ORA-00942 | Table or view does not exist | Missing permissions or wrong schema |
ORA-00904 | Invalid identifier | Wrong column name |
ORA-00936 | Missing expression | Syntax error in SELECT |
ORA-01017 | Invalid username/password | Authentication expired |
ORA-00001 | Unique constraint violated | Duplicate key values |
ORA-01400 | Cannot insert NULL | Required field is NULL |
Getting Help
Before Reporting Query Errors
Collect this information:- Complete error message: Copy full Oracle error text
- SQL query: The exact query that failed
- Table structure: Column names and types
- Sample data: Example of data you’re querying
- Expected result: What you expected to happen
Query Optimization Help
For performance issues:- Execution plan: Use EXPLAIN PLAN if available
- Row counts: Table sizes and expected result size
- Index information: Available indexes on tables
- Timing: How long query takes to fail
Best Practices
Writing Robust Queries
- Always use row limits: Protect against large result sets
- Qualify column names: Use table aliases for clarity
- Handle NULLs explicitly: Use IS NULL, IS NOT NULL, NVL
- Test incrementally: Build complex queries step by step
- Use bind variables: For dynamic values
Error Prevention
- Use Data Sources explorer: Drag table/column names to avoid typos
- Start with simple queries: Test basic connectivity first
- Understand your data: Know table structures and relationships
- Save working queries: Keep copies of successful queries
- Document complex logic: Add comments to complex queries