ORACLE (Build) Query problem


Author
Message
Ertan Deniz
Ertan Deniz
StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)
Group: Forum Members
Posts: 163, Visits: 493
I've executed object.FillByPrimaryKey on ORACLE database. (

I've got the query by setting debug-on feature.

The query :

SELECT "id", "group_id", "base_message_id", "type", "state", "inserted_user_id", "insert_date" FROM "dbo"."sn_srv_messages" WHERE id IN (TongueARAM0)  

After the query was executed, "ORA-00942: table or view does not exist." Error.

After I 've cleared the "" characters and run the query on a DB tool like SQLNavigator, the Query was succesfully executed.

Why does strataframe fail to run the query ? Why are "" characters generated by the framework ? 

Note : I've run the same query with object.FillDataTable. The operation is also successful.

Replies
Ertan Deniz
Ertan Deniz
StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)
Group: Forum Members
Posts: 163, Visits: 493
One thing to make it clear ;

Quotes in the from part of SQL cause (From "dbo".sn_srv_messages") "table or view does not exist" message. If I remove the quotes then quotes in the selected fields part of the sql causes error. 

Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
A quoted identifier is setup in Oracle (or SQL Server or any other database) that allow you to have identifiers (table names, column names, index names) that break the rules for names of such things (which is specific to the DBMS your using, Oracle in this case). This could be the case if you want spaces in names or want to use a reserved name for something. Dusting is just saying that by default, Oracle uses double quotes to quote an identifier in this way. This normally is a nicety that allows you more freedom (and typically less errors) when dealing with tables. Personally, I think using reserved names for identifiers is a bad idea, so I never use quoted identifiers, but that is not always an option. In any case, check out this link for more info:



http://download.oracle.com/docs/cd/B10500_01/server.920/a96540/sql_elements9a.htm



I looked a bit on Google but couldn't find out how to configure this for a database. Unsure
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search