How to reference table/view that has "slashes" in its name!

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alex

    How to reference table/view that has "slashes" in its name!

    I'm new to Oracle, so this question may sound silly. I have been given a
    list of Oracle tables (they may be views, I'm not sure) that are available
    to me. I can run simple SQL select statements against most of them in SQL
    Plus. But some of them have "slashes" in their names such as /XYZ/CUSTOMERS
    or /XYZ/ADDRESSES . When I try to use the name the way it's listed (with
    slashes) I get an error. I even tried replacing the slashes with dots, but
    that didn't work either. My question is how do I reference a table/view (in
    a SQL select statement for instance) that has slashes in its name. I'm not
    sure if this is relevant, but I think the Oracle database runs on a Unix
    box. Thanks in advance.

    Alex


  • TC

    #2
    Re: How to reference table/view that has "slashes&q uot; in its name!

    "/XYZ/ADDRESSES"

    /tc

    "Alex" <sh2222@yahoo.c omwrote in message
    news:9yf_a.1877 07$xg5.28800@tw ister.austin.rr .com...
    I'm new to Oracle, so this question may sound silly. I have been given a
    list of Oracle tables (they may be views, I'm not sure) that are available
    to me. I can run simple SQL select statements against most of them in SQL
    Plus. But some of them have "slashes" in their names such as
    /XYZ/CUSTOMERS
    or /XYZ/ADDRESSES . When I try to use the name the way it's listed (with
    slashes) I get an error. I even tried replacing the slashes with dots, but
    that didn't work either. My question is how do I reference a table/view
    (in
    a SQL select statement for instance) that has slashes in its name. I'm not
    sure if this is relevant, but I think the Oracle database runs on a Unix
    box. Thanks in advance.
    >
    Alex
    >
    >

    Comment

    • Billy Verreynne

      #3
      Re: How to reference table/view that has &quot;slashes&q uot; in its name!

      "Alex" <sh2222@yahoo.c omwrote
      I'm new to Oracle, so this question may sound silly. I have been given a
      list of Oracle tables (they may be views, I'm not sure) that are available
      to me. I can run simple SQL select statements against most of them in SQL
      Plus. But some of them have "slashes" in their names such as /XYZ/CUSTOMERS
      or /XYZ/ADDRESSES . When I try to use the name the way it's listed (with
      slashes) I get an error.

      SQLcreate table "ABC/def" ( x char(1) );

      Table created.

      SQL select * from "ABC/def";

      no rows selected


      --
      Billy

      Comment

      • Prashant

        #4
        Re: How to reference table/view that has &quot;slashes&q uot; in its name!

        Hi Alex,
        Try this :

        /XYZ/CUSTOMERS ----------- "/XYZ/CUSTOMRRS"

        like wise all..
        to remove meaning of special characters use " "..but write other
        characters in capitals only ..

        Prashant.
        "Alex" <sh2222@yahoo.c omwrote in message news:<9yf_a.187 707$xg5.28800@t wister.austin.r r.com>...
        I'm new to Oracle, so this question may sound silly. I have been given a
        list of Oracle tables (they may be views, I'm not sure) that are available
        to me. I can run simple SQL select statements against most of them in SQL
        Plus. But some of them have "slashes" in their names such as /XYZ/CUSTOMERS
        or /XYZ/ADDRESSES . When I try to use the name the way it's listed (with
        slashes) I get an error. I even tried replacing the slashes with dots, but
        that didn't work either. My question is how do I reference a table/view (in
        a SQL select statement for instance) that has slashes in its name. I'm not
        sure if this is relevant, but I think the Oracle database runs on a Unix
        box. Thanks in advance.
        >
        Alex

        Comment

        • TurkBear

          #5
          Re: How to reference table/view that has &quot;slashes&q uot; in its name!

          "Alex" <sh2222@yahoo.c omwrote:
          >I'm new to Oracle, so this question may sound silly. I have been given a
          >list of Oracle tables (they may be views, I'm not sure) that are available
          >to me. I can run simple SQL select statements against most of them in SQL
          >Plus. But some of them have "slashes" in their names such as /XYZ/CUSTOMERS
          >or /XYZ/ADDRESSES . When I try to use the name the way it's listed (with
          >slashes) I get an error. I even tried replacing the slashes with dots, but
          >that didn't work either. My question is how do I reference a table/view (in
          >a SQL select statement for instance) that has slashes in its name. I'm not
          >sure if this is relevant, but I think the Oracle database runs on a Unix
          >box. Thanks in advance.
          >
          >Alex
          >
          In addition to all the good advice you have been given about using " " to enclose the badly formed name, speak to the DBA who
          created such a non-compliant piece of S*** .
          There is no reason to make users jump through hoops because of a lack of Oracle knowledge - If it was a purchased app that
          did it, ask for your money back - who knows what other non-standard stuff may be hidden in the coding.

          Comment

          • Alex

            #6
            Re: How to reference table/view that has &quot;slashes&q uot; in its name!

            Thank you all for your help. I've tried your suggestions (double quotations,
            caps, etc) but none seem to work. I think I'll try to find the person who
            created these objects and see if he has a solution.

            Thanks again,

            Alex

            "Alex" <sh2222@yahoo.c omwrote in message
            news:9yf_a.1877 07$xg5.28800@tw ister.austin.rr .com...
            I'm new to Oracle, so this question may sound silly. I have been given a
            list of Oracle tables (they may be views, I'm not sure) that are available
            to me. I can run simple SQL select statements against most of them in SQL
            Plus. But some of them have "slashes" in their names such as
            /XYZ/CUSTOMERS
            or /XYZ/ADDRESSES . When I try to use the name the way it's listed (with
            slashes) I get an error. I even tried replacing the slashes with dots, but
            that didn't work either. My question is how do I reference a table/view
            (in
            a SQL select statement for instance) that has slashes in its name. I'm not
            sure if this is relevant, but I think the Oracle database runs on a Unix
            box. Thanks in advance.
            >
            Alex
            >
            >

            Comment

            • Daniel Morgan

              #7
              Re: How to reference table/view that has &quot;slashes&q uot; in its name!


              Billy Verreynne wrote:
              "Alex" <sh2222@yahoo.c omwrote in message
              >
              Thank you all for your help. I've tried your suggestions (double quotations,
              caps, etc) but none seem to work. I think I'll try to find the person who
              created these objects and see if he has a solution.
              >
              Alex, the solution *is* double quotes.
              <snipped>
              You are correct of course ... but the real solution is to find the person that
              came up with this naming and send them back to take Computer Science 100. There is
              no excuse for using slashes in object names.

              --
              Daniel Morgan

              damorgan@x.wash ington.edu
              (replace 'x' with a 'u' to reply)


              Comment

              Working...