Report doubts-Help me to sort out this issue

Dear friends
I have table
Table name - country_master
column name
     country code varchar2(3)
country name varchar2(50)
I have other details
Table Name - Sales_dtls
Column name
sales_date
sales_value
lst_ctry1, - This below 10 column only stores country code
lst_ctry2,
lst_ctry3..
lst_ctr10
How do I Print country name based on country code in my reports
My sample reports output look like this
SALES_DATE SALES_VALUE LST_CTRY1 LST_CTRY2 .. LST_CTRY10
Rgds
Dev

You can join to the country_master table 10 times or create a function to return the name like:
select sales_date
       sales_value
       b.country_name lst_ctry1_name ,
       c.country_name lst_ctry2_name,
       d.country_name lst_ctry3_name,
       k.country_name lst_ctry10_name
  from country_master k,
       country_master d,
       country_master c,
       country_master b,
       sales_dtls a
where a.lst_ctry1 = b.country_code
   and a.lst_ctry2 = c.country_code
   and a.lst_ctry3 = d.country_code
   and a.lst_ctry10 = k.country_code
OR
create or replace function get_country_name(p_code varchar2) return varchar2 is
v_name varchar2(1000);
begin
select country_name
   into v_name
   from country_master
  where country_code = p_code;
return v_name;
end;
select sales_date
       sales_value
       get_country_name(lst_ctry1),
       get_country_name(lst_ctry2),
       get_country_name(lst_ctry3),
       get_country_name(lst_ctry10)
  from sales_dtls a

Similar Messages

  • Please help me to sort out this issue

    Hi,
    I have two user MAIN_USER and TMP_USER both have DBA,CONNECT,RESOURCE privileges.
    While I am creating the below procedure in MAIN_USER, I am getting the error ‘ORA-00942: table or view does not exist’ in the insert statement line FROM TMP_USER.PROD_MASTER.
    CREATE OR REPLACE PROCEDURE MAST_UPLOAD IS
    BEGIN
    INSERT INTO PROD_MAST
              (SELECT *
              FROM     TMP_USER.PROD_MASTER);
    END;
    Please help me to sort out this issue.
    Thanks,
    Jen.

    If the code works for TMP_USER but not for MAIN_USER, then the privileges are not the same. I'm assuming DBA,CONNECT,RESOURCE are roles. Roles are not the only thing that can be assigned to users. Users can have the same roles, but access to different objects. In this case, it looks like one user has access to the table, and the other doesn't.

  • Hi iam using IPHONE4 , when i coonect it to my PC , itunes get hang and don't detect my iphone , how i can sort out this issue plz help me

    Hi iam using IPHONE4 , when i coonect it to my PC , itunes get hang and don't detect my iphone , how i can sort out this issue plz help me

    iPhone, iPad, or iPod touch not appearing in iTunes

  • HT202159 I am unable to download and always asking password after entering the password  also asking same question please help  me to sort out  this problem.

    I am unable to download and always asking the password it's ok for the once and it's asking more and no results only repeating the same so I am unable to download please help me to sort out this problem and my request please sort out from your side  or let me guide .

    Thanks Eric for responding.
    I checked and it does not appear in the Applications folder.
    I tried yesterday on an ethernet connection with a download speed of 2 Mbps but, unfortunately the connection died(It happened from the ISP end, which is out of my control) in between after which there was no trace of the download that happened for so long(till the internet connection death). 
    One more serious query which I am unable to understand. If the internet connection, dies in the midst of the download is in progress why is it so that the state does not persist and one has to restart the entire process again. Is there no solution for this?
    I tried so many times and its the same case after some amount of download it vanishes. So many unsuccessful attempts. I am ****** off now. Is it not possible to see Mavericks? Why does different machines of Apple behave differently? Somewhere it goes smoothly and somewhere like my mine. Why did not Apple release a non apple store version? Is this not a bad sign of letting the users struggle when something is being offered for free?
    The reason I asked as whether we can download the .app of Mavericks is that, there are so many applications that I have downloaded web and have installed. All that works fine. Can't we do the same here? You download a copy of Mavericks installer application and upload it for me in Google drive or like online storage places which can be downloaded and used by me? Help me understand.
    Thanks again.

  • HT201413 i tried to resore my iphone 3GS with itunes but it is showing an error 29 , can anyone help me to sort out this problem?

    i tried to resore my iphone 3GS with itunes but it is showing an error 29 , can anyone help me to sort out this problem

    Try to restore get a error 29 - iPhone 3GS - iFixit
    See if this helps.

  • Please help me to sort out this problem

    Hi All,
    I am using indesign CS4 and Mac OSX. I created one indesign document and did ps to PDF. I used OTF font. After pdf created i realise some characters are come as junk, that means some character like "hn" are come as Ϋ. Then i recreated the PDF with same settings, it's come perfectly without glyph applied.
    Anyone know how it happened and why it happens?
    It is useful bwcause i can't proofread all the contents each time. Because i don't know when it comes wrong!
    Thanks in advance

    Hello,
    We have been having similar Issues as above.
    We are getting font character "Glyphs replacing other characters"
    Specs of the machines
    Mac OsX=10.5.8
    ID version=ID-CS5 ver 7.0.3
    Acrobat Distiller version = 8.0
    Suitcase version=12.1.7 (We do not use suitcase anymore thinking this was the issue, we place the fonts into the Indesign CS5 font folder)
    Fonts we have had this issue with
    Sabon LT Std.
    Garamond MT Regular
    Fairfield LT STD
    TimesLT Std
    Palatino LT Std
    Minion Pro Regular
    Verdana Italic
    Times New Roman PS
    Characters that have been causing the issues.
    io, il, hn, SY
    The characters they are replaced with.
    Ú Ÿ Õ Š Ỳ §
    We run font cache cleaners such as Font Nuke, Font smasher and we even created our own from information found in other places where all the font cache's hide as well as suitcase's.
    We tend to catch this issue in out PDF files we are actually but it does show up in the Indesign file, but you can close indesign and then reopen it and the issue is gone.
    This lead us to believing it was a system font cache issue.
    We process many jobs on a given day via 3 different machines that are setup to create PDF files.
    We have a Process in place that before every job we clean the font cache and restart the machine.  Now I do not know if people are following this procedure all the time but we do have this issue appear like every 3 weeks when we get more work going thru the workflows.
    I am looking for other Solutions to what this could be, would upgrading to cs5.5 help solve this issue? Could it be Indesigns Preference file getting bashed as well?  How can I better search for these characters.
    We have been finding new characters it has replaced so its not always the same characters one time it was
    joŸ =john
    joÚ =john this was the latest.
    Thank you for any responses.
    Matt

  • My iTunes not open it's required quicktime 7.5.5 but i have a mac book 4,1 Mac OS X 10.5.8 so how can i sort out this issue, my iTunes not open it's required quicktime 7.5.5 but i have a mac book 4,1 Mac OS X 10.5.8 so how can i sort out this issue

    hi,
    i have mac book 4,1 mac OS X 10.5.8
    when i open iTunes i can't open, it's requied quicktime 7.5.5 so woh can i sort out this

    QuickTime 7.5.5 for Leopard - http://support.apple.com/kb/DL27
    QuickTime 7.7 for Leopard - http://support.apple.com/kb/dl761
    = New version of Quicktime installed but application reports it needs to have that version installed =
    Open Application > Utilities > System Profiler and check the Quicktime version in Frameworks vs. the version in Applications.  One person had re-installed their operating system.  It had kept the newer Player application but had reverted to an earlier version of the underlying support framework files which many applications utilize.  Re-installing Quicktime 7.7 took care of the problem.  Do this manually, not with Software Update.
    Installation get stuck at "configuring installation" - https://discussions.apple.com/thread/2592979?threadID=2592979  - uninstall Quicktime before installing.

  • HI can u help me to sort out this Matrix Problem

    i ve used the following codes to create matrix in SAP 2007 A Pl 15.
    Set objItem = frmBPMaster.Items.Add("CCMatrix", it_MATRIX)
            Set oMatrixCC = objItem.Specific
            Set oColumns = oMatrixCC.Columns
            oMatrixCC.Layout = mlt_VerticalStaticTitle
    Set objItem = frmBPMaster.Items.Add("CCMatrix", it_MATRIX)
            objItem.Left = 175
            objItem.Width = 230.59
            objItem.Top = 135
            objItem.Height = 150
            objItem.ToPane = 2
            objItem.FromPane = 2
            Set oMatrixCC = objItem.Specific
            Set oColumns = oMatrixCC.Columns
            oMatrixCC.Layout = mlt_VerticalStaticTitle
            Set oColumn = oColumns.Add("#", it_EDIT)
            oColumn.Width = 2
            oColumn.RightJustified = True
            oColumn.Editable = False
            oColumn.DataBind.SetBound True, "", "20_CC"
            Set oColumn = oColumns.Add("CCName", it_EDIT)
            oColumn.TitleObject.Caption = "Credit Card Name"
            oColumn.Width = 16  
            oColumn.Editable = True
            oColumn.DataBind.SetBound True, "", "21_CC"
            oMatrixCC.Clear
            oMatrixCC.AddRow
            oMatrixCC.SetLineData 1      
            oMatrixCC.Columns("#").Visible = False
            oMatrixCC.AutoResizeColumns
    finally It shows multiple of columns in that matrix but i just want like this
    CCname -
    Type      -
    NO        -

    No, I didnt meant it so. Through SDK you arent able to do it with matrix object. The way which is functional I found is create form in screen painter -> you`ll receive srf file (xml) and in this xml is something as
    <action type="add"><item uid="matrixMZ" type="127" left="10" tab_order="0" width="1180" top="53" height="450" visible="1" enabled="1" from_pane="0" to_pane="0" disp_desc="0" right_just="0" description="" linkto="" forecolor="-1" backcolor="-1" text_style="0" font_size="-1" supp_zeros="0" AffectsFormMode="1"><AutoManagedAttribute/><specific SelectionMode="1" layout="0" titleHeight="16" cellHeight="16"><columns>
    and there is cellHeight="16" ...
    The other way is save form as xml (property of form, example is in sdk help) and load it with height property.

  • Help me to sort out this problem...

    hi,
    i am doing an assignment in jsp..there i have a problem..
    i am accessing s database table and printing it on a table like..
    ResultSet rs=st.executeQuery("select * from staff");
    while (rs.next())
    { j=j+1;%>
    <tr><td align="center"><%=rs.getString(1)%></td><td align="center"><%=rs.getString(3)%></td><td><input type="checkbox" name="delete[]" ></tr>
    <%}
    a check box is printing with each record.what i need is that..when the form is submitting i need to pass the value of all the selected chekboxes so that i can delete that particular record from the database table..how can i do that...help me plzzz..
    thanks in advance

    function selectVals(){
            form = document.forms[0];
              selectedValues = "";
              for (var c = 0; c < form.elements.length; c++){
                           if (form.elements[c].type == 'checkbox'){
                             if(form.elements[c].checked){
                               selectedValues = selectedValues+form.elements[c].value + ",";;
                if(selectedValues.length>0){
                        selectedValues = selectedValues.substring(0,selectedValues.length-1);
                   if (selectedValues .length > 0) {
                          document.forms[0].valSelected.value = selectedValues;
    }<html:hidden property="valSelected"/>
    form bean:
    private String[] valSelected = null;
    generate getter/setter for valSelected.

  • My iphone 4s wifi on/off appear grayed out or dim i can not use and battery got problem with retain charge even not in use. and i am in india here no taking my product for repair . how i sort out this issue

    Hi,
    i bought iphone 4s in london but now return to india . right now i can not access wifi option because wifi on/off grayed out or dim . and also battery got problem to retain power it automatically loose power even not in use. i went to local apple service centre they said could not repair in india.they said talk to uk apple centre. so what i do now please any one give guidence .

    You posted in the iPad forum instead of the iPhone forum. To get answers to your question, next time post in the proper forum. See https://discussions.apple.com/index.jspa  I'll request that Apple relocate your post.
     Cheers, Tom

  • Help me to sort out the problem in this Simple Client - Server problem

    Hi all,
    I have just started Network programming in java . I tried to write simple Client and Server program which follows
    MyServer :
    package connection;
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.net.ServerSocket;
    import java.net.Socket;
    public class MyServer {
          * @param args
         public static void main(String[] args) {
              String ss ="";
              try {
                   ServerSocket sockServer = new ServerSocket(6000);
                   Socket clientLink = sockServer.accept();
                   System.out.println("Connection Established");
                   InputStreamReader isr = new InputStreamReader(clientLink.getInputStream());
                   BufferedReader bufReader = new BufferedReader(isr);
                   System.out.println("buf "+bufReader.readLine());
                   try {
                        while ((ss=bufReader.readLine())!=null) {
                             ss+=ss;
                        System.out.println("client message "+ss);
                   } catch (IOException e) {
                        System.out.println("while reading");
                        e.printStackTrace();
              } catch (IOException e) {
                   System.out.println("Can't able to connect");
                   e.printStackTrace();
    }MyClient:
    package connection;
    import java.io.IOException;
    import java.io.OutputStreamWriter;
    import java.io.PrintWriter;
    import java.net.Socket;
    public class MyClient {
          * @param args
         public static void main(String[] args) {
              try {
                   Socket client = new Socket("127.0.0.1",6000);
                   OutputStreamWriter osw = new OutputStreamWriter(client.getOutputStream());
                   PrintWriter pw = new PrintWriter(osw);
                   pw.write("hello");
              } catch (IOException e) {
                   System.out.println("Failed to connect");
                   e.printStackTrace();
    }I got this error message when I start my client program .
    Error message :
    Connection Established
    java.net.SocketException: Connection reset
         at java.net.SocketInputStream.read(Unknown Source)
         at sun.nio.cs.StreamDecoder.readBytes(Unknown Source)
         at sun.nio.cs.StreamDecoder.implRead(Unknown Source)
         at sun.nio.cs.StreamDecoder.read(Unknown Source)
         at java.io.InputStreamReader.read(Unknown Source)
    Can't able to connect
         at java.io.BufferedReader.fill(Unknown Source)
         at java.io.BufferedReader.readLine(Unknown Source)
         at java.io.BufferedReader.readLine(Unknown Source)
         at connection.MyServer.main(MyServer.java:27)I think this is very simple one but can't able to find this even after many times . please help me to sort out this to get start my network programming .
    Thanks in advance.

                   System.out.println("buf "+bufReader.readLine());Here you are reading a line from the client and printing it.
                   try {
                        while ((ss=bufReader.readLine())!=null) {
                             ss+=ss;
                        }Here you are reading more lines from the client and adding it to itself then throwing it away next time around the loop.
                        System.out.println("client message "+ss);... so this can't print anything except 'null'.
                   pw.write("hello");Here you are printing one line to the server. So the server won't ever do anything in the readLine() loop above. Then you are exiting the client without closing the socket or its output stream so the server gets a 'connection reset'.

  • TS2446 please help to find out this issue sorted out ..

    i did all this changes .. and i followed all the istructions , but i still have the same problem when i click to buy any new item from itune store .. etc
    i got a message " your apple ID has been disabled , please contact iTune support .
    hope to hear from you to sort out this issue as soon as possible .  thanks

    These are user-to-user forums, you can contact iTunes support here : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page

  • A query on Flexfield and valuesets.Please help me in sorting out

    We have created a structure in descriptive flexfield with 4 to 5 segments. Among those one segment has a value set with independent validation type. And all the other segments have value set with dependent validation type on the first segment.
    Now the requirement as per client is as follows:
    If first segment is taken as YES, all the other segments are to be displayed and enabled. If it is NO, then all the segments have to disabled.
    We are able to get it in case of YES but if it is NO, all the segments are being displayed.But we even want them to disable or display off.
    Please help me out in sorting out this issue.

    Hi,
    I don't think thats possible, when you have a valueset in which you are referencing a previous parameter using the $FLEX.<Parameter_name> property, apps automatically sets the dependency. The dependent item is automatically enabled as soon as you enter a value in the dependable field. There is no way to set this dependency conditionally.
    What you can do instead is change the query of your valuesets so that it does not have any records
    i.e $FLEX.<Parameter> = 'YES'
    Regards,
    Vikash
    oraclehrmsways.blogspot.com
    Message was edited by:
    vsethi

  • Hi, iam facing proble in synchronizing 4 ni 4472 cards input with pxi -6052e analog output. please help me out to sort out this problem

    hi, iam facing problem in synchronizing 4 ni 4472 cards input with pxi -6052e analog output. please help me out to sort out this problem

    Hi achyuth,
    Thank you for posting on the National Instruments forum.
    I am not sure what you are trying to do.  Are you trying to input and output at the
    same time?  Are you just trying to
    synchronize all of your inputs?  Do you
    want them to run off the same clock?  If
    you could, give me some more information so I can understand your problem
    better.
    In the meantime, this might help you:
    PXI Timing,
    Triggering, and Synchronization Capabilities of E-Series Multifunction Data
    Acquisition ...
    PXI Timing and Synchronization
    Thank You,
    Nick F.
    Applications Engineer

  • I have a Mac mini Snow Leopard. In Numbers the grid lines are so faint that they are barely visible. Please could someone help me sort out this problem.

    I have a Mac mini Snow Leopard. In Numbers the grid lines are so faint that they are barely visible. Pleease could someone help me sort out this problem?

    The User Manual has this:
    Formatting Table Cell Borders
    You can change the line thickness and color of table cell borders. Or you can hide the border of any cell.
    To format table cell borders:
    1 Select the cell border segments you want to format.
    2 Use the controls in the format bar or in the Table inspector.
    Click to choose a stroke color.
    Click to choose a stroke style.
    Click to choose a line thickness.
    Stroke pop-up menu:  Lets you choose a stroke style. Choose None to hide borders.
    Line thickness:  Controls the thickness of the stroke.
    Color well:  Lets you choose a stroke color.
    When you click the color well in the format bar, a color matrix appears. Select a color by clicking it in the matrix, or click Show Colors to open the Colors window for additional color options.
    When you click the color well in the Table inspector, the Colors window opens.
    User Guide: http://manuals.info.apple.com/en_US/Numbers09_UserGuide.pdf

Maybe you are looking for