Column concatenation, Column seperators in SELECT

Hello,
I just did a practive exam and have a question regarding those two problems
[Problem 1 |www.metallon.org/test/problem.jpg]
[Problem 2|http://www.metallon.org/test/problem2.jpg]
1-
It seems that "SELECT ename 'joined' on' hiredate..."
Is what failes the query first. My version of Oracle 10g does not seem
to allow columns to be select without having a comma "," in between.
2-
The same thing. "...promo_name q'{'s start date was}' promo_begin_date..."
No column seperator.
Does that make sense or am I stupid?

Looks like the 2nd question is missing the concatenation symbols (||) to join the column to the literal in order for answer C to be correct.
Either whatever you're viewing the question in has issues displaying || or the question is just badly constructed.
I don't think it's you! *{;-)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • OBIEE Group By on 2 facts and concatenated columns from different dimensions

    Hi
    I have a different kind of problem involving 2 fact tables with different dimensional attributes.
    Fact 1 has Dim Attributes ( Cust,Facility )
    Measure - Gross Amount
    Fact2 has Dim attributes (Cust,Facility and Risk Group )
    Measure : Exposure Amount
    Since we have 2 facts with different dimensions,
    to exclude the 'Risk Group' dimension column from the group by for the Fact1,
    we set the 'Gross Amount' measure to total level (Risk Group Dimension ) in contents tab.
    So the values from both the fact tables appears in the same report correctly.
    But in the same report we have another requirement where the rating column from the customer dimension has to be concatenated with the ratings column in the facility dimension.
    We have to concatenate customer.rating with the facility.rating and display it in the report.
    when we just pull the individual columns from the dimensions into the report it works fine.
    But when we try to concatenate the 2 columns and show it in the report,
    the concatenated column does not appear in the select or the group by in the SQL Fact2.( Generated by OBIEE )
    The other fact1 has the concatenated column in the select as well as the group by clause ( Generated by OBIEE )
    As a result the report shows the concatenated values only for the results from the Fact1. But the results from Fact2 does not have the concatenated column values.
    The report should look like the below:
    Custor.Name,     Customer.Id,     Facility.Name,     Facility.Id,     Customer.Rating/Facility.Rating,     Risk Group,     Gross Amount,     Exposure Amount
    ===========    =========      ===========     =========   ========================      =========     ===========     ===============
    JPMC                123                    GROSS               123               08/10                                                  LNL                    45,000               25,000
    CLAIRE               456                    NET                    456               07/10                                                  RNK                    50,000               30,000
    Thanks,
    Chandra

    As suggested you really want to move your none-aggregated fact attributes to a logical dimension (using the same physical table as the logical fact). Map this in the BMM layer as a snowflake, Place a hierarchy on this dimension with (at minimum) Total -> Detail levels, then on the other fact table you want to include in the report, set the content level on your other fact measures to the 'Total' level for your new logical Dim and it will allow them to be present in the same report.

  • SQL to do a like compare against two concatenated columns...

    I'm trying to do a like search against two columns that house a first and last name, but people might touch like 'John Doe'
    Can I do a like search against concatenated columns?
    Kinda what I want to do ...
    select * FROM worker_view WHERE
    (LOWER(E.USUALFIRSTNAME) || ' ' || LOWER(E.LASTNAME)) LIKE '%searchstring%'
    ... but obviously this is not right ... any direction would be appreciated!

    Let's take your example as test case
    First name: John
    Last name : Doe
    Search string possibilities:
    'John'
    'Doe'
    'John Doe'
    'Doe John'SQL statement:
    SELECT *
    FROM   worker_view
    WHERE  LOWER(E.USUALFIRSTNAME) LIKE LOWER('%searchstring%')
    OR     LOWER(E.LASTNAME) LIKE LOWER('%searchstring%')
    OR     LOWER(E.USUALFIRSTNAME) || ' ' || LOWER(E.LASTNAME) LOWER('%searchstring%')
    OR     LOWER(E.LASTNAME) || ' ' || LOWER(E.USUALFIRSTNAME) LOWER('%searchstring%')Following would still fail:
    'JohnDoe'
    'DoeJohn'
    'John  Doe'
    'Doe  John'Hope that should be fine with your application.
    - dkv

  • Need to Display columns depending on the prompt selection

    I  need to show the only the columns as per the prompt selection given by the user.
    Suppose there are 5 prompts say (first name, last name, phone number, address, DOJ). All the prompts should be optional. If the user gave input for first name and last name then only this two columns must be displayed in the report.

    Yes it is possible but you will have to write down formulas for these columns.
    First add all required object in your report and format them in your report.
    Now say you want Last name to appear when you user enters last name in prompt.
    Write down following formula
    Report Detail Area
    =If(UserResponse("Last Name"))="USER INPUT" Then [LNAME]
    For column Heading you can use
    =If(UserResponse("Last Name"))="USER INPUT" Then "Column Heading"
    The same pattern may be applied for other columns.
    Regards,
    Bashir Awan

  • Display Column only when Current Year Selected

    Hi Gurus,
    1)I have a Req where in I need to Display a Column only when 2012 is selected,It shouldn't appear when i select 2010 & 2011 in the Prompt.
    2)I have to display a column only when the Last month of the Quarter is selected.
    Any help???

    Hi,
    Make it two reports, one with the column and the other report without the column. Place both the reports in two different dashboard sections and use conditional show/hide section as explained here,
    http://total-bi.com/2011/01/obiee-hide-show-sections/
    Regards,
    Dpka

  • Error in Dropping columns from Subject Area to selected Columns section

    While Dropping columns from Subject Area to selected Columns section in Analytics nothing is happening.There is no error in the RPD.I am using OBIEE 11g and windows7.I am also getting page error like below:
    Webpage error details
    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)
    Timestamp: Tue, 4 Sep 2012 08:31:07 UTC
    Message: 'kmsgPickerUIJSCantAddColumns' is undefined
    Line: 1
    Char: 1781
    Code: 0
    URI: http://localhost:7001/analytics/res/b_mozilla/picker.js
    Message: 'kmsgPickerUIJSCantAddColumns' is undefined
    Line: 1
    Char: 1781
    Code: 0
    URI: http://localhost:7001/analytics/res/b_mozilla/picker.js
    Can you guys please help?

    That error usually means it is still mapped, maybe it is used in another interface if you say the mapping has definitely been removed.
    You can expand the datastore > Used In > "As a Target" or "As a Source" or "In a Package" - that should tell you if it being used anywhere else.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Having trouble connecting column to column using niSwitch on a PXI 2530

    Having trouble connecting column to column using niSwitch vi on a PXI 2530 matrix module.  I have configured my switch using Switch Executive, have identified aliases, and verified routes and route groups.  When I use LabVIEW to connect column to column I get an error reading "cannot find connection between c0 and c1".  c0 and c1 are example columns I want to connect.  Any help is appreciated.

    You can find NISE VIs in the function pallete in LV if you have installed LabVIEW support when you installed NISE (this is selected by default in the installer if you had LV installed before installing NISE).
    Also, choose between niSwitch and NISE based on your need - if all you ever do is connect two channels in your application, then configuring a NISE virtual device is probably an overkill (and so is using a switch in this case:-) . However, if you are going to manage multiple routes, then using NISE configuration will let you create named routes and route groups, which you can then invoke (connect/disconnect) in your application and have the configuration part managed outside your application. The code would then concentrate solely on establishing a necessary connection(s) via connecting a route or a route group, while if you were to use niSwitch for this purpose, you would have to keep the logic of connecting inside your application, together with the list of channels that need to be connected.
    Start with using NISE, and see if you like it.
    http://www.ni.com/pdf/products/us/3msw112-113.pdf
    Srdan Zirojevic

  • Rows as Columns and Columns as Rows

    Hi,
    How to print rows as columns and columns as rows?
    Suppose I've the following data
    colA colB
    X 1
    Y 2
    Z 3
    I want the output to be something like
    X Y Z
    1 2 3.
    Is this possible? Please let me know.
    Regards,
    Jai.

    The following assumes that there is only one value of colb for each value of cola, but allows for any number of values of cola. The script below creates the query and results below that, given the test data that you provided.
    -- script:
    STORE  SET saved_settings REPLACE
    SET    ECHO OFF FEEDBACK OFF HEADING OFF PAGESIZE 0 VERIFY OFF WRAP ON
    SPOOL  query.sql
    SELECT 'SELECT MAX (DECODE (cola, ''' || cola || ''', colb)) AS "' || cola || '"'
    FROM   (SELECT MIN (cola) AS cola
            FROM   test_table)
    SELECT ', MAX (DECODE (cola, ''' || cola || ''', colb)) AS "' || cola || '"'
    FROM   (SELECT DISTINCT cola
            FROM   test_table
            WHERE  cola >
                   (SELECT MIN (cola)
                    FROM   test_table))
    PROMPT FROM   test_table
    PROMPT /
    SPOOL  OFF
    START  saved_settings
    START  query.sql
    -- query and results:
    SQL> SELECT MAX (DECODE (cola, 'X', colb)) AS "X"
      2  , MAX (DECODE (cola, 'Y', colb)) AS "Y"
      3  , MAX (DECODE (cola, 'Z', colb)) AS "Z"
      4  FROM   test_table
      5  /
             X          Y          Z
             1          2          3
    SQL>

  • Generic Column Template - Column Template Conditions

    Hi,
    I have the following sql report snippet (as an example):
    select a,b,c,apex_item.checkbox(1,active_flag,DECODE (active_flag, 'Y', 'CHECKED','')) as "Active"
    from tableA
    Attached to this report, is a report template which I am trying to attach Column Template Conditions as I basically want to display all rows that have an active flag of 'N' as red or leave as default colour but unfortunately I can't seem to get this to work.
    I believe my Column Template Expressions are not correct as I have also tried "ACTIVE" = 'N' and still no luck.
    I have the following setup within the Generic Column Template, i,e:
    Column Template 1 = <td class="t12datavalue"#ALIGNMENT# style="background:red">#COLUMN_VALUE#</td>
    Column Template 1 Condition = Use based on PL/SQL Expression
    Column Template 1 Expression = '#1' = 'N'
    Column Template 1 = <td class="t12datavalue"#ALIGNMENT#>#COLUMN_VALUE#</td>
    Column Template 1 Condition = Use based on PL/SQL Expression
    Column Template 1 Expression = '#1' <> 'N'
    Any ideas what I could be missing?
    Thanks,
    Tony.

    Hi Tony,
    I think the issue here might be because the field you are trying to evaluate in the column template is a Check box. I tried this and it worked :-
    select a,b,c,apex_item.checkbox(1,active_flag,DECODE (active_flag, 'Y', 'CHECKED','')) as "Active",active_flag
    from tableA
    In the report attributes set the second active_flag column to not show (i.e. the one that is not the check box).
    In the Column Template
    Column Template 1 = <td class="t12datavalue"#ALIGNMENT# style="background:red">#COLUMN_VALUE#</td>
    Column Template 1 Condition = Use based on PL/SQL Expression
    Column Template 1 Expression = '#ACTIVE_FLAG#'='N'
    Column Template 1 = <td class="t12datavalue"#ALIGNMENT#>#COLUMN_VALUE#</td>
    Column Template 1 Condition = Use based on PL/SQL Expression
    Column Template 1 Expression = '#ACTIVE_FLAG#'='Y'
    Regards
    Paul

  • I entered new fields in a form that was created last year to update it.  However, now when I view the responses, they are listed as Column 1, Column 5, etc.  It doesn't show a label for the actual field when I view the responses.  Can you please help?

    I entered new fields in a form that was created last year to update it.  However, now when I view the responses, the headings are listed as Column 1, Column 5, etc. rather than the name of the heading.  Can you please help?

    Hi Mike,
    CRSE is an OEM Product and for use with a custom application they have written. Unfortunately we don't their reports or how they are connecting, it would appear they were originally built off a SQL and then set to a Dataset in the app or they could be adding the data source at runtime. Lots of variations and without access to the source code to see what they are doing not much we can help you with.
    You need to contact the OEM Partner for help in resolving this and find out what you can and need to do to update your SP and work with their canned reports,
    Thank you
    Don

  • Write data to Text file - Column by Column

    Hi,
    I want to write a table of data(2D) to a text file. I acquire 1D array(6 lakh rows) of data & want to write that in text file as column 0. And next 1D array to the same text file as column 2. Is it possible todo that?
    I don't want to accumulate 2D array and write at last since it consumes more memory & Labview Hangs.
    Kindly share your ideas.....
    Labview 8.2 
    Regards,
    Raja 

    HI,
               I hope this works for you but this vi doesnt hanged my PC or Labview. Please check with it and let me know.
    Regards,
    Gita
    Message Edited by AutoTEC on 10-17-2008 04:15 AM
    Attachments:
    Write column by column.vi ‏1398 KB

  • How to display the rows in to columns and columns into rows?

    DES:- I know by using pivot and unpivot you can convert rows into columns and columns into rows but i don't know how to write the syntax?

    Hi,
    Besides the places Martin mentioned above, there are many examples in the forum FAQ:
    https://community.oracle.com/message/9362005#9362005
    For an example of both PIVOT and UNPIVOT in the same query, see
    http://forums.oracle.com/forums/thread.jspa?threadID=920854&tstart=0

  • SMARTFORMS: 2 columns (each column consist 1 table) in 1 page

    Hi...,
    I've got problem that there is requirement to development smartforms as below format:
    Page 1
    column "A"                column "B"
    No. Description     Qty Amt     | No. Description     Qty Amt
    1. Desc1         1 100 |  5. Desc5               5 500
    2. Desc2         2 200 |  6. Desc6               6 600
    3. Desc3         3 300 |  7. Desc7               7 700
    4. Desc4         4 400 |  8. Desc8               8 800
    Page 2
    column "A"                column "B"
    No. Description     Qty Amt     | No. Description     Qty Amt
    9. Desc11       11 110 | 13. Desc15             15 510
    10. Desc12       12 210 | 14. Desc16             16 610
    11. Desc13       13 310 |
    12. Desc14       14 410 |
    It means that in one page consist of 2 column, A and B. Each column has each own table which is identically each other. After writing line item in column "A", then automatically  go to column "B" until finished.
    My question is how to solve it in smartforms?
    What I did before, I created internal table which is already containing the data like above then just pass through table in smartforms like usual.
    Is there any solution?
    Thanks a lot in advance.

    Hi Herlina,
    maybe you have to solve this problem like in Abap code. You know the number of column that you could set on your page, for example 4.
    So create a table with col_A and col_B, use the number 4 to set data into this table.
    Like that.
    loop at it_x.
      w_num = sy-tabix / 4.
      perform p_test_odd using w_num changing w_odd.
      if w_odd eq 'X'.
    *   move in col_b   
      else.
    *   move in col_a
      endif.
    endloop.
    (w_num is a type n)
    I didn't test the code, but I hope that will help you.
    Regards
    Frédéric

  • Can anybody help....SQL to display row as column and column as rows

    Can anybody help in writing a SQL to display row as column and column as rows?
    Thanks

    check this link:
    Re: Creating Views - from rows to a new column?

  • Enable column some column in a JTable

    Hi guys i have to enable just one column named QUANTITE in my JTable...i read that i must overwrite the isCellIditable() method to do so..
    here my code:
    final int QUANTITE = 2;
    public boolean isCellEditable(int row, int column){
    if(column == QUANTITE){
    return true;
    else{
    return false;
    help me please :P

    ok...but hehe the problem is that anyway all columns
    are editable...Make sure that your JTable does really use your TableModel but not something else

Maybe you are looking for

  • How can I delete an app that doesn't show as installed but is?

    I can not delete an app that is on my iphone 5.  Unfortunely I do not remember the name of it!  It shows up as a moveable round botton within a square on all opened screens. When tapped it opens up four options: Favorites, Siri, Device and Home.  It

  • Refresh itab is not getting triggered

    hi, SELECT ebeln bukrs ernam lifnr spras FROM ekko INTO CORRESPONDING FIELDS OF TABLE g_it_ekko WHERE lifnr IN r_lifnr. DESCRIBE TABLE g_it_ekko LINES n. grid-lines = n. IF sy-subrc = 0. MESSAGE s002(zsan) WITH n. ELSE. REFRESH g_it_ekko. MESSAGE e00

  • Multiple instances of identical vi inside a while loop

    We have a while loop that is monitoring 6 sensors in a heated water bath. Each sensor has the same basic switching parameters. While the loop runs, it does not tie the shift register value to the same instance every time it runs. The 6 instances of t

  • Video playback audio cuts off after few second

    Pictures are fine but audio cuts off sometime around 5-10 seconds for the entire duration of the video unless you skip the video further a few seconds where the sound cuts off,audio are back but only for maybe 1 or 2 minutes then if you repeat the sa

  • XI Java autharization

    Hi Friends, One my XI user getting '<b>noAuthorizationJava</b>' message when he trying to display messages in XI RWB(Runtime Workbench) tool ,i gave the sap_xi_rwd* role but no use ,still same error .Any one got same type of error ? Please help me if