Problem in solving the alias name in queries.

hello
I have an application which utilizes a query to take data from a database table & write to an XML file and vice-versa. I have a problem in solving the alias name in queries.
e.g Select EmpID as EmployeeID from Employee.. Where EmpID is the original Column name in Table, and when i have the result set metadata, i am not able to get the Original Column name EmpID? is there any other way to get it? or it is b'cos of the JDBC driver?
i have tried using:
rsmd.getColumnLabel(int position) ==> gives EmployeeID rsmd.getColumnName(int position) ==> gives EmployeeID and not EmpID
Kindly help.
Thanks

Hi,
When you alias the column, you are giving it a new name to the result set. You can use the metadata to get to the actual column name
ResultSetMetaData rsmd = rs.getMetaData();
String colname = rsmd.getColumnName(i);
Here " i " is the index for the column.
Hope this will help you.
Anil.
Developer Technical Support
Sun Microsystems Inc,
http://www.sun.com/developers/support

Similar Messages

  • Host name on SSL certificate did not match the alias name in the URL addres

    To the XI gurus,
    One of our vendors had problem to send us xml invoices because the url address had our server alias name and the SSL certificate we asked them to install had the server name.
    To resolve this issue, can we install two certificates (one has the alias name and one has the server name) at our XI server or we can only have one SSL certificate installed at any time?
    Thanks!
    Fisher Li

    Fisher Li,
    > we can only have one SSL certificate installed at any time?
    To my knowledge we can install  only one certificate.
    Cheers
    Agasthuri

  • Unable to open the Projects from Project center with the Alias name PWA 2010

    Hi,
    I am unable to open the Projects from Project center with the Alias name with the server name i am able to open the projects, version is  project server 2010,
    My system is ABC.DC.IN  alias name i have given is DEF.AD.COM  
    With the system name i can able access PWA and all are working fine.
    As i have observed with alias name i can able to login to  pwa and all the server  setting approval center all are working fine but only in the project center i am not able to open the projects (http://DEF.AD.COM/pwa/ProjectDrillDown.aspx .xxxx) its
    is coming in the below of the ie. 
    But with Alias name these are the issues i am facing,
    1.when longing with alias name its asking two times for user name and password
    2.when i click on a project from project center its taking some time and asking for user name and password after i enter user name and password "PAGE cannot displayed" error i am getting.
    3. I have observed one more thing if click on Project details then only this issue  is coming project schedule and project information is also opening with Alias name.
    can any one Help me. 
    Vijay kommireddi

    Hi
    Hope the below link will help you.
    And also please check the browser which you are using as mostly IE 8.0 won't support, Please try it in IE 9.0 and Chrome.
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/c03300d2-2a27-4d5d-b3f6-a3660805e125/alternative-access-mapping-when-accessing-the-site-it-is-asking-for-username-and-password
    Thanks
    Geeth If you feel that the answer which i gave you is Helpful please select it as Answer/helpful.

  • 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 get the alias name of an attribute of a VO from its column name?

    How can I programmatically get the alias name of an attribute of a VO given its column name?
    Often alias and column names are not same when the VO is created (and I don't require them to be the same)

    Hello John.
    I will be more precise. When the VO based on a table comes out from the wizard, it produces xml entries like the following one:
      <ViewAttribute
        Name="ColumnName"
        AliasName="COLUMN_NAME"/>There the column of the table on the DB really is COLUMN_NAME. The wizard mangles that name producing ColumnName as Name property.
    This is ok. I don't want to change this default behaviour.
    What I need is to programmatically get the value of that attribute given its AliasName property value:
    String f(ViewObject vo, String AliasName) {
    return (String)vo.getCurrentRow().getAttributeFromAliasName(aliasName); // getAttributeFromAliasName does not exist
    // instead of return (String)vo.getCurrentRow().getAttribute(Name);
    That is, usually getAttribute expects what in the xml is the Name property. However, I want a sort of getAttribute() expecting the AliasName.
    I hope it's clear.

  • Hi I call you from Iran. Today I encountered a problem I hope you can help me. I have iPhone 5 with version 6.1.4. Jailbreak I would rather not unlock. My problem is that the Operator name (top left) searching ... The appearance of! And no matter how I tu

    Hi
    I call you from Iran.
    Today I encountered a problem I hope you can help me.
    I have iPhone 5 with version 6.1.4. Jailbreak I would rather not unlock.
    My problem is that the Operator name (top left) searching ... The appearance of!
    And no matter how I turn off and I remove the SIM card Sarchyng not stop.
    Even when I'm not on the phone's SIM card No SIM card Does not appear.
    I appreciate your help.
    Thank you for your attention.

    ilove.perspolis wrote:
    Hi
    I call you from Iran.
    Today I encountered a problem I hope you can help me.
    I have iPhone 5 with version 6.1.4. Jailbreak I would rather not unlock.
    My problem is that the Operator name (top left) searching ... The appearance of!
    And no matter how I turn off and I remove the SIM card Sarchyng not stop.
    Even when I'm not on the phone's SIM card No SIM card Does not appear.
    I appreciate your help.
    Thank you for your attention.
    I read this to say that the phone is not jailbroken and the OP does not want to jailbreak it.
    The only way to unlock it is to contact the carrier it is locked to, and ask them to unlock it.
    You are also in the unfortunate position that the iPhone is not supported in Iran due to the international embargo.

  • Problems getting just the file name using an upload component

    Hi everyone, I'm using an upload component on my page and I need to get just the name of the image/file in order to store it in a database, I used the code of the tutorial and It works fine on mozilla but the problem comes when I use Internet Explorer because I get the whole path of the image/file and not just the name of it. I believe the browser is the cause of the problem, I already checked the http://jakarta.apache.org/commons/fileupload/, but I don't understand how to use anything, and not even the code of the tutorial works eventhough it is specified in comments:
    // some browsers return complete path name, some don't
       // make sure we only have the file name
       String justFileName = uploadedFileName.substring
          ( uploadedFileName.lastIndexOf(File.separatorChar) + 1 );If anybody could helpme solve this problem I'd appreciate it so much
    Regards
    Yes
    Message was edited by:
    Yesenia

    Let's walk through the code...
    File.separatorChar is the system-dependent default hame-separator charac tor. This field is initialized to contain the first character of the system property file.separator. On UNIX systems, the value of this field is '/'; on Microsoft Windows systems it is '\\'.
    String justFileName =
    // get the substring of uploadedFileName
    // that starts after the last separator (\ or /)
    uploadedFileName.substring
    uploadedFileName.lastIndexOf(File.separatorChar) + 1
    You say that this statement is returning the complete path name, for example:
    C:\Documents and Settings\All
    Users\Documentos\Mis im��genes\Im��genes de
    muestra\Puesta de sol.jpgSo, we can make an assumption that the File.separatorChar must not be \, or else the statement would return Puesta de sol.jpg.
    We know that it works for you on Solaris/Mozilla.
    We also know that Misha has tested the statement in IE and it works for him.
    (And I know that this tutorial was tested by a software engineer and a quality engineer, and it worked for both of them, as well as the tutorial author and a peer).
    So, what is different here??????
    Can you print out File.separatorChar and see if it is '\\' (I think the first \ is an escape char, that is \\ (escape-escape) is the equivalent of \ (backslash)) or '\'?
    When you run it on another machine, how are you deploying it on the other machine? Is it deployed to Solaris and running on Windows?
    Have you tested to see if it works on a Windows machine using Mozilla?
    Thanks in advance for any light you can shed on the problem.

  • Not able to get the Alias Name(Member Description) in FR by using Planning

    Hi All,
    we are using the 11.1.2 version in my project. While i am developing the FR repots by using planning database i am not able to find the Member name in my report, but i am able to see the option. MemberName, Alias and Both. If i check the Alias or both its giving only member name only.
    Any ides on this or any post are there prior this .
    Thanks in Advance.
    Rao

    Rao,
    Thanks for the info! It is strange that despite having alias name report is populating member name. It is not the first time strange things hapend with FR.
    Can you please check if you are connecting to same data source where you see alias name? Can you pull alias name from SmartView?
    Venu

  • A problem caused by the file name

    hi,i have a problem today,here is the source file:
    //saved as String.java
    class Strings{
    public static void main(String [] args){
    String x="java";
    System.out.println("x string ="+x);
    and when i try to compile it,the compiler complains as follows:
    javac String.java
    .\String.java:1: duplicate class: Strings
    class Strings{
    ^
    String.java:3: incompatible types
    found : java.lang.String
    required: String
    String x="java";
    ^
    String.java:4: operator + cannot be applied to java.lang.String,String
    System.out.println("x string ="+x);
    ^
    3 errors
    if the file was renamed(such as Strings.java) or add a line of package declearation,
    it would compile fine and run successfully...
    i wonder if it's because the String.class in the java.lang package was covered with
    something else? but i am not sure,please tell me the truth. Thanks!

    Two reasons:
    1. The file name must match the class name. Otherwise, the compiler and the JVM will not be able to locate your class.
    2. It's not a good idea to re-use the names from the core API. You can probably find a way round it, but String is such a commonly used class that it can only be confusing to use the same name.

  • Problem with getting the file name and type from OAMessageFileUploadBean

    Hi Tapash,
    I am trying the code below to get the file name and mime type from OAMessageFileUploadBean,
    DataObject fileUploadData = (DataObject)pageContext.getNamedDataObject("Documents");
    String uFileName = (String)fileUploadData.selectValue(null, "UPLOAD_FILE_NAME");
    String contentType = fileUploadData.selectValue(null, "UPLOAD_FILE_MIME_TYPE");
    But this piece of code gives errors saying that selectValue selectValue(null, java.lang.String) not found in class oracle.svc.DataObject
    Any ideas? why this code is giving error?
    Can i handle the event of browse button for OAMessageFileUploadBean?
    Regards,
    Nagesh Manda.

    Try using class oracle.cabo.ui.data.DataObject
    --Shiv                                                                                                                                                                                                       

  • Problem to solve the server

    Hi all,
    i am using SUN AS 9.0. I have some problems when i am trying to stop server. Before executing the project, it works fine. After that, when i try to stop my server, it didnt stop. Eventhough, i am hardly tried to stop by terminating the process in the task. Its not at all working.
    I dont know how to solve it. It makes admin console to hang.
    Suggest me
    thank you

    Mobileme has moved to moved iCloud:
    http://www.apple.com/icloud/setup/
    Note, if you have Mac OS X 10.6.8 or earlier, read this tip before updating to 10.7:
    https://discussions.apple.com/docs/DOC-6271
    And this tip about changes to iCloud from Mobileme:
    https://discussions.apple.com/docs/DOC-2551

  • Hai i am facing problem in solving the job which cancelled.

    In monitoring the porocess chain the non loading process failed (AND PROCESS) when i went diplay messages the job was cancelled.how to correct the cancelled and where i have to correct.

    Ashok,
    Looks like you have raised a duplicate post for finding cancelled jobs in BI:
    How to find the cancelled job
    am locking the post mentioned since it appears to be a duplicate...

  • 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>

  • Alias Names for Column names in the Prompt

    Hi,
    I have a scenario where I am taking column names into prompt. I have used the following SQL in the SQL results under "Show" option of the Prompt.
    SELECT CASE WHEN 1=0 THEN AGE.AGE ELSE '"Orders"."By OrderDate"' END FROM " Real Time"
    UNION ALL
    SELECT CASE WHEN 1=0 THEN AGE.AGE ELSE '"Orders"."By ShipDate"' END FROM "Real Time"
    My problem here is I am getting the column names into the Prompt as "Orders"."By OrderDate" and "Orders"."By ShipDate", which is not acceptable and readable format for the user. I tried using the alias name in the SQL query this way.
    SELECT (CASE WHEN 1=0 THEN AGE.AGE ELSE '"Orders"."By OrderDate"' END) AS "By OrderDate" FROM " Real Time"
    UNION ALL
    SELECT (CASE WHEN 1=0 THEN AGE.AGE ELSE '"Orders"."By ShipDate"' END) AS "By ShipDate" FROM "Real Time"
    but it is throwing an error.Is there any way that I can assign an alias name for the column names such as OrderDate and ShipDate in the above SQL.
    Your quick respose is appreciated.
    Thanks,
    Rama

    Change ur
    SELECT CASE WHEN 1=0 THEN AGE.AGE ELSE '"Orders"."By OrderDate"' END FROM " Real Time"
    UNION ALL
    SELECT CASE WHEN 1=0 THEN AGE.AGE ELSE '"Orders"."By ShipDate"' END FROM "Real Time"
    To
    SELECT CASE WHEN 1=0 THEN AGE.AGE ELSE By OrderDate END FROM " Real Time"
    UNION ALL
    SELECT CASE WHEN 1=0 THEN AGE.AGE ELSE By ShipDate END FROM "Real Time"
    So that it displays the Name as required
    Then in the Fx for that column in the Report Use '"Orders"."@Presentation variable"'.
    This worked for me Let me know if it worked for you.

  • Generating VO XML File wih alias names for the view attributes

    Hi,
    I am using the WriteXML() method on a VO to generate the XML. I need to map the generated xml to a rtf template and get the PDF generated. I have some view attributes for those I want to give a meaningful alias names, and for the repeated columns say "Name" for each Name field that I select from different tables it gets reflected as Name, Name1 and so . I want to give them proper alias names like Name as Buyer_Name and Name1 as Supplier_name so that its easy to comprehend and also easier to map to the rtf template. I gave alias names to those columns But the alias names of the view attributes are not getting reflected in the XML file generated. The XML tags are still on the attribute Name and not the aliases. Can someone suggest a workaround for this
    Thanks a lot in advance
    Rakesh

    Just to confirm that this is not a Library or deployment setup problem, Now, I changed the deployment scope to include business components in the ViewController to just to be sure it was being picked up in the ViewController too. I Created a separate AppModule in the ViewController and Added the VO to it, It Ran Properly including the Addition and Commit Control.

Maybe you are looking for

  • Payment of premium

    hey guys I have a problem with the payment of premium. the money for the same period, a month, was charged 3 times at paypal!? I do not understand why, because I have no second account or have three times bought premium. have now terminated the subsc

  • F.05 foreing valuation in SL

    I want to use ts f.05 to revaluate some account, but I need that it post only in a special ledger and not in the general ledger. Anyone knows if is it possible? thanks, Cecilia

  • CN41N ABAP Dump

    Hi, When I am tryin to change object type in CN41N it is giving ABAP dump with funtion "AC_system_flush" and this function is calling another function "AC_FLUSH_CALL", Moreover when I checked "AC_FLUSH_CALL" got introduction statement "NO DIRECT CALL

  • How would I create an assembly of forms using only form names?

    I want to create an assembly of forms by passing only the names of the forms stored in the LC repository to the Assembly service. How would I do that? Is the assembly service the correct service to use in this case? Thank you.

  • Missing parts of body for email

    For the last few months, randomly the Mail app will only show a couple of lines of emails when I tap on the message to read it in full. I've tried upgrading the OS, resetting the iPod, syncing it to my computer... nothing. Any ideas?