Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7430225
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:06:16+00:00 2026-05-29T09:06:16+00:00

I have two databases, one is in a test environment and is sqllite3 and

  • 0

I have two databases, one is in a test environment and is sqllite3 and the other is an oracle db for qa/prod. It’s not my system and I am not in control of this set-up. I wrote an SQL query that works in my test environment but failed against qa. I’m assuming it has something to do with discrepancies between oracle and sqllite3 but I can’t figure out what’s going on. thanks for the help.

here’s the error and the SQL:

OCIError: ORA-00903: invalid table name:

SELECT 'agency' AS came_from,
account.name as account_name, agency.id as id,
agency.name as name,
agency.contact_name as contact_name, 
agency.contact_email as
contact_email, agency.phone_number as phone_number,
agency.account as account
FROM 'agency' LEFT OUTER JOIN account 
ON account.id ='agency'.account WHERE account in (1601)   
UNION SELECT 'advertiser' AS  came_from, 
account.name as account_name, advertiser.id as id,
advertiser.name as name, advertiser.contact_name as contact_name,
advertiser.contact_email as contact_email, 
advertiser.phone_number as phone_number,
advertiser.account as account 
FROM 'advertiser' 
LEFT OUTER JOIN account ON account.id = 'advertiser'.account 
WHERE account in (1601) AND (advertiser.workflow_state <> 'deleted'
OR advertiser.workflow_state
IS NULL)  ORDER BY name asc
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T09:06:16+00:00Added an answer on May 29, 2026 at 9:06 am

    ‘agency’ and ‘advertiser’ are not valid table names in Oracle.

    Most commonly, the tables would be named AGENCY and ADVERTISER and you could then change your FROM clauses to remove the single quotes. Potentially, however, you created the tables using case-sensitive identifiers and would need to use double-quotes to refer to the table name, i.e.

    SELECT *
      FROM "agency"
    

    Even less likely, you created the tables using case sensitive identifiers and included single quotes in the table name in which case you’d need both double-quotes and single quotes but that would be exceptionally odd

    SQL> create table "'agency'" (col1 number);
    
    Table created.
    
    SQL> select *
      2    from "'agency'";
    
    no rows selected
    

    If you’re not sure what the name of the table is, you can query the data dictionary

    SELECT owner, table_name
      FROM all_tables
     WHERE lower(table_name) like '%agency%';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two seperate databases, one is production the other is test. Before LINQ,
I have two databases, one is an MS Access file, the other is a
I have two SQL Server 2005 databases, one is for development and the other
I have two databases. My source looks like this: FirstTable ------ TestingData ----------- Test
I have two databases in SQL2k5: one that holds a large amount of static
We have two databases, in two separate locations. One of the databases resides in
I have a table and two databases which have the same table, but one
I have two MySQL databases for my site - one is for a production
I have two textboxes, one isfor 'program' and the other for 'description'. I have
I have two MS SQL 2005 servers, one for production and one for test

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.