Home Forums SQL Server 2005 SQL Server Newbies SQL inner join: ORA-00904: "Bonus.site_name": invalid identifier? RE: SQL inner join: ORA-00904: "Bonus.site_name": invalid identifier?

  • In Oracle, Each Object can have double quotes. that means the table can have quotes, and it's column names can have quotes...but you can't wrap them all in-one..they each get their own.

    so "Bonus"."site_name" is correct, but "Bonus.site_name" is not...it implies a single object that happens to have a period in it's name.

    --Oracle

    SELECT *

    FROM "Poker_Site" INNER JOIN "Bonus"

    ON "Poker_Site"."site_name" = "Bonus"."site_name";

    --SQL equivilent

    SELECT *

    FROM [Poker_Site] INNER JOIN [Bonus]

    ON [Poker_Site].[site_name] = [Bonus].[site_name];

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!