Thanks for your help.  This gives me something to go on.

 

 

Tom Schreck

972-361-9943


From: Seth Bienek [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 06, 2005 9:54 AM
To: [email protected]
Subject: RE: Oracle DB

 

Hey Tom,

 

The only schema that Oracle does not require a prefix for in SQL queries is the user's default schema.

 

In other words, if your username is bob and your default schema is bob and you have a table named users, you would not need to prefix a query on the users table when you are logged in as bob.

 

I believe Oracle has an option for changing the default schema for a user; you could change the default schema for the username in your DSN and you should be good to go.

 

Alternately, you could create a view under your default schema that points to the table in another schema, and then access the view without a prefix from your 'home schema'.

 

Hope this helps.  Lemme know if I should elaborate on anything.

 

Seth

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Schreck, Tom
Sent: Thursday, January 06, 2005 9:44 AM
To: [email protected]
Subject: OT: Oracle DB

My background is SQL Server and I’m now working with ORACLE.  The codebase I’m working with has queries that reference tables using schema.tablename.  The queries do not work without the schema prefix.  In SQL world, I never used a prefix for my table names in the SQL syntax.  Is there a setting someplace in ORACLE I can set to not use schemas in SQL statements?  If I have to use the schema name in my queries to reference a table, then I see an issue if I need to use my code against a different database.  It’s been my assumption that the datasource removes the need for using a schema table prefix.  I know I could put the schema in a variable and use the variable in all of SQL queries, but I do not like that solution.  Any ideas?

 

 

Thanks

 

Tom Schreck

Applications Developer

Dresser, Inc.

15455 Dallas Parkway, Suite 1100

Addison, TX  75001-4690

972-361-9943

[EMAIL PROTECTED]

 

 

 

 

<<attachment: image001.jpg>>

Reply via email to