Prompt filters, how to select by name, but do query by Id?

Hi,
I have a prompt list, I'm displaying the names of the values, but I want to query by Id, is that possible? My query is taking too much time, because it's comparing the names.
For example I have:
Name    Id
John      23
Mary      25
Tom       28
etc...
In the prompt list I have the names (John, Mary, Tom,etc) I want to keep these name in the prompt list, but in the query I want to compare by Id.
Thanks,
Marcela

Hi Arm,
Thanks for responding.
I'm not getting the data.
I have Country_Code and Country_Name, I changed Country_Code dimension in the Edit tab, I added Country_Name in Country_Code.
Then I changed the prompt filter to use Coutry_Code like this:
@Select(Country Region\Country Code) IN @Prompt('1b.Enter the country','A','Country Region\Country Code',Multi,Constrained) OR 'ALL' IN @Prompt('1b.Enter the country','A','Country Region\Country Code',Multi,Constrained)
But in the query I'm getting:
AND
   ( ( COUNTRY_CODE ) IN ('Australia','Brazil','Costa Rica') OR 'ALL' IN ('Australia','Brazil','Costa Rica'))
I'm not getting the data because those are Country_Names not Country_codes.
Any idea?
Thanks,
Marcela

Similar Messages

  • How to select Subpartition name in a Select query?

    Hi,
    I have a table that is partitioned on date range and subpartitioned based on and ID list. Lets assume the table name is something like: MY_TABLE
    The partition name would look like: P_20110126160527
    The subpartition list is as follows: GB, IN, AU, US etc. The sub partition name for GB would look like
    P_20110126160527_GB
    I need to run a select query to fetch data from MY_TABLE along with Sub partition name. The result set needs to look like:
    Name|Location|SubPartition
    Sam|UK|P_20110126160527_GB
    Tom|UK|P_20110126160527_GB
    Dave|AU|P_20110126160527_AU
    The data available in ALL_TAB_SUBPARTITIONS and USER_TAB_SUBPARTITIONS can't be used just because the only join condition available is the TABLE Name but we would also have to join on SUBPARTITION KEY. I am not sure how to achieve this.
    Does anyone here have a clue?

    In a pinch, you could do something like this.
    select col1, col2, col3, 'PARTITION_1' from your_table where key_col in <values for partition_1>
    union all
    select col1, col2, col3, 'PARTITION_2' from your_table where key_col in <values for partition_2>
    union all
    select col1, col2, col3, 'PARTITION_3' from your_table where key_col in <values for partition_3>
    union all
    ...Or better yet:
    select col1, col2, col3, case when key_col = 'x' then 'PARTITION_1'
                                  when key_col = 'y' then 'PARTITION_2'
                                  when key_col = 'z' then 'PARTITION_3'
                             end
    from ...Of course, none of these would be "dynamic".

  • How to select Max in a multi query?

    Hi all,
    I got this query:
    select DEPTNO, EMPNO from EMP1 minus select DEPTNO, EMPNO from EMP2;
    I want to get single row from the results of this query, so I may use MAX or MIN or where rownum<2.
    How can I do this please....
    I tried: SELECT MAX(select DEPTNO, EMPNO from EMP1 minus select DEPTNO, EMPNO from EMP2) from DUAL;
    but I got syntax error :(
    Please help....
    Thanks

    select DEPTNO, EMPNO from EMP1 minus select DEPTNO, EMPNO from EMP2;
    I want to get single row from the results of this querywhich row is correct row & why?
    How many rows returned now? (Since we don't have your tables or data.)
    Handle:      KinsaKaUy?
    Status Level:      Newbie
    Registered:      Mar 9, 2011
    Total Posts:      614
    Total Questions:      168 (110 unresolved)
    so many questions & so few answers.
    How SAD!
    Edited by: sb92075 on Aug 29, 2011 11:10 AM

  • How to remove database name from SQL query

    We have an MS SQL server with several databases that are of the same schema but have different data.  We do this for testing different environments.  We are using Crystal reports for the first time and we are having trouble changing the database location in the designer.  If update the data source location to the same database server, but different database name, the data still comes from the original database used when creating the report.  We look at the SQL query and it contains the database name and does not change when updating the data source.  Therefore the data always comes from the database used when originally creating the report.
    How can I remove the database name from the SQL query so the proper database is used when testing the report?

    Hi C F
    Please ensure you have followed the procedure mentioned below:
    In Crystal Reports, there are two ways to set the location of the data source your report points to, depending on your connection type.
    For ODBC and Native Connections:
    1. On the 'Database' menu, click 'Set Datasource Location'.
    2. In the 'Current Data Source' section, click the data source to be changed. You must click each individual table in the data source one by one. If the data source is a stored procedure you will not see individual tables.
    NOTE     In Crystal Reports 10, XIR1, and XIR2, if you are mapping from a data source such as a stored procedure where the report designer can not determine which fields should be mapped automatically, you will see a 'Mapping' dialog box where you can manually map fields, as in the procedure cited above.
    3. In the 'Replace with' section, click the data source you want the report to use.
    4. Click 'Update'.
    5. Close the 'Set Datasource Location' window.
    The report now points to the new location.
    For Native Connections Only:
    1. On the 'Database' menu, click 'Set Datasource Location'.
    2. In the 'Current Data Source' section, click 'Properties' to expand it and right-click 'Database Name: <path to database>'.
    3. Click 'Edit' and then type the path to the
    new data source location.
    4. Close the 'Set Datasource Location' window.
    The report now points to the new location.
    Regards
    Girish

  • How to retrieve column names in a query in a case sensitive way

    Given a query, I want to extract all the column names/aliases in the query in a case-sensitive way.
    When I use dbms_sql.describe_columns() or java.sql.ResultSetMetaData classes getColumnName() or getColumnLabel()
    it returns the columns name ONLY in Upper case.
    My application needs to extract the column names in the same case as it appears in the query string.
    Is there any API to get this without parsing the SQL query string?
    Thanks
    PS: The dbms_sql.describe_columns() returns the column name in upper case.
    declare
    IS
    l_column_recs DBMS_SQL.DESC_TAB;
    l_cur NUMBER;
    l_column_count NUMBER;
    BEGIN
    l_cur := dbms_sql.open_cursor;
    dbms_sql.parse(l_cur, 'select target_type from targets', dbms_sql.NATIVE);
    dbms_sql.describe_columns(l_cur, l_column_count, l_column_recs);
    FOR i IN l_column_recs.FIRST..l_column_recs.LAST
    LOOP
    dbms_output.put_line(l_column_recs(i).col_name);
    end loop;
    end;
    /

    As far as the result set is concerned, though, the column name is in all upper case. If you query the data dictionary, you would see that the TARGET_TYPE column in the TARGETS table is stored in upper case.
    The way Oracle works is that column names that are not enclosed in double-quotes are converted to upper case in the data dictionary and elsewhere and then Oracle looks for the column name in the table definition. That is what allows Oracle to have case-insensitive identifiers unless a user specifies case-sensitive identifiers by enclosing the identifier in double quotes.
    If you changed the query to be
    SELECT target_type as "target_type"
      FROM targetsOracle should report the alias in a case sensitive fashion because you've now indicated that the alias should be treated as case sensitive.
    Justin

  • How to find name of the Query in SE09

    Hi Experts,
    Can anyone tell me how do find the name of the Query which is not released.
    Like for example:
    When I try to open the modified requests of all the users It displays me the names of the Tables, WEB templates etc. But for Query it only shows the Elements of Query Builder only some junk data.
    Please help me understand which query request that is.
    Thanks

    Do you have the TR no. which is released for the query.
    if you go there and check in SE09, it would show you the query name i guess which are the objects included in the request.
    Try this and hope this would  help you.

  • Find the tech names of all query's present in a workbook

    Hi,
    I need some materials  on workbooks.
    How find the tech names of all query's present in a workbook. I had an issue from end user and they just send me the workbook. So now i need to find out all the querries present in workbook.
    Please let me know steps to find out and some materials on workbook.
    Thanks,

    Hi
    Check in metedata repositroy.., when you click on th query here, it will show you which infoprovider it is created and list of workibooks created on the query etc.....
    Hope it helps you.... else get back
    Regards
    Rajesh

  • OBIEE - How to selectively hide or disable columns on a dashboard prompt?

    Hello! I need some help with OBIEE dashboard Prompts. Any help will be highly appreciated!
    Question 1. How to selectively hide or disable columns on a dashboard prompt or the entire prompt? There seems to be no "hide" or "dsable" options on
    prompts.
    Question 2. How to synchronize 2 different prompts on the same dashboard?
    The application is this: There are total of 2 tabs on a dashboard ("tab_1" and "tab_2"). Each tab uses different prompts ("pr_1" and "pr_2"), having just one first drop down column in common ("Product_id").
    The desired functionality is this: user selects "Product_id" on the first tab's prompt, which filters its reports (on "Go") and also propagates to the second tab. When user clicks on the second tab, the reports there are already filtered (or begin filtering) by "product_id", selected on the first tab.
    Question 3. How to prevent the reports from retrieving when switching to a different tab on a dshboard? Specifying dummy default values in the prompt does
    not seem to preven reports from retrieving, which still takes time.
    Thank you very much!
    Roger

    Regarding Question 2:
    What you need to have is a Dashboard scope dashboard prompt for Product_ID (i.e., Don't use the column prompt from the prompt tab within the Request.)
    1) Create the dashboard prompt, put it on tab1 and save the prompt to a presentation variable, say prmtProdID. Set the scope to "dashboard." (This is the default, by the way.) If you create a dashboard prompt and set the scope to "dashboard," then the prompt values selected will hold true across dashboard pages.
    2) On tab2, go to your report and in Criteria mode, apply a filter to the Product_ID column making it equal to the PV. (Click the filter icon, Add>Variable>Presentation Variable and type prmtProdID. Save.)
    When the user selects a Product_ID on tab1 of your dashboard and hits "Go," not only will it filter your report on tab1, when you go to tab2 the report here will be filtered with the same value selected in the prompt on tab2.
    Regarding Question 3:
    If you implement 2, you cannot implement 3. You can't have it both ways. Not for the same scenario. But if you want to know how to do it in general, read this:
    http://obieeone.com/2009/08/24/how-to-stop-queries-to-automatically-fire-off-once-entering-dashboarddashboard-page/

  • How to show employee names in descending order but 3rd row is fixed and always top on the table ?

    how to show employee names in descending order but 3rd row is fixed and always top on the table ?
    for example employee names is A,B,C, D, E
    and output is     C,E,D,B,A

    Since you are posting in the design forum, the short answer is - you don't.  Rows in a table have no inherent order that you can rely on and the "position" of rows is a visual characteristic that should be implemented by the application that displays
    this information or by the query that is used to generate the resultset.  
    So the next question is how one accomplishes this particular order within a select statement.  That is a tsql question which, for future reference, is best posted to the tsql forum.  In addition, many of the questions or issues that you will face
    have been discussed in the forums - often many, many times.  The first thing you should do when faced with an issue is to simply search the forums and leverage the the knowledge that has already been discussed.  In doing so you are quite likely to
    see suggestions or related issues that you should consider in your search for a solution.  
    Now, to answer the question - you need to formulate a order by clause that forces the rows to be sorted in the manner you desire.  Effectively you have 2 levels of sorting.  The first level divides your rows into 2 groups.  Group 1 consists
    of rows where name = E and Group 2 is everything else.  Following that you then need to sort the rows in each group by name in descending order.  Something like:  
    order by case name when E then 1 else 2 end, name desc

  • How do I rename one wrongly identified photo in Faces? I seem to only be able to merge two stacks of photos to the correct name, but that is not accurate. I only have one photo in a batch under a certain name, that is wrongly identified.

    How do I rename one wrongly identified photo in Faces? I seem to only be able to merge two stacks of photos to the correct name, but that is not accurate. I only have one photo in a batch under a certain name, that is wrongly identified.

    In iPhoto '11: Select the photo in the "Faces" stack, open the "Info" panel, click on the face name in the "faces" brick and then on the name below the face to edit the name.
    Regards
    Léonie

  • How to use column name as variable in select statement

    hi,
    i want to make a sql query where in select statement using variable as a column name. but its not working plz guide me how can i do this.
    select :m1 from table1;
    regards

    Hi,
    Is this what you want..
    SQL> select &m1 from dept;
    Enter value for m1: deptno
    old   1: select &m1 from dept
    new   1: select deptno from dept
        DEPTNO
            10
            20
            30
            40
    SQL> select &m1 from dept;
    Enter value for m1: dname
    old   1: select &m1 from dept
    new   1: select dname from dept
    DNAME
    ACCOUNTING
    RESEARCH
    SALES
    OPERATIONS
    SQL> select &&m1 from dept;
    Enter value for m1: loc
    old   1: select &&m1 from dept
    new   1: select loc from dept
    LOC
    NEW YORK
    DALLAS
    CHICAGO
    BOSTON
    SQL> select &&m1 from dept;
    old   1: select &&m1 from dept
    new   1: select loc from dept
    LOC
    NEW YORK
    DALLAS
    CHICAGO
    BOSTONIf you use single '&' then each time you fire the query, It will ask for the new value..
    But if you will use double '&&' the value of m1 will be persistent across the session..
    Twinkle

  • I can't join a network, because everytime I type in the password, join greys out.  It has a lock sign next to the network name, but I'm not sure how to unlock it.

    I can't join a network, because everytime I type in the password, "join" turns grey.  There's a lock sign next to the network name, but I'm not sure how to unlock it.  Can you help me??

    The way you "unlock" it is by typing in the correct password. The lock indicates a private network that requires a password. Are you sure you have the correct password? Is this your own home network?
    Why don't you reboot your iPad and try to log in again. Hold down on the sleep button until the Apple logo appears on the screen, let go of the button and the iPad will shut off. Turn back on by pressing the sleep button again until the Apple logo appears and let go of the button. See if the iPad will accept your password.
    If that doesn't work, you could try tapping the blue arrow next to the network name and then tap Forget This Network. Restart your iPad as described above. Then go back to settings, tap WiFi, select the network and enter the password again and see if it works.

  • How to Select data using same column name from 3 remote database

    Hi,
    Can anyone help me on how to get data with same column names from 3 remote database and a single alias.
    Ex.
    SELECT *
    a.name, b.status, SUM(b.qty) qantity, MAX(b.date) date_as_of
    FROM
    *((table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3)a,*
    *(table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3)b)*
    WHERE b.dept = 'finance'
    AND a.position = 'admin'
    AND a.latest = 'Y' AND (b.status <> 'TRM') AND b.qty > 0;
    GROUP BY a.name, b.status ;
    NOTE: the bold statements is just an example of what I want to do but I always gets an error beacause of ambiguous columns.
    Thanks in advnce. :)
    Edited by: user12994685 on Jan 4, 2011 9:42 PM

    user12994685 wrote:
    Can anyone help me on how to get data with same column names from 3 remote database and a single alias.Invalid. This does not make sense and breaks all scope resolution rules. And whether this is in a single database, or uses tables across databases, is irrelevant.
    Each object must be uniquely identified. So you cannot do this:
    select * from (table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3) a3 objects cannot share the same alias. Example:
    SQL> select * from (dual, dual) d;
    select * from (dual, dual) d
    ERROR at line 1:
    ORA-00907: missing right parenthesisYou need to combine the objects - using a join or union or similar. So it will need to be done as follows:
    SQL> select * from (select * from dual d1, dual d2) d;
    select * from (select * from dual d1, dual d2) d
    ERROR at line 1:
    ORA-00918: column ambiguously definedHowever, we need to have unique column names in a SQL projection - so the join of the tables need to project a unique set of columns. Thus:
    SQL> select * from (select d1.dummy as dummy1, d2.dummy as dummy2 from dual d1, dual d2) d;
    DUM DUM
    X   X
    SQL> I suggest that you look closely at what scope is and how it applies in the SQL language - and ignore whether the objects referenced are local or remote as it has no impact to fundamentals of scope resolution.

  • JcomboBox How display names, but return ids?

    I am implemeting a combobox from a table (id, name). I want display the names, but when the user select a item, I want to get the id corresponding to the name selected
    How i make this?

    Search the forum for my "Combo Box Item" (without the spaces) example.

  • Hi All, I am using iphone in UAE and ipad in India usinging same apple id. Earlier I could do imessage  to my Ipad with different name but with  software update,I am unable to do, as signing id for the iphone and ipad is same.How to restore back

    Hi All, I am using iphone in UAE and ipad in India usinging same apple id. Earlier I could do imessage  to my Ipad with different name but with  software update,I am unable to do, as signing id for the iphone and ipad is same.How to restore back

    I believe because you migrated from a Nokia to an iPhone you need to register the Bn phone number with your Apple ID so it can be used for iMessage. The Pn number seems to be the only one registered
    Go here > https://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa/
    Manage your Apple ID and see if that does the trick
    Hope that helps

Maybe you are looking for