Unix Technical Forum

ODBC " character issue

This is a discussion on ODBC " character issue within the Oracle Database forums, part of the Database Server Software category; --> I export an access table using Oracle ODBC driver to Oracle schema, it add character " to table name ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-25-2008, 08:06 AM
soalvajavab1@yahoo.com
 
Posts: n/a
Default ODBC " character issue

I export an access table using Oracle ODBC driver to Oracle schema,
it add character " to table name and all its column names like this

"ff_to_oracle"
(
ID VARCHAR2(20),
"empid" VARCHAR2(20),
"empname" VARCHAR2(50),
"empdept" VARCHAR2(20),
"create_date" DATE
)

and when I want to query the imported table in Oracle I have to say:

select * from "ff_to_otracle"


Is there anyway to get rid off " charater during the ODBC process?
Thanks for help

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-25-2008, 08:06 AM
Sybrand Bakker
 
Posts: n/a
Default Re: ODBC " character issue

On 15 Sep 2006 10:34:20 -0700, soalvajavab1@yahoo.com wrote:

>I export an access table using Oracle ODBC driver to Oracle schema,
>it add character " to table name and all its column names like this
>
>"ff_to_oracle"
>(
> ID VARCHAR2(20),
> "empid" VARCHAR2(20),
> "empname" VARCHAR2(50),
> "empdept" VARCHAR2(20),
> "create_date" DATE
>)
>
>and when I want to query the imported table in Oracle I have to say:
>
>select * from "ff_to_otracle"
>
>
>Is there anyway to get rid off " charater during the ODBC process?
>Thanks for help


There is:
Make sure ALL of your identifiers (table names, column names etc), are
in UPPERCASE prior to conversion.
So
FF_TO_ORACLE
(ID
EMPID
EMPNAME
EMPDEPT
CREATE_DATE

etc.

This is a known feature and has been documented here often. You could
have searched http://groups.google.com prior to posting.

--
Sybrand Bakker, Senior Oracle DBA
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-25-2008, 08:06 AM
soalvajavab1@yahoo.com
 
Posts: n/a
Default Re: ODBC " character issue

Thanks Sybrand, you are right, I try that and if the names and columns
are uppercase then ODBC behave fine
now my next question is, I already have bunch of tables in MS Access
which are not Uppercase and I need to tranfer them to Oracle without
the extra " charachter. Any thought to make all those tables and
columns uppercase at once or any other solution? Thanks again

Sybrand Bakker wrote:
> On 15 Sep 2006 10:34:20 -0700, soalvajavab1@yahoo.com wrote:
>
> >I export an access table using Oracle ODBC driver to Oracle schema,
> >it add character " to table name and all its column names like this
> >
> >"ff_to_oracle"
> >(
> > ID VARCHAR2(20),
> > "empid" VARCHAR2(20),
> > "empname" VARCHAR2(50),
> > "empdept" VARCHAR2(20),
> > "create_date" DATE
> >)
> >
> >and when I want to query the imported table in Oracle I have to say:
> >
> >select * from "ff_to_otracle"
> >
> >
> >Is there anyway to get rid off " charater during the ODBC process?
> >Thanks for help

>
> There is:
> Make sure ALL of your identifiers (table names, column names etc), are
> in UPPERCASE prior to conversion.
> So
> FF_TO_ORACLE
> (ID
> EMPID
> EMPNAME
> EMPDEPT
> CREATE_DATE
>
> etc.
>
> This is a known feature and has been documented here often. You could
> have searched http://groups.google.com prior to posting.
>
> --
> Sybrand Bakker, Senior Oracle DBA


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-25-2008, 08:06 AM
Sybrand Bakker
 
Posts: n/a
Default Re: ODBC " character issue

On 15 Sep 2006 11:56:27 -0700, soalvajavab1@yahoo.com wrote:

>Thanks Sybrand, you are right, I try that and if the names and columns
>are uppercase then ODBC behave fine
>now my next question is, I already have bunch of tables in MS Access
>which are not Uppercase and I need to tranfer them to Oracle without
>the extra " charachter. Any thought to make all those tables and
>columns uppercase at once or any other solution? Thanks again


Could probably be arranged by coding it in Access Basic (or whatever
it is called now) using DAO (or whatever it is called now), but my
Access Basic is really rusty.
On the Oracle side you'll probably can use dbms_redefinition, but I
have never had to use that myself.

Please do not top post.

--
Sybrand Bakker, Senior Oracle DBA
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-25-2008, 08:13 AM
Vince
 
Posts: n/a
Default Re: ODBC " character issue


Sybrand Bakker wrote:
> On 15 Sep 2006 11:56:27 -0700, soalvajavab1@yahoo.com wrote:
>
> >Thanks Sybrand, you are right, I try that and if the names and columns
> >are uppercase then ODBC behave fine
> >now my next question is, I already have bunch of tables in MS Access
> >which are not Uppercase and I need to tranfer them to Oracle without
> >the extra " charachter. Any thought to make all those tables and
> >columns uppercase at once or any other solution? Thanks again

>
> Could probably be arranged by coding it in Access Basic (or whatever
> it is called now) using DAO (or whatever it is called now), but my
> Access Basic is really rusty.
> On the Oracle side you'll probably can use dbms_redefinition, but I
> have never had to use that myself.
>
> Please do not top post.
>
> --
> Sybrand Bakker, Senior Oracle DBA


Here is a snippet. You will have to figure out how to exclude system
tables:

Public Sub setColumnNamesUpper()

Dim dbs As Database
Dim tdf As TableDef
Dim fld As Field

Set dbs = CurrentDb

For Each tdf In dbs.TableDefs

For Each fld In tdf.Fields
fld.name = UCase(fld.name)
Next fld

Next tdf

End Sub

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:59 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com