Re: v$abc.. table names - nightmare
From: Mark D Powell <Mark.Powell2_at_hp.com>
Date: Tue, 17 May 2011 09:55:45 -0700 (PDT)
Message-ID: <a501b200-56f6-44a5-9fef-281110d17027_at_35g2000prp.googlegroups.com>
On May 17, 9:49 am, neilsolent <n..._at_solenttechnology.co.uk> wrote:
> On May 17, 1:19 am, Noons <wizofo..._at_gmail.com> wrote:
>
> > On May 17, 3:55 am, neilsolent <n..._at_solenttechnology.co.uk> wrote:
>
> > > Why oh why did Oracle decide to make table names with special symobols
> > > in them, like v$database?
> > > This makes it a nightmare in shell scripts wrapping sqlplus for
> > > example!
> > > Try writing a shell script that su's to oracle and executes sqlplus to
> > > get data from v$database..
> > > Is there any workaround to avoid the dollars, such as aliases?
>
> > > thanks,
> > > Neil
>
> > backslash (\) is your friend.
>
> Yes but it's not just as simple as one backslash.
> My Perl script is calling sqlplus via su (to switch to Oracle) - 7
> backslahses needed v\\\\\\\$database !!
> Try it and see.. that's what I mean by a nightmare.
> If they could just refrained from naming tables with $ symbols.. :-)
>
> I could just put the script in a file, but not very neat.
> Using other tools means other problems - more dependencies to cater
> for.
> Oh well, thanks anyway..
Date: Tue, 17 May 2011 09:55:45 -0700 (PDT)
Message-ID: <a501b200-56f6-44a5-9fef-281110d17027_at_35g2000prp.googlegroups.com>
On May 17, 9:49 am, neilsolent <n..._at_solenttechnology.co.uk> wrote:
> On May 17, 1:19 am, Noons <wizofo..._at_gmail.com> wrote:
>
> > On May 17, 3:55 am, neilsolent <n..._at_solenttechnology.co.uk> wrote:
>
> > > Why oh why did Oracle decide to make table names with special symobols
> > > in them, like v$database?
> > > This makes it a nightmare in shell scripts wrapping sqlplus for
> > > example!
> > > Try writing a shell script that su's to oracle and executes sqlplus to
> > > get data from v$database..
> > > Is there any workaround to avoid the dollars, such as aliases?
>
> > > thanks,
> > > Neil
>
> > backslash (\) is your friend.
>
> Yes but it's not just as simple as one backslash.
> My Perl script is calling sqlplus via su (to switch to Oracle) - 7
> backslahses needed v\\\\\\\$database !!
> Try it and see.. that's what I mean by a nightmare.
> If they could just refrained from naming tables with $ symbols.. :-)
>
> I could just put the script in a file, but not very neat.
> Using other tools means other problems - more dependencies to cater
> for.
> Oh well, thanks anyway..
If you are using Perl why not use the perl database interface to Oracle? That would allow you to avoid the shell environment and eliminate the need to escape so much.
I also dislike Oracle use of the dollar and pound sign in table and column names but I have learned to live with an occassional backslash, using script files, and having to mask output files that use object name for dollar signs.
HTH -- Mark D Powell -- Received on Tue May 17 2011 - 11:55:45 CDT