How to shows result as Alias name.

Dear All,
I am having following query and output, in that inside query showing one record check another query, that result i want to show as Alias, Can we show result as alias ?
          select SPL.speciality_description,Emp.FIRSTNAME,DT.full_date                                   
          ,max(decode(diagnosis_description,                                   
          (SELECT DIAGNOSIS_DESCRIPTION                                   
          FROM (SELECT row_number() OVER (ORDER BY DIAGNOSIS_DESCRIPTION DESC) r,                                   
          DG.DIAGNOSIS_DESCRIPTION                                   
          FROM A_PERFORMANCEDOCTORWISE PD                                   
          INNER JOIN D_DATE DT ON DT.DATE_ID = PD.DATEID                                   
          INNER JOIN D_DIAGNOSIS DG ON DG.DIAGNOSISID = PD.DIAGNOSISID                                   
     WHERE DT.FULL_DATE between (select TO_CHAR(sysdate-15,'DD/MON/YYYY') from dual)                                         
     and (select TO_CHAR(sysdate,'DD/MON/YYYY') from dual) and ROWNUM < 6                                         
          ) WHERE r=1),patientcount)) as First                                   
          ,max(decode(diagnosis_description,                                   
          (SELECT DIAGNOSIS_DESCRIPTION FROM (                                   
          SELECT row_number() OVER (ORDER BY DIAGNOSIS_DESCRIPTION DESC) r,                                   
          DG.DIAGNOSIS_DESCRIPTION                                   
          FROM A_PERFORMANCEDOCTORWISE PD                                   
          INNER JOIN D_DATE DT ON DT.DATE_ID = PD.DATEID                                   
          INNER JOIN D_DIAGNOSIS DG ON DG.DIAGNOSISID = PD.DIAGNOSISID                                   
     WHERE DT.FULL_DATE between (select TO_CHAR(sysdate-15,'DD/MON/YYYY') from dual)                                         
     and (select TO_CHAR(sysdate,'DD/MON/YYYY') from dual) and ROWNUM < 6                                         
          ) WHERE r=2),patientcount)) as Second                                   
          ,max(decode(diagnosis_description,                                   
          (SELECT DIAGNOSIS_DESCRIPTION FROM (                                   
          SELECT row_number() OVER (ORDER BY DIAGNOSIS_DESCRIPTION DESC) r,                                   
          DG.DIAGNOSIS_DESCRIPTION                                   
          FROM A_PERFORMANCEDOCTORWISE PD                                   
          INNER JOIN D_DATE DT ON DT.DATE_ID = PD.DATEID                                   
          INNER JOIN D_DIAGNOSIS DG ON DG.DIAGNOSISID = PD.DIAGNOSISID                                   
          WHERE DT.FULL_DATE between (select TO_CHAR(sysdate-15,'DD/MON/YYYY') from dual)                                    
     and (select TO_CHAR(sysdate,'DD/MON/YYYY') from dual) and ROWNUM < 6                                         
          ) WHERE r=3),patientcount)) as Third                                   
          ,max(decode(diagnosis_description,                                   
          (SELECT DIAGNOSIS_DESCRIPTION FROM (                                   
          SELECT row_number() OVER (ORDER BY DIAGNOSIS_DESCRIPTION DESC) r,                                   
          DG.DIAGNOSIS_DESCRIPTION                                   
          FROM A_PERFORMANCEDOCTORWISE PD                                   
          INNER JOIN D_DATE DT ON DT.DATE_ID = PD.DATEID                                   
          INNER JOIN D_DIAGNOSIS DG ON DG.DIAGNOSISID = PD.DIAGNOSISID                                   
          WHERE DT.FULL_DATE between (select TO_CHAR(sysdate-15,'DD/MON/YYYY') from dual)                                    
     and (select TO_CHAR(sysdate,'DD/MON/YYYY') from dual) and ROWNUM < 6                                         
          ) WHERE r=4),patientcount)) as Forth                                   
          ,max(decode(diagnosis_description,                                   
          (SELECT DIAGNOSIS_DESCRIPTION FROM (                                   
          SELECT row_number() OVER (ORDER BY DIAGNOSIS_DESCRIPTION DESC) r,                                   
          DG.DIAGNOSIS_DESCRIPTION                                   
          FROM A_PERFORMANCEDOCTORWISE PD                                   
          INNER JOIN D_DATE DT ON DT.DATE_ID = PD.DATEID                                   
          INNER JOIN D_DIAGNOSIS DG ON DG.DIAGNOSISID = PD.DIAGNOSISID                                   
          WHERE DT.FULL_DATE between (select TO_CHAR(sysdate-15,'DD/MON/YYYY') from dual)                                    
     and (select TO_CHAR(sysdate,'DD/MON/YYYY') from dual) and ROWNUM < 6                                         
          ) WHERE r=5),patientcount)) as Fifth
          FROM A_PERFORMANCEDOCTORWISE PD                                   
          INNER JOIN D_SPECIALITY SPL ON SPL.SPECIALITYID = PD.SPECIALITYID                                   
          INNER JOIN D_EMPLOYEEMASTER EMP ON EMP.EMPID = PD.DOCTORID                                   
          INNER JOIN D_DATE DT ON DT.DATE_ID = PD.DATEID                                   
          INNER JOIN D_DIAGNOSIS DG ON DG.DIAGNOSISID = PD.DIAGNOSISID                                   
          WHERE DT.FULL_DATE between (select TO_CHAR(sysdate-15,'DD/MON/YYYY') from dual)                                    
          and (select TO_CHAR(sysdate,'DD/MON/YYYY') from dual)                                    
          group by SPL.speciality_description, Emp.FIRSTNAME, DT.full_date                                   
          order by SPL.speciality_description,Emp.FIRSTNAME,DT.full_date                                   
Output:
REGISTRATION     Dr.POOJA     19-JUL-10 12:00 AM     56     74     99     32     96
REGISTRATION     Dr.POOJA     21-JUL-10 12:00 AM     93     74     45     43     69
REGISTRATION     Dr.POOJA     22-JUL-10 12:00 AM     34     34     76     66     24
REGISTRATION     Dr.POOJA     24-JUL-10 12:00 AM     99     75     97     78     69
REGISTRATION     Dr.POOJA     26-JUL-10 12:00 AM     54     34     76     66     24
REGISTRATION     Dr.POOJA     28-JUL-10 12:00 AM     76     75     97     78     33
REGISTRATION     Dr.POOJA     30-JUL-10 12:00 AM     54     23     34     65     23
Travel Clinic     Dr.PRAN     19-JUL-10 12:00 AM     56     74     99     32     96
Travel Clinic     Dr.PRAN     21-JUL-10 12:00 AM     93     74     45     43     69
Anothe Query :
SELECT DIAGNOSIS_DESCRIPTION                                   
          FROM (SELECT row_number() OVER (ORDER BY DIAGNOSIS_DESCRIPTION DESC) r,                                   
          DG.DIAGNOSIS_DESCRIPTION                                   
          FROM A_PERFORMANCEDOCTORWISE PD                                   
          INNER JOIN D_DATE DT ON DT.DATE_ID = PD.DATEID                                   
          INNER JOIN D_DIAGNOSIS DG ON DG.DIAGNOSISID = PD.DIAGNOSISID                                   
     WHERE DT.FULL_DATE between (select TO_CHAR(sysdate-15,'DD/MON/YYYY') from dual)                                         
     and (select TO_CHAR(sysdate,'DD/MON/YYYY') from dual) and ROWNUM < 6                                         
          ) WHERE r=1
Output:
Neurocytoma
I want to show this result as Alias name. Can anybody tell me how to do that ?
Thanks and Regard's
Harish Patil

Hi,
If I've understood the intention of your code correctly, you are trying to pivot the rows into columns and assign a "nice" header to the resulting columns.
You cannot dynamically assign a column name to a pivoted row. You need to know beforehand what row you are pivoting so you can assign a column name to it. This isn't as difficult as it sounds, there are a number of ways you could know what row will become what column.
Since I have no way to test using your code, I am posting an example for you that uses the EMP table that is part of the standard example databases shipped with Oracle.
Also, notice that, the code I am presenting is enclosed between the tags (which you cannot see) [ code ] and [ / code ] which is why it appears nicely formatted. Your code would be much easier to read and folks would be much more likely to understand what you want and therefore help you if you take the time to format your code so it is comprehensible.
See the basics of using tags to format your code at this page:
http://wiki.oracle.com/page/Oracle+Discussion+Forums+FAQ
Now the example that will help you get what you want:
/* this query calculates the total salaries per deptno */
SELECT job,
       deptno,
       sum(sal) sal
  FROM emp
GROUP BY job, deptno;
/* output is */
JOB          SUM(SAL)
CLERK            4150
SALESMAN         5600
PRESIDENT        5000
MANAGER          8275
ANALYST          6000
/* this query pivots the above query (which is what you're trying to do) */
SELECT *
  FROM (
        SELECT job,
               deptno,
               sum(sal) sal
          FROM emp
         GROUP BY job, deptno
  PIVOT (sum(sal) FOR deptno IN (10, 20, 30, 40));
/* output is */
     CLERK   SALESMAN  PRESIDENT    MANAGER    ANALYST
      4150       5600       5000       8275       6000If you are not using 11g, there are ways of doing the above without using the PIVOT clause. There are lots of examples in this forum on how to pivot rows. Here is one that pretty much does manually what the PIVOT clause does:
select max(case when job='CLERK'
                then ename else null end) as clerks,
       max(case when job='ANALYST'
                then ename else null end) as analysts,
       max(case when job='MANAGER'
                then ename else null end) as mgrs,
       max(case when job='PRESIDENT'
                then ename else null end) as prez,
       max(case when job='SALESMAN'
                then ename else null end) as sales
from (
select job,
      ename,
      row_number()over(partition by job order by ename) rn
from emp
      ) x
group by rn
/* outputs */
     CLERKS  ANALYSTS  MGRS   PREZ  SALES
     MILLER  FORD      CLARK  KING  TURNER
     JAMES   SCOTT     BLAKE        MARTIN
     ADAMS             JONES        WARD
     SMITH                          ALLENHTH,
John.
Edited by: 440bx - 11gR2 on Aug 2, 2010 9:28 AM - added missing verb "is" in sentence
Edited by: 440bx - 11gR2 on Aug 2, 2010 9:32 AM - missing "s" in select.

Similar Messages

  • HOW DO I CHANGE MY ALIAS NAME?

    Hi everybody
    HOW DO I CHANGE MY ALIAS NAME?
    As you can see it is iop12345!
    Thanks.
    Marcos

    You can't.
    Just start another Apple ID and pick a better name if you are not happy with that one.

  • How to show result from process in popup page?

    <br>We want to use one popup page for many information in application. So we want to make the following thing.
    <br>We want to execute process and show result in popup page (through hidden parameter-"P2_MESSAGE").
    <br>We also assign title of region on that popup page through "P2_TITLE".
    <br>What I do not know is how to show popup after process-branch problem.
    <br>Process is executed from one button. Button is located on page "28" and popup page is "2"
    <br>Code for javascript should be like:
    <br>
    javascript:popupURL('f?p=&APP_ID.:2:&APP_SESSION.::::P2_TITLE,P2_MESSAGE:'+'status '+','+'&P28_X.')<br>THX

    I have found in one thread:
    <br>
    <br>1) create an application item APP_ONLOAD (of course you can choose your own name)
    <br>2) create an application level before footer computation on APP_ONLOAD to clear the item after the page is generated.
    <br>3) place &APP_ONLOAD. (dot also) in the on load property of the page.
    <br>4) fill the APP_ONLOAD using :APP_ONLOAD := 'onload="your own javascript to call a popup window;"' in the plsql of an after On Submit - After Computations and Validations process (type PL/SQL anonymous block)
    Fill the when button pressed property of the process with the button you want to use to show the popup.
    <br>5) create a branch to branch to the current page (or a other if you wish)
    <br>
    Looks OK but when I create in PL/SQL js with "&" signe, which I use for filling some hidden values in popup page I get error.
    begin
      is_test_ok (1, :P28_X);
      :APP_ONLOAD := 'onload="javascript:popupHeightURL(''f?p=&APP_ID.:2:&APP_SESSION.::::P2_TITLE,P2_MESSAGE:''+''statusu testova''+'','+''&P28_X.'')"';
    end;<br>Should I use ASCII codes for that or what? Any example please!
    <br>THX

  • Urgent, SOS for help: How to show the pdf file name at the right bottow of the page?

    I want to show the pdf file name at the right bottow of the page for filing purpose, anybody knows anything?
    I know it can be showed at the left bottom through adobe printer, but i need it to be at the right bottom.
    thanks.

    The result is a UIWebView that displays a blank page. No errors occur in the UIWebView delegate method. The thing is that data has the correct length, in bytes, for the PDF I am trying to display, and I also get the pdf file in Library/Application Support/iPhone Simulator/4.3.2/Applications/ Does anyone have an idea as to what might be going wrong here or how I can better debug this problem?

  • How can i use this alias name Day1 br 06/09/2005 without " "

    From my application (asp.net), i don't know how to pass alias name "Day1<br>06/09/2005"(with " ")
    I this possible anyother way to use this Day1<br>06/09/2005 alias name without using " "
    select sum(count) Day1<br>06/09/2005 from test
    Millions of thanks in advacne..

    if your alias name for a column contains spaces, it needs to be enclosed in double-quotes.
    is there a real need to have such a column heading? what is the problem in enclosing the alias name in double-quotes?
    SQL*Plus has no problem displaying such a column heading? what issue are you encountering?
    SQL> select sum(sal) "Day1 06/09/2005" from emp ;
    Day1 06/09/2005
              29025
    1 row selected.
    SQL>

  • How to show result with 4 columm

    I using this to show result     
    $result += [PSCustomObject]@{  
            ServerName = "$computername"
            CPULoad = "$($AVGProc.Average)%" 
            MemLoad = "$($OS.MemoryUsage)%" 
            CDrive = "$($vol.'C PercentFree')%"
    i need result with 5 columms, but when i add more line to code, result format change to list, how to keep format on table
    thank u

    $result | Format-Table -auto
    \_(ツ)_/

  • How to show the witholding tax name instead of the code in PLD

    Hi Guys,
    Is it possible to show the witholding tax name instead of the witholding tax code in the summary or end of report in the PLD(AR Invoice)?
    Thanks.
    Eric

    Hi Eric
    I have tried to get it directly from the table: Witholding Tax, field: WTaxName; but there's no way to relate that with the A/R Invoice document so it shows me a wrong WT Name.
    As this tables is not directly exposed/related to the document the best way is try to create a Formatted Search in order to get the description you want. Please note the WT is get from a table and if you have more than 1 type of WT it may not work in a End of Report as it does not have the capacity as repetitive area to read multiple lines.
    Paulo Calado
    SAP Business One Forums Team

  • How to show result in bold text and zebra-printing

    Hi,
    I'm trying to create a ABAP class in SE24 defining the report-results in bold text. Looked around SDN, but not found the help I need.
    Plus need some help on how to print a report in "Zebra"-layout. I've already created a report with background colour in every other coloumn, but need to now how to include the Zebra-Layout on paper.
    As I'm quite unexperienced, I'm hoping on a step-by-step solution.
    Can anyone help me?
    Thanks in advance.
    @nne Therese

    Hi
    I am forwarding you some links the gives step by step procedure of printing layouts
    Basic layout is explained in the link:
    http://help.sap.com/saphelp_nw04/helpdata/en/ef/a2e9e9f88311d2b48d006094192fe3/frameset.htm
    Printing layouts:
    http://help.sap.com/saphelp_nw04/helpdata/en/a3/df9e38fbd7e35fe10000009b38f889/frameset.htm
    additional details:
    http://help.sap.com/saphelp_nw04/helpdata/en/6b/54b4b8cbfb11d2998c0000e83dd9fc/frameset.htm
    kindly reward if its useful
    Regards,
    Naveen P

  • How to show all the search result in a report page

    I have a report page which the user can enter first or last name to find the matched employees. The current report only show maximum of 15 matched results. How to show all of them in one page if more than 15.
    Also, the employee name on the report is a link, how to make the link to be conditional. ( I mean it can be a link or not based on another column)
    Thanks.
    Jen

    Hi, you can change the number of rows on the report definition page (15 is the default value)- that's also where you can change pagination and max. number of rows etc.
    About the second question - you will have to use Case or Decode in your report query and have the value as link or not based on the condition column, something like:
    Select Decode(condition_column, 'link_value', '<a href="f?p=YOUR_APP:PAGE_TO_LINK_TO:'  || :SESSION || ':::::">display_column</a>' , display_column) From .....
    Hope this helps.

  • Email workflow showing domain and alias and not the name in the email

    I created an email workflow for a specific user field value to receive an email on a trigger event.
    However, the email received shows the DOMAIN/Alias and not the "Name" in the email content.
    How to correct this error? Not sure where is the issue is.
    Sample:
    Hello [%Current Item: Reviewer%] is the greeting line.
    If Reviewer is say Domain A/v-abcd and Name is Abcd.
    The email reads
    "Hello Domain A/v-abcd" and not "Hello Abcd"

    Hi,
    Just select "Display Name" instead of "Login Name" in the "Return field as" field of Lookup dialog.
    It should help.
    Regards Michael (http://sp2013-blog.com)
    Please, don't forget to upvote and mark as an answer if appropriate

  • How to show argument variable names to webservice client

    Hi java expert(S)!
    This is sri, i am creating a webservice using sun java studio enterprise 8.1 IDE, my problem is consumer(from .net) say ,parameter names are not clear or visible. say, for example, my webservice method look like
    public java.lang.String login(final String clientid, final String password) throws java.rmi.RemoteException {...}
    to me but for webservice client String login(String_1, String_2). so how to show argument variables to client
    webservice client needs to know argument names for proper usage.
    Any body knows how to do this, Any help will be appreciated!!!!!
    Thanks & Regards,
    SRI.

    hI
    i have posted my wsdl below
    If you go through , you can find that in order to call a method , we have to supply string or int arguments but those names are not shown
    for example to call login , you need to supply 2 string arguments but how do you know first one is username and second one is for password.
    it shows simply string_1 and string_2 as arguments, instead if it shows login(String username,String password) for caller(webservice client), it will be easy to handle you know.
    How to do this????
    <definitions name="mysws" targetNamespace="urn:mysws/wsdl">
    &#8722;
         <types>
    &#8722;
         <schema targetNamespace="urn:mysws/types">
    &#8722;
         <complexType name="getData">
    &#8722;
         <sequence>
    <element name="String_1" type="string" nillable="true"/>
    <element name="String_2" type="string" nillable="true"/>
    <element name="int_3" type="int"/>
    </sequence>
    </complexType>
    &#8722;
         <complexType name="getDataResponse">
    &#8722;
         <sequence>
    <element name="result" type="string" nillable="true"/>
    </sequence>
    </complexType>
    &#8722;
         <complexType name="getMoreRows">
    &#8722;
         <sequence>
    <element name="int_1" type="int"/>
    <element name="int_2" type="int"/>
    <element name="int_3" type="int"/>
    </sequence>
    </complexType>
    &#8722;
         <complexType name="getMoreRowsResponse">
    &#8722;
         <sequence>
    <element name="result" type="string" nillable="true"/>
    </sequence>
    </complexType>
    &#8722;
         <complexType name="insertData">
    &#8722;
         <sequence>
    <element name="String_1" type="string" nillable="true"/>
    </sequence>
    </complexType>
    &#8722;
         <complexType name="insertDataResponse">
    &#8722;
         <sequence>
    <element name="result" type="string" nillable="true"/>
    </sequence>
    </complexType>
    &#8722;
         <complexType name="login">
    &#8722;
         <sequence>
    <element name="String_1" type="string" nillable="true"/>
    <element name="String_2" type="string" nillable="true"/>
    <element name="String_3" type="string" nillable="true"/>
    </sequence>
    </complexType>
    &#8722;
         <complexType name="loginResponse">
    &#8722;
         <sequence>
    <element name="result" type="string" nillable="true"/>
    </sequence>
    </complexType>
    &#8722;
         <complexType name="logout">
    &#8722;
         <sequence>
    <element name="String_1" type="string" nillable="true"/>
    <element name="String_2" type="string" nillable="true"/>
    </sequence>
    </complexType>
    &#8722;
         <complexType name="logoutResponse">
    &#8722;
         <sequence>
    <element name="result" type="string" nillable="true"/>
    </sequence>
    </complexType>
    <element name="getData" type="tns:getData"/>
    <element name="getDataResponse" type="tns:getDataResponse"/>
    <element name="getMoreRows" type="tns:getMoreRows"/>
    <element name="getMoreRowsResponse" type="tns:getMoreRowsResponse"/>
    <element name="insertData" type="tns:insertData"/>
    <element name="insertDataResponse" type="tns:insertDataResponse"/>
    <element name="login" type="tns:login"/>
    <element name="loginResponse" type="tns:loginResponse"/>
    <element name="logout" type="tns:logout"/>
    <element name="logoutResponse" type="tns:logoutResponse"/>
    </schema>
    </types>
    &#8722;
         <message name="myswsSEI_getData">
    <part name="parameters" element="ns2:getData"/>
    </message>
    &#8722;
         <message name="myswsSEI_getDataResponse">
    <part name="result" element="ns2:getDataResponse"/>
    </message>
    &#8722;
         <message name="myswsSEI_getMoreRows">
    <part name="parameters" element="ns2:getMoreRows"/>
    </message>
    &#8722;
         <message name="myswsSEI_getMoreRowsResponse">
    <part name="result" element="ns2:getMoreRowsResponse"/>
    </message>
    Regards,
    Sri

  • How to show 'No Records Found' and 'Employee Name Unknown' in oracle report

    Hello,
    I'm using 6i and building a report to show employees who have incorrectly input their time. I have an input parameter so a user can select a specific employee by emp_id or can leave it empty to show all. That part works. I also have date parameters that are required. That works too. However I am having trouble displaying 'NO Records Found' if the date parameters have no late or rejected employee time records. I currently have it as a text field arranged behind the emp_name field which i filled white. It works...however i have a pretty good feeling there is a better way to do this. Also, I have some data that is null since i am using two tables. There are time stamps with no emp_name or emp_number. I still need to show these records but want them to show up as "Employee Name Unknown" that way the user doesnt get confused and thinks the emp_name in the row above also includes this row.
    select e.location "Clock Location",
    e.emp_no "Emp No",
    l.first_name ||' ' || last_name "Name",
    e.time_stamp "Time",
    from emp_time e, master_all l
    where e.emp_no (+) = l.emp_no
    and e.status = 'rejected'
    --and e.emp_no  = nvl (:p_emp_no, emp_no)
    --and e.time_stamp between :p_start_date and :p_end_date                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hi,
    So, when the join between emp_time and master_all produces no rows, you still want one row of output, saying 'No Records Found'; is that right?
    If so, you can outer-join the result set to dual, with some join condition that accepts anything.
    Use CASE (or equivalents) to get special values (like 'No Record Found' or 'Employee name unknown') when certain columns are NULL.
    For example:
    SELECT     j.location     AS "Clock Location"
    ,     j.emp_no     AS "Emp No"
    ,     CASE
              WHEN  j.name     IS NULL
              THEN  'No Records Found'
              ELSE  j.name
         END          AS "Name"
    ,     time_stamp     AS "Time"
    FROM     dual     d
    ,     (     -- Begin in-line view j, join of emp_time and master_all
              SELECT     e.location
              ,     e.emp_no
              ,     CASE
                       WHEN  l.first_name IS NULL
                       AND       last_name    IS NULL
                       THEN  'Employee name unknown'
                       ELSE  l.first_name || ' ' || last_name
                   END     AS name
              FROM      emp_time     e
              ,     master_all     l
              WHERE     e.emp_no (+)       = l.emp_no
              AND      e.status (+)       = 'rejected'
    --           AND     e.emp_no (+)        = NVL (:p_emp_no, emp_no)
    --           AND       e.time_stamp (+)  BETWEEN :p_start_date
                                             AND        :p_end_date
         ) j     -- End in-line view j, join of emp_time and master_all
    WHERE     d.dummy     != j.name (+)
    ;In an outer join, all conditions involiving the optional table need a + sign; otherwise, the effect is the same as an inner join.
    The message 'No Records Found' is a string, so it has to go in a string column.
    I put it in the "Name" column, just because I knew that "Name" was a string.
    You can put in in any other column if you wish. If that column is not already a string, then use TO_CHAR to make it a string.
    You could also have a column just for this message.
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables, and also post the results you want from that data.
    DOUBLE U wrote:
    I've tried nvl in the select statement but since emp_name is a concatination of first and last name it doesnt work. This is what i have tried
    nvl(l.first_name|' '||l.last_name,'NO EMPLOYEE RECORD FOUND') "Employee",I assume you meant to have two | characters, not just one, after first_name.
    The first argument to NVL will never be NULL in that case; it will always contain at least a space, whether or not the other columns are NULL. You could say:
    NVL ( NULLIF ( l.first_name || ' ' || l.last_name
        , 'NO EMPLOYEE RECORD FOUND'
        )        "Employee",bujt I find it less confusing to use CASE, as shown above.

  • My deleted contacts still show up when I want to send a text message. But when I go to my address book there not there only when I want to send a text MSG there name comes up and if I select them it only show there number not name in the message.  How an

    My deleted contacts still show up when I want to send a text message. But when I go to my address book there not there only when I want to send a text MSG there name comes up and if I select them it only show there number not name in the message. How an I get rid of that

    Try this...
    have a text convo with the person you want to delete. Go to the top contact in the text convo, hit edit contact, and delete that contact.
    That resolution came from another thread on this issue, and this did solve to poster's issue.

  • How to Change the Alias name for Internet user in SU01 tr code through cod?

    Hi Guys,
                 My req is we have to change the Alias name(SU01 tr code) for the existing users thru code.So can anybody tell me how to change the Alias name like which we do it in SU01 tr code thru code or FM.?
                Is there any FM for tha changing Alias Name?
    Thanks,
    Gopi.

    Hello Gopi Anne ,
                                 You can use the following FM / BAPI :
    BAPI_USER_CHANGE
    MY_BAPI_USER_CHANGE
    For BAPI_USER_CHANGE :
    You need to make use of the IMPORT parameter :
    ALIAS     TYPE     BAPIALIAS                               User Name Alias
    ALIASX     LIKE     BAPIALIASX                               User alias change flag
    Thanks,
    Greetson

  • 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

Maybe you are looking for

  • Can one organize a playlist in the grid or artist view in iTunes 11?

    can one organize a playlist in the grid or artist view in iTunes 11, i.e visually? the playlist as just a list of songs/ artists is a hopeless & very frustrating way to orgaize a list of maybe 30 songs/ artists that i might have downloaded in one ses

  • MIGO Error for subcontracting scenario through PO

    Hello All, We have PR PO process where PR is created for subcontracting and then PO with BOM explode in PO for same material for in and out. User is getting error while posting MIGO for Subcontracting GR though PO. Though 541 stock has been transferr

  • How to compile this file!!!

    Hi folks I'm trying to compile and create jar file from the following but without success http://stein.cshl.org/jade/distrib/ file name is jadex.tar.gz Could you please try it and reply best regards

  • ORA_HASH

    Just want to know how ORA_HASH function works internally in ORACLE database

  • Retaining Two-Page Scrolling when Exporting to Interactive PDF Not Working

    I'm currently trying to export from InDesign a continuous facing page PDF. My document has four pages and is set up as pages, not spreads. Left page is even, right is odd. Looks fine in InDesign. I need to do Interactive due to hyperlinks, etc. I cho