Selecting a table, view, synonym

Hi,
If I have a table, view and synonym with the same name,
which object gets selected in a select table............

Please check the following script --
satyaki>
satyaki>create table test_user559765
  2     as
  3       select empno,ename
  4       from emp;
Table created.
satyaki>
satyaki>
satyaki>desc test_user559765;
Name                                      Null?    Type
EMPNO                                              NUMBER(4)
ENAME                                              VARCHAR2(10)
satyaki>
satyaki>
satyaki>set lin 1000
satyaki>
satyaki>select * from test_user559765;
     EMPNO ENAME
      7369 SMITH
      7499 ALLEN
      7521 WARD
      7566 JONES
      7654 MARTIN
      7698 BLAKE
      7782 CLARK
      7788 SCOTT
      7839 KING
      7844 TURNER
      7876 ADAMS
     EMPNO ENAME
      7900 JAMES
      7902 FORD
      7934 MILLER
      9898 Erwin
      7006 Gopal
16 rows selected.
satyaki>
satyaki>
satyaki>create or replace view test_user559765
  2     as
  3       select empno,sal
  4       from emp;
     from emp
ERROR at line 4:
ORA-00955: name is already used by an existing objectNow, you tell me how do you create one table & view with the same name?
Regards.
Satyaki De.

Similar Messages

  • How can I create a Table View in Cocoa Applescript?

    This is my last resort. I've searched for days and only found tutorials for iPhone and Cocoa, and I have no idea where to start. I'm looking for a way to create a Table View, and fill it with a few cells that call a handler when clicked. I've looked through the Xcode help, the Apple documentation, and countless tutorials, and I don't know what to do. I'm sure what I'm asking is possible, because usually what is possible in Cocoa is possible in Cocoa-Applescript.
    Perhaps something like:
    myTableView's addCell_OfType_WithHandler("This is a text cell", text, "myHandler:")
    I would appretiate any responses and brief descriptions on the matter.

    You did not answer my first question, which was not an idle question. I'll answer here, but if cross-chatter appears in a different thread I'll ignore it. You'll have to keep track of the mess yourself.
    Apple_For_The_Win wrote:
    At this point, I've dragged a Table View onto my window, in Xcode. I've connected it to the value "myTableView", and that's where I need help. I'm specifically trying to add cells into the table view.
    I'll assume that 'connected it to the value "myTableView"' means that you've control-dragged in XCode from the table view in Main Menu.xib to a property in your applescript app delegate called myTableView. If that's not the case, please correct me.
    I prefer to use an array controller for this, so please drag an array controller object into main menu.nib. once you've done that, do the following:
    open the applescript app delegate and add a new property called "tableController"
    select the table view in the object list (you may need to open some disclosure triangles to reach it). and add appropriate (an) column name(s). you can hide column titles later if you like, but having named columns makes life easier.
    select the array controller in the object list
    rename the array controller "table data"
    open the attributes inspector, and then add the column name(s) as key(s) in the object controller area
    open the bindings inspector, and where it says "controller content", open the disclosure arrow and bind the content to the App Delegate object on the model key path self.tableController
    select the table view in the object list again, then go down a level and select each column in turn
    for each column, open the bindings inspector, and where it says "value", open the disclosure arrow and bind the content to the Table Data object with the controller key arrangedObjects model key path being the name of the column (which is the name of the key in the controller as well)
    back in the applescript app delegate, add code like the following:
      -- create a list of records, where each record represents a row and the column name is the record key
      set myData to {{column_1_name:"hello"}}
      -- convert it to an NSArray and add it to the controller content. don't forget the *my* keyword, or it won't work
      set my tableController to NSArray's arrayWithArray:myData
      -- may or may not be needed
      myTableView's reloadData()
    That should populate the table with simple text. if you want something more complicated (like buttons or links) then create the more complicated elements separately and add them to the data.

  • Help Needed regarding to Table View Control

    Hi Abapers
    In Table View Control which property or system variable keeps the user selected row's row id.
    Situation is that user enters many records into sales details table view. Table view contains the fields, productid product no qty discount and rate. Suppose user wants to delete one particular record(sales details) from that table view while entering this sales details .here i want to know which is that particular row that the user selected. Table views which property keeps this row no information. i am very glad if you people give me more information abount table View Controls .
    With regards
    Anoop.

    Hello Anoop,
    post your questions in the correct forums and you can hope to get a better answer. This forum as you see is the suggestions and comments forum and not the ABAP forum.
    Sameer

  • Table Views - Referencing data rows

    I have a table view set up where files are selected from a path and placed into the table and reordering. This works fine. However, I need to now perform other tasks on those files (in the order that they now exist in the table) and I don't know how to reference and call data source. Part of my script:
    else if name of theObject = "choose" then
    set theFolder to choose folder with prompt "Choose the folder containing the files" default location (path to desktop) without invisibles
    tell application "Finder"
    set theFiles to every file of theFolder
    set theTableViewContents to {}
    repeat with aFile in theFiles
    tell aFile to set end of theTableViewContents to {its name, it as text}
    end repeat
    end tell
    tell window "merger"
    set content of table view 1 of scroll view 1 to theTableViewContents
    end tell
    end if
    set allows reordering of table view 1 of scroll view 1 of window "merger" to true
    set allows multiple selection of table view 1 of scroll view 1 of window "merger" to true
    ===============
    Prior to setiing up a table, a typical task was initiated immediately after the files were selected. One of the scripts:
    tell application "Finder" to set files_ to files of folder_ as alias list -- *this now needs to reference the updated contents of table - folder_ no longer exists*
    --set files_ to items 1 thru 2 of files_
    try
    set file_ref to open for access output_ with write permission
    repeat with file_ in files_
    set text_ to read file_
    write (text_ & return) to file_ref starting at eof
    end repeat
    try
    close access file_ref
    end try
    on error e
    display dialog e
    try
    close access file_ref
    end try
    end try
    Thanks so much.

    Hi friend,
    To import a view follow nexts steps on administration tool:
    - File -> import -> from database
    - Select correct connection type (at the same way when you import a table).
    - Enter correct user and password.
    - Go to correct schema which contain data base elements.
    - Select check box "Views". Now it will appear views created in that schema.
    Good luck.

  • Help Needed on Table View Control

    Hi Abapers
    In Table View Control which property or system variable keeps the user selected row's row id.
    Situation is that user enters many records into sales details table view. Table view contains the fields, productid product no qty discount and rate. Suppose user wants to delete one particular record(sales details) from that table view while entering this sales details .here i want to know which is that particular row that the user selected. Table views which property keeps this row no information. i am very glad if you people give me more information abount table View Controls .
    With regards
    Anoop.

    You would have to use the outbound plugs to transfer data from your component to the other component. Here you have a parameter IV_DATA_COLLECTION. Fill the entries you want to fill here.
    Check the Sold to Party pop up while creating Quotation for Sales cycle when you log in with SALESPRO.
    Regards
    Kavindra
    Edited by: joshi_kavindra on Nov 23, 2011 5:03 PM

  • Tables/views/Procedures/functions etc are not showing up in tree view, but can execute select * on dba_objects (can view in DBVisualizer)

    There was one other thread from years ago detailing this same problem. The only clue was to check whether select all privs were enabled for the user on dba_objects. They are for the user accessing the system. In fact, all tables/views/procs/funcs can be viewed in the tree view of DBVisualizer.  For whatever reason, OSD does not show anything.
    I'd appreciate any clues! Thank you!
    OSD Version  Version 4.1.0.18
    OS: Windows 7/64
    Java: 1.8.0
    Connecting to Oracle 11g 11.2.0.3.0

    Thank you, Gary.
    I updated the post with the version info. I did not explicitly install this JDBC driver, so whatever the OSD came with?  Unless it is using whatever is installed on my machine, in which case would be the thin driver.
    I did check out that post, and I appreciate you sharing it. I did click the 'include synonyms' filter, but behavior remained unchanged.
    I would prefer to use OSD, and that is what our dev team was expecting to use, but we just can't see the information.  We are using an ID that does not 'own' those tables, per se.  But, why would DBVisualizer show these tables, when OSD does not?

  • How to select a row in a single-select table view?

    Hello folks,
    I have a table view with a 'details' button. When a row is selected and 'details' is pressed, the table view disappears and a form view is displayed (like the toggle button in PCUI). I have implemented this using a navigation link. When I press 'cancel' in the form view, another navigation link takes the user back to the table view.
    My problem is, when the table view reappears, there is no row selected (the row that was selected previously, is de-selected). How do I make sure that the row remains selected?
    I tried using the collection_wrapper->mark() method in the inbound plug of the table view, but it works only for multi-select table.

    Hi Masood,
    Thanks for your reply.
    I had already tried using MARK ( iv_index = lv_index ), but it did not work because the first statement in the MARK method is
      check ME->MULTI_SELECT = ABAP_TRUE.
    Mine is a single-select table. So, using the MARK of the iterator object, with either the IV_BO or the IV_INDEX parameter also does not work. Is there any other way for a table with single row selection?
    Thanks!!!
    Rohan.

  • Can you select the row in a table view without highlighting the cell?

    I have an an app with a table view which is presented modally. Cell selections in this table are saved in the parent controller so that they can be reselected if the table is reloaded after being dismissed.
    When the cell is first highlighted, I want to momentarily highlight the cell and have it fade out, which I do by unselecting the cell from the modal view controller's didSelectRowAtIndexPath by calling setSelected:animated on the table view cell.
    However, when I present the table view controller modally again and want to display the previously selected cell as selected, I don't want the cell background to be highlighted, and I'm having trouble doing this.
    In order to make sure the table view knows the cell is selected, I am calling selectRowAtIndexPath. I need to make sure the cell is selected so that I can set/unset the cell's accessoryType. However, this has the sideeffect of highlighting the cell too, which looks weird and confusing to the user.
    I've tried things like temporarily setting the cell's selection style to none, but while that stops the cell background from highlighting? I've tried setting the selectionStyle to UITableViewSelectionStyleNone, but while this prevents the cell background from highlighting, the cell text still changes to white, so it the text is invisible against the white background.
    Is there a easy way of setting a cell to selected in the table view without also changing the highlight and text colour of the actual cell? Immediately setting the cell to be unselected still makes the highlight visible for a split second.

    I tried that, but setting the highlighted property doesn't seem to affect it.
    I figured out how what I was doing wrong though. I was setting selection style UITableViewSelectionStyleNone, selecting the cell, then setting the selection style back to whatever it had previously been. This causes the background not to draw highlighted, but the text and accessory type to still draw highlighted.
    In order to fix this, I moved the code to set the cell selection style to whatever it had previously been to the didDeselectRowAtIndexPath method.

  • How to SELECT ALL records of a TABLE VIEW in the BSP page

    Hi All,
    In the BSP portal, I am displaying some data(multple records) in the form of a table using the BSP TAG <htmlb:tableView>. I wrote the logic in the 'VIEW' of the BSP application which will be triggered by the controller. I have used the attribute selectionMode = "MULTISELECT" to have a Check Box to select a row.
    My requirement is to have a button/checkbox on the first column of the header of the table view. By clicking on this, it should select/desect all the records of the table. Could someone please help me how to do this? What attribute I should use in the tableview to get the button in the header row of the table and how to select all the records of the table.?
    Please provide your valuable inputs.
    Thanks & Regards,
    Paddu.

    Select all / Deselect all functionality when onRowSelection is there

  • To determine the number of rows selected in a table view (BSP)

    Hi,
    My requirement is:
    I would be selecting 1 row from a table view ( which is made multiselect for another requirement) , and press a button.
    The functionality of button is to open a popup window based on the row selected.
    I want to display an error message if more than 1 row is selected, and button is clicked.
    Message will say that "you cannot select more than 1 row".
    For this,  I need to know how I can get the number of selected rows in a table view.
    I tried using the below code.
    But I feel this will work only in DO_HANDLE_DATA method.
    The popup would open, even before control comes in this method.
      CALL METHOD cl_hrrcf_iterator=>get_tv_index
        EXPORTING
          p_id               = p_tableview_id
          pt_form_fields = table_form_fields
        IMPORTING
          pt_indices      = sel_row_index_tab.
    Could you please provide me with a solution.
    Quick replies will be highly appreciated.
    Thanks,
    Nisha Vengal.

    Hi ,
    Your TV :
    <htmlb:tableView id              = "tv1l"
                                   design          = "alternating"
                                   visibleRowCount = "10"
                                   fillUpEmptyRows = "true"
                               onRowSelection  = "MyEventRowSelection" <----This is the event you have to use
                                   selectionMode   = "MULTILINEEDIT"
                                  filter          = "SERVER"
                                   table           = "<%= some table %>" >
    in DO_REQUEST:
    DATA:  tv                  TYPE REF TO cl_htmlb_tableview,
           tv_event          TYPE REF TO cl_htmlb_event_tableview ,
           event             TYPE REF TO if_htmlb_data.
    event = cl_htmlb_manager=>get_event( request ).
    IF event IS NOT INITIAL AND event->event_name = htmlb_events=>tableview.
      tv_event ?= event.
      CASE event->event_server_name.
        WHEN 'MyEventRowSelection'.
    count = count + 1 .
    if count ne 1 .
    errmsg = 'Your message'.
    endif.
    ENDCASE.
    ENDIF.
    in View/Layout:
    <% if errmsg is not initial. %>
    <s cript t y p e   =   t e x t / j a v a s c r i p t >
    a l e r t ("<%= errmsg %>") .
    </ s c r i p t>
    <% clear errmsg. %>
    <% endif. %>
    errmsg is a class attribute of type string and count is also a class attribute of type c .
    Regards,
    Anubhav.
    Reward if useful
    Edited by: Anubhav Jain on Sep 19, 2008 3:08 PM

  • Can ResultSetMetaData() return the table name if it is selected from a view

    hi all
    can anyone tell me if ResultSetMetaData() can return the name of the table if it is selected from a view? thanks, i tried and it didn't return nothing. is it because the view is treated differently than table in ResultSetMetaData?

    hi all
    can anyone tell me if ResultSetMetaData() can return
    the name of the table if it is selected from a view?
    thanks, i tried and it didn't return nothing. is it
    because the view is treated differently than table in
    ResultSetMetaData?I would say "no". A view could be a multi-table join query, or maybe even a no-table query. The bigger picture I think though, is that you shouldn't need to know what the underlying table(s) were for this query - smells of a mis-design.

  • Capture the rows selected in a multiselect table view (BSP)

    Hi,
    My requirement is:
    I have a table view in which I can select multiple rows.
    I will be selecting some rows, and pressing a button.
    Functionality of button is written in Javascript, to open a popup window.
    But how will I capture which all rows were selected ?
    Should I use a Java code or ABAP code ?
    And where should I put that code ?
    I tried calling the method cl_hrrcf_iterator=>get_tv_attr in the Javascript of the button. But it doesnt work. But if its in DO_HANDLE_DATA it works. Why is it like that ?
    Is it possible in BSP, to use the function htmlbevent.obj.getSelectedRows() ? If so, how should the code be ?
    Could you please tell me some of the possible solutions.
    Would definitely appreciate quick replies.
    Thanks,
    Nisha Vengal.

    Hi Nisha,
    You can have the ABAP code itself. I had also faced with then same issue. Use the below piece of code form your requirements.
    In *IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_ROW_START*
    *  Data : M_ROW_REF type <Structure type>
    *m_row_ref ?= p_row_data_ref*
    In *IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START*
    * DATA : CHK TYPE FLAG
    *case p_column_key.*
       when ' <Column Name>'.*
         CHK = m_row_ref-><Column Name>.*
          p_replacement_bee = CL_HTMLB_CHECKBOX=>FACTORY(
                                id                = p_cell_id
                              checked         = CHK ).
    In *Do Request*
    Data : loc_table_event type ref to cl_htmlb_event_tableview
    call method cl_hrrcf_iterator=>get_tv_attr
        exporting
          p_tv_id               = '<Tabe View ID'
          p_component_id        = me->component_id
          po_request            = me->request
        importing
          po_tv_event           = loc_table_event.
    The above methods are used to get the values which are selected in the table view and operated further.
    Reward points if useful.
    Regards,
    Gokul.N

  • In table view, how to add one button for selecting page?

    Hi Experts,
    In the OBIEE 11.1.1.6, we have one uncommon requirement that customers want to randomly select actual page to view expected data in table view.
    For example:
    We make use of some columns to create one report in table view, and set 'Rows per Page' equal to '5',
    if this report contains 60 rows, it will have 12 pages, so customers want to select sepcial page number to view the some data. Is it possible to implement this requirement? Maybe we should write JS code.
    Note: Below table view, it has four buttons: First Row, Previous Row, Next Row and Display (500) rows in per page. So we want to add one button to select per page.
    We look at orgnial codes in WebBrowse, but do not know the following codes derive from which JS file.
    Could you please tell me how to find this file?
    <td class="TapeDeckCell"><img class="TapeDeckImage" onclick="" onkeypress="" src="res/s_blafp/viewui/pivot/first_dis.png" title="" alt="" ><img class="TapeDeckImage" onclick="" onkeypress="" src="res/s_blafp/viewui/pivot/previous_dis.png" title="" alt="" ><img class="TapeDeckImageEna" onclick="PTRowScroll('saw_5083_b','5','5', event)" onkeypress="PTRowScroll('saw_5083_b','5','5', event)" src="res/s_blafp/viewui/pivot/next_ena.png" tabIndex="0" onmouseover="PTTD(event, 'res/s_blafp/viewui/pivot/next_ovr.png');" onmouseout="PTTDO(event)" onmousedown="PTTD(event, 'res/s_blafp/viewui/pivot/next_dwn.png');" title="Next 5 Rows" alt="Next 5 Rows" ><img class="TapeDeckImageEna" onclick="*PTRowScroll*('saw_5083_b','-1)', event)" onkeypress="PTRowScroll('saw_5083_b','-1)', event)" src="res/s_blafp/viewui/pivot/showallrows_ena.png" tabIndex="0" onmouseover="PTTD(event, 'res/s_blafp/viewui/pivot/showallrows_ovr.png');" onmouseout="PTTDO(event)" onmousedown="PTTD(event, 'res/s_blafp/viewui/pivot/showallrows_dwn.png');" title="Display maximum (500) rows per page" alt="Display maximum (500) rows per page" > <Span class="TapeDeckRecords">Rows 1 - 5</Span></td>

    Hi Kobe,
    Thanks for listening me.
    I agree 11g have some issues unlike 10g. I've tried the same by creating a measure rcount(1) and name it as Page in RPD. I just pulled column Page in pivot table section 'Pivot Table Prompts' it is working but this may not answer your requirements.
    I would suggest to use the column in Prompt and go by between operator to allow user to select the rows between.
    In the report make Page as prompted.
    If you are okay with this can look forward to tweak it further, like values in the prompt multiple of 5 or 10s some thing like that.
    let me know updates on the same.

  • Deny user from seeing/selecting from tables but allow access to certain view

    Need some assistance. I have a database on SQL Server 2008 R2. Using windows authentication and a custom group, I control who can access the database and serve up the data via a web application.
    I now have a requirement to allow users to connect to the data using Power Pivot, but do not want to allow users to see all tables/views, I want explicitly control what they see.
    How do  I lock everything down so that users can still view the data from a defined view but limit access to the other tables and views ?
    In essence, my users should not be able to see/select from any of the tables or views except for a specific view that I want them to have access to.
    Thanks

    If the View and the Table are in the same database and have the same owner, then a user who has SELECT permission on the View does not require any permissions on the table.
    See
    Ownership Chains
    David
    David http://blogs.msdn.com/b/dbrowne/
    http://blogs.msdn.com/b/dbrowne/

  • Is selecting from a view more efficient than selecting from multiple tables

    Hi heres the problem
    Lets say i created a view from 2 tables (person and info). both have a ID column
    create view table_view (age,name,status,id) as
    select a.age, a.name, b.status, b.id
    from person a, info.b
    where a.id=b.idif i want to select a given range of values from these 2 tables which of the following queries would be more effective.
    select a.age, a.name, b.status, b.id
    from person a, info.b
    where a.id=b.id
    and a.id <1000
    select age, name, status, id
    from table_view
    where  id <1000

    Bear in mind that this concept of views storing the SQL text is something relative to Oracle databases and not necessarily other RDBMS products. For example, Ingres databases create "views" as tables of data on the database and therefore there is a difference between selecting from the view and selecting from the base tables.
    Oracle also has "materialized views" which differ from normal "views" because they are actually created, effectively, as tables of data and will not use the indexes of the base tables.
    In Oracle, you cannot create indexes against "views" but you can create indexes against "materialized views".

Maybe you are looking for

  • Can iPhone Mail redirect mail to subfolders like the Apple desktop Mail app

    In my Mail app on my computer, I have Rules set up so that certain emails from various people get moved to a few different subfolders I have set up. However, in my iPhone, they all come to my primary email address. Is there any way to make iPhone mai

  • Problems uploading new prompt in AutoAttendant UC520

    Hi, I have a problem uploading a new recording promt THe elements are UC520 CCA 1.9 300M available in flash Windows 7 The wav file is about 20 sec and 170K The link is excelent (remote configruation with a great BW) I am configuring the AA from the C

  • CAN'T INSTALL AIRPORT 561 ON ML 10.8

    I got the old one Airport 802.11 b/g can't install the app airport 561 on ML 10.8

  • IPod Broke /3

    help me please! when i turn on my ipod shows only Apple icon and continuous loading...after 2mins it shut downs and doest it again.. i tried restore but it always turns off. T_T what should i do?

  • Testing UGR in Dynamic Actions

    Hi SAP Gurus! I need to test the UGR parameter of the user that is performing a dynamic action, f.e. I want to perform the dynamic INS of an IT only if UGR <> '90'. Can I do this without using features? Thank you very much, regards. Stefano