How to get the weblogic.httpd.session.timeoutSecs value in a JSP file

Hi,
          We are using Weblogic 5.1 SP8. We set weblogic.httpd.session.timeoutSecs=900 in the weblogic.properties file. How can I get this value in a JSP file if I don't use java.util.Properties to parse the properties file?
          Can I use session.getValue(sessionName) to get it? If so, what is the session name for this property?
          Thanks.
          Frank
          

I think something like this should work:
          T3ServicesDef services = T3Services.getT3Services();
               services.config().getProperty("weblogic.httpd.session.timeoutSecs");
          Frank Yu <[email protected]> wrote:
          > Hi,
          > We are using Weblogic 5.1 SP8. We set weblogic.httpd.session.timeoutSecs=900 in the weblogic.properties file. How can I get this value in a JSP file if I don't use java.util.Properties to parse the properties file?
          > Can I use session.getValue(sessionName) to get it? If so, what is the session name for this property?
          > Thanks.
          > Frank
          Dimitri
          

Similar Messages

  • How to get the source code of an HTML page in Text file Through J2EE

    How to get the source code of an HTML page in Text file Through J2EE?

    Huh? If you want something like your browser's "view source" command, simply use a URLConnection and read in the data from the URL in question. If the HTML page is instead locally on your machine, use a FileInputStream. There's no magic invovled either way.
    - Saish

  • How to get the source code of an HTML page in Text file Through java?

    How to get the source code of an HTML page in Text file Through java?
    I am coding an application.one module of that application is given below:
    The first part of the application is to connect our application to the existing HTML form.
    This module would make a connection with the HTML page. The HTML page contains the coding for the Form with various elements. The form may be a simple form with one or two fields or a complex one like the form for registering for a new Bank Account or new email account.
    The module will first connect through the HTML page and will fetch the HTML code into a Text File so that the code can be further processed.
    Could any body provide coding hint for that

    You're welcome. How about awarding them duke stars?
    edit: cheers!

  • How to get the path when i select a directory or a file in a JTree

    How to get the path when i select a directory or a file in a JTree

    import java.lang.*;
    import java.io.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import java.awt.HeadlessException;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.Iterator;
    * @author Frederic FOURGEOT
    * @version 1.0
    public class JTreeFolder extends JPanel {
    protected DefaultMutableTreeNode racine;
    JTree tree;
    protected JScrollPane scrollpane;
    final static int MAX_LEVEL = 1; // niveau max de descente "direct" dans l'arborescence
    * Sous-classe FSNode
    * @author Frederic FOURGEOT
    * @version 1.0
    private class FSNode extends DefaultMutableTreeNode {
    File file; // contient le fichier li� au noeud
    * Constructeur non visible
    private FSNode() {
    super();
    * Constructeur par initialisation
    * @param userObject Object
    FSNode(Object userObject) {
    super(userObject);
    * Constructeur par initialisation
    * @param userObject Object
    * @param newFile File
    FSNode(Object userObject, File newFile) {
    super(userObject);
    file = newFile;
    * Definit le fichier lie au noeud
    * @param newFile File
    public void setFile(File newFile) {
    file = newFile;
    * Renvoi le fichier lie au noeud
    * @return File
    public File getFile() {
    return file;
    public JTree getJTree(){
         return tree ;
    * Constructeur
    * @throws HeadlessException
    public JTreeFolder() throws HeadlessException {
    File[] drive;
    tree = new JTree();
    // cr�ation du noeud sup�rieur
    racine = new DefaultMutableTreeNode("Poste de travail");
    // cr�ation d'un noeud pour chaque lecteur
    drive = File.listRoots();
    for (int i = 0 ; i < drive.length ; i++) {
    FSNode node = new FSNode(drive, drive[i]);
    addFolder(drive[i], node); // on descend dans l'arborescence du lecteur jusqu'� MAX_LEVEL
    racine.add(node);
    // Gestion d'evenement sur JTree (on �coute les evenements TreeExpansion)
    tree.addTreeExpansionListener(new TreeExpansionListener() {
    public void treeExpanded(TreeExpansionEvent e) {
    // lorsqu'un noeud est ouvert
    // on descend dans l'arborescence du noeud jusqu'� MAX_LEVEL
    TreePath path = e.getPath();
    FSNode node = (FSNode)path.getLastPathComponent();
    addFolder(node);
    ((DefaultTreeModel)tree.getModel()).reload(node); // on recharche uniquement le noeud
    public void treeCollapsed(TreeExpansionEvent e) {
    // lorsqu'un noeud est referm�
    //RIEN
    // alimentation du JTree
    DefaultTreeModel model = new DefaultTreeModel(racine);
    tree.setModel(model);
         setLayout(null);
    // ajout du JTree au formulaire
    tree.setBounds(0, 0, 240, 290);
    scrollpane = new JScrollPane(tree);
         add(scrollpane);
         scrollpane.setBounds(0, 0, 240, 290);
    * Recuperation des sous-elements d'un repertoire
    * @param driveOrDir
    * @param node
    public void addFolder(File driveOrDir, DefaultMutableTreeNode node) {
    setCursor(new Cursor(3)); // WAIT_CURSOR est DEPRECATED
    addFolder(driveOrDir, node, 0);
    setCursor(new Cursor(0)); // DEFAULT_CURSOR est DEPRECATED
    * Recuperation des sous-elements d'un repertoire
    * (avec niveau pour r�cursivit� et arr�t sur MAX_LEVEL)
    * @param driveOrDir File
    * @param node DefaultMutableTreeNode
    * @param level int
    private void addFolder(File driveOrDir, DefaultMutableTreeNode node, int level) {
    File[] fileList;
    fileList = driveOrDir.listFiles();
    if (fileList != null) {
    sortFiles(fileList); // on tri les elements
    // on ne cherche pas plus loin que le niveau maximal d�finit
    if (level > MAX_LEVEL - 1) {return;}
    // pour chaque �l�ment
    try {
    for (int i = 0; i < fileList.length; i++) {
    // en fonction du type d'�l�ment
    if (fileList[i].isDirectory()) {
    // si c'est un r�pertoire on cr�� un nouveau noeud
    FSNode dir = new FSNode(fileList[i].getName(), fileList[i]);
    node.add(dir);
    // on recherche les �l�ments (r�cursivit�)
    addFolder(fileList[i], dir, ++level);
    if (fileList[i].isFile()) {
    // si c'est un fichier on ajoute l'�l�ment au noeud
    node.add(new FSNode(fileList[i].getName(), fileList[i]));
    catch (NullPointerException e) {
    // rien
    * Recuperation des sous-elements d'un noeud
    * @param node
    public void addFolder(FSNode node) {
    setCursor(new Cursor(3)); // WAIT_CURSOR est DEPRECATED
    for (int i = 0 ; i < node.getChildCount() ; i++) {
    addFolder(((FSNode)node.getChildAt(i)).getFile(), (FSNode)node.getChildAt(i));
    setCursor(new Cursor(0)); // DEFAULT_CURSOR est DEPRECATED
    * Tri une liste de fichier
    * @param listFile
    public void sortFiles(File[] listFile) {
    triRapide(listFile, 0, listFile.length - 1);
    * QuickSort : Partition
    * @param listFile
    * @param deb
    * @param fin
    * @return
    private int partition(File[] listFile, int deb, int fin) {
    int compt = deb;
    File pivot = listFile[deb];
    int i = deb - 1;
    int j = fin + 1;
    while (true) {
    do {
    j--;
    } while (listFile[j].getName().compareToIgnoreCase(pivot.getName()) > 0);
    do {
    i++;
    } while (listFile[i].getName().compareToIgnoreCase(pivot.getName()) < 0);
    if (i < j) {
    echanger(listFile, i, j);
    } else {
    return j;
    * Tri rapide : quick sort
    * @param listFile
    * @param deb
    * @param fin
    private void triRapide(File[] listFile, int deb, int fin) {
    if (deb < fin) {
    int positionPivot = partition(listFile, deb, fin);
    triRapide(listFile, deb, positionPivot);
    triRapide(listFile, positionPivot + 1, fin);
    * QuickSort : echanger
    * @param listFile
    * @param posa
    * @param posb
    private void echanger(File[] listFile, int posa, int posb) {
    File tmpFile = listFile[posa];
    listFile[posa] = listFile[posb];
    listFile[posb] = tmpFile;

  • Question: how to get the adobe plug in to play a downloaded flv file ?

    I want to know how to get the flv adobe plug in which i downloaded as a result abc or nbc or cbs.com i forget exactly which said i had to and also it seems to be used for playing most all videos from web such as those from utube,hulu, etc. So my question is how do i get the plug in to play any downloaded *.flv video ?  The particulars on the one i have is:
    Output folder: C:\WINDOWS\system32\Macromed\Flash
    Execute: "C:\WINDOWS\system32\Macromed\Flash\uninstall_plugin.exe"
    Extract: NPSWF32.dll
    Extract: NPSWF32_FlashUtil.exe
    Extract: flashplayer.xpt
    also perhaps FLVPlayer.swf of about 9Kb may have something to do with it?
    And the latest update i have was about jan 13 when it seemed to automatically take over my system and update itself.x
    I know it has the ability to do what i want- which is full screen cropped ,change aspect ratios etc. and seems
    It has to be able to or else it could not play the files and give those options which it does on some videos like from utube etc. in the first place. Unfortuneately it has something also to do with the useless *.swf files which are apparently of no use to anything and could certainly be eliminated .
      I have downloaded several freebie flv players such as bs player etc. etc. but they all have so many faults and are not suitable. Bs player does what i want but it hangs , have to go to system mgr. to get out of it sometimes , often difficult to use etc.etc. The main features is i need is to be able to make and play playlists to automatically in full screen one after the other in a specified order with NO user intervention and the ability to magnify or 'pan in' i guess they call it and change aspect ratios so that i can have full screen as if just cropping part of horizontal such as if want to view a 16/9 aspect ratio on a computer as i have with the prior standard 4/3 aspect and change a downloaded vertically stretched to a cropped instead etc.
        Also it doesn't make sense to download others and take up disk space when already have the adobe - also adobe seems to be the only one that plays hulu flv's correctly - on other flv players the video and audio are way out of sync and not just by few seconds but often by a minute or more. I know there is another 'pain' way to do it which is create a *.avi or other extension with loss of clarity etc. which have done but would like to be able to just do it in real time while playing the flv file itself as for example
    as bs player does.
       Anyway if there is no way to get adobe to do this does anyone know of any other free flv player downloads which will do what
    i want - basically playlists, magnify , pan,crop and still full screen, change aspect ratios -  other than bs player ?

    The plugin is what it is: a browser plugin - it cannot act as a standalone player.
    To play local flv files you either need to
    download/install the standalone player (Projector) from http://www.adobe.com/support/flashplayer/downloads.html
    download/install Adobe Media Player http://www.adobe.com/products/mediaplayer/

  • How to get the leading zeros for decimal values?

    Hi,
      How i wil get the leading zeros for decimal values.For CONVERSION_EXIT_ALPHA_INPUT it is not working.Now iam using overlay condition for getting leading zeros.But iam getting the value like 00013.500.But as per my requirement i want to display this value 0000013.5.
    my code is
                    overlay w_MetLife_detail-rdempsalary with '000000000'
                    data :rdempsalary     type char9
    Please help me on this.
    Regards,
    Sujan

    Hi
    For more info,
    The function of the statement UNPACK is based on the fact, that the BCD display of a decimal place corresponds to the second half-byte of code of a digit in the most character representations. This conversion is commonly called "unpacking".
    The statement PACK to pack is obsolete and can be replaced by MOVE.
    If destination is specified as untyped field symbol or as untyped formal parameter and is not flat and not character-type during execution of the statement, then an untreatable exception occurs in Unicode programs. In non-Unicode programs, an exception occurs only with deep types, whereas flat types are treated as character-type types.
    Example
    After the assignments,char1 and char2 contain the values "123.456" and "0000123456".
    DATA: pack  TYPE p LENGTH 8 DECIMALS 3 VALUE '123.456',
          char1 TYPE c LENGTH 10,
          char2 TYPE c LENGTH 10.
    MOVE   pack TO char1.
    UNPACK pack TO char2.
    Regards

  • How to get  the last used session id for a browser session

    In HTMLDB 2.0 it is not possible to start a page with authentication without a SESSION_ID and when you start a public page without a SESSION_ID, then every time a new SESSION_ID is generated when you don't use the SESSION_ID in the URL.
    In the same browser session I want to make a URL call to a HTMLDB page without a SESSION_ID and this page has to give back the last used SESSION_ID.
    How can I do that?

    Fred - You could record that session ID in a table. Each time your authenticated application runs, it would update that table with the "latest" session ID, perhaps using an application process. Then when you are formulating the URL to the public page from another application, you'd get the session ID from that table. Or you could use the page sentry component of your app's authentication scheme to send a cookie to the browser on every page view. The cookie would contain the session ID and the other application could access the cookie to complete the URL.
    Scott

  • How to get the Weblogic Server Id from within java code

    I would like to log which server (among a cluster) a certain job is running on. Is there a way to get the server id from within Java code (this code is in a session bean if that is relevant.)
    By server id I mean the "Name" column in the summary of servers on the weblogic console.
    Thanks,
    ken

    Use the two entries close to the bottom of the page: "list WebLogic
    MBeans:listMBeans.jsp
    display MBean attributes and operations:showMBean.jsp"
    Nils
    Anatoly wrote:
    >
    Cameron,
    That page has these items on it:
    which one do you think helps with my issue?
    Misc WebLogic examples
    LongRunningTask
    Execute tasks in parallel using WebLogic Execute Threads
    Weblogic stats (5.1)
    Reload Servlet(s) programmatically (5.1)
    Network classload from WebLogic:using reflection,or the launcher
    Weblogic 5.1 debugging properties
    Seppuku pattern readme
    Using dynamic proxies to intercept EJB invocations (6.1)
    list WebLogic MBeans:listMBeans.jsp
    display MBean attributes and operations:showMBean
    Thanks to Marcelo Caldas for filter by type option and nice UI!
    Using com.sun.jdmk.comm.HtmlAdaptorServer with WebLogic 6.1
    Cool
    EJBGen
    Dimitri
    back
    "Cameron Purdy" <[email protected]> wrote in message news:<3c7a745d$[email protected]>...
    JMX ... see http://dima.dhs.org/misc/ for some info on JMX in Weblogic.
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    Clustering Weblogic? You're either using Coherence, or you should be!
    Download a Tangosol Coherence eval today at http://www.tangosol.com/
    "Anatoly" <[email protected]> wrote in message
    news:[email protected]..
    Does anyone know who to get the managing server URL's port
    from within the EJB code running on Weblogic 6.1?
    The URL port is not default (not 7001), but when creating
    initial context, I am not specifying the URL in properties.
    Due to that, trying to the the PROVIDER_URL property from
    environment does not return anything.
    Appreciate any responses.
    -Anatoly
    ============================
    [email protected]

  • How to get the weblogic's look and feel?

    Have you seen the look and feel of weblogic's 7.0 (or 8.0) workshop.
    It's very beautiful!
    I want to make a skin like that, then I can skin my application use the
    pretty skin, but i can not get the theme of workshop, how can i make it?
    reference: www.javootoo.com www.l2fprod.com

    I beleive 1.4.2 has an automatic upgrade feature that will upgrade people to 1.5 once it is released. The problem is that even though java.sun.com has released 1.5, www.java.com has not, which is where the average person will get Java from.
    Another option is to make a custom ButtonUI (other componenets too if u wish) that will use a Gradient to make those 3D looking buttons. If you dig through the Java source, you will see it.
    As far as old projects having this look, as soon as 1.5 is on www.java.com, most people will automatically upgrade to it assuming they are running XP.

  • How to get the output of a procedure in to a log file ?

    Hi, Everyone,
    Could you please tell me
    How do i write the output of a procedure to a log file ?
    Thanks in advance...

    Hi,
    could you please explain me more on how to use the UTL_file to get the output to a log file as in am new to PL/SQL
    my script file is
    EXEC pac_sav_cat_rfv.pro_cardbase (200910,'aaa',100,'test_tbl');
    i need the output of this statement in a log file.
    Could you please explain to me how it can be done.
    thanks in advance

  • How to get the words in an opened but unsaved Voice board file?

    I'm using the software named ViaVoice from IBM, which can change the voice from the computer's microphone to text, and display the words on the Voice board file that the software provides.(See attachment)
    Each time the user speaks two words to microphone, the Voice board displays these words on it(but doesn't save the words in the file automatically). I want to get the words into LabVIEW after the user finished speaking everytime.
    For example, in my application, I want to control a car by user's voice, once the user speaks "to Left", the voice board displays " to Left" on it, LabVIEW reads the voice board file every 2 seconds, once LabVIEW finds the number of words changed, it reads the last two words and does the corresponding task.
    The problem is that how can I get the words into LabVIEW from the Voice board? I can pre-run the ViaVoice, pre-open the Voice board, and pre-save the Voice board as a .doc file or a .txt file, But the ViaVoice can’t save the doc/txt file antomatically as the speaker adds new words on. What should I do?

    the attachment

  • How to Get the min,max and original values in a single query

    Hi,
    I have a task where in i have to the min , max and the original values of  a data set .
    I have the data like below and i want the target as well as mentioned below
    SOURCE
    DATASOURCE
    INTEGRATIONID
    SLOT_DATE
    SLOT1
    SLOT2
    SLOT3
    SLOT4
    SLOT5
    SLOT6
    SLOT7
    SLOT8
    SLOT9
    SLOT10
    1
    101
    201111
    100
    100
    200
    100
    100
    100
    300
    300
    300
    300
    1
    101
    2011112
    200
    200
    200
    200
    100
    100
    100
    100
    200
    300
    TARGET
    DATASOURCE
    INTEGRATIONID
    SLOT_DATE
    SLOT_VALUE
    SLOT MIN
    SLOT_MAX
    SLOT NUMBER
    1
    101
    201111
    100
    1
    2
    SLOT1
    1
    101
    201111
    100
    1
    2
    SLOT2
    1
    101
    201111
    200
    3
    3
    SLOT3
    1
    101
    201111
    100
    4
    6
    SLOT4
    1
    101
    201111
    100
    4
    6
    SLOT5
    1
    101
    201111
    100
    4
    6
    SLOT6
    1
    101
    201111
    300
    7
    10
    SLOT7
    1
    101
    201111
    300
    7
    10
    SLOT8
    1
    101
    201111
    300
    7
    10
    SLOT9
    1
    101
    201111
    300
    7
    10
    SLOT10
    1
    101
    2011112
    200
    1
    4
    SLOT1
    1
    101
    2011112
    200
    1
    4
    SLOT2
    1
    101
    2011112
    200
    1
    4
    SLOT3
    1
    101
    2011112
    200
    1
    4
    SLOT4
    1
    101
    2011112
    100
    5
    8
    SLOT5
    1
    101
    2011112
    100
    5
    8
    SLOT6
    1
    101
    2011112
    100
    5
    8
    SLOT7
    1
    101
    2011112
    100
    5
    8
    SLOT8
    1
    101
    2011112
    200
    9
    9
    SLOT9
    1
    101
    2011112
    300
    10
    10
    SLOT10
    e
    so basically i would first denormalize the data using the pivot column and then use min and max to get the slot_start and slot_end.
    But then i
    can get the min and max ... but not the orignal values as well.
    Any thoughts would be appreciated.
    Thanks

    If you want to end up with one row per slot per datasource etc, and you want the min and max slots that have the same value as the current slot, then you probably need to be using analytic functions, like:
    with t as
    (SELECT 1 datasource,101    INTEGRATIONID, 201111     slotdate, 100    SLOT1, 100        SLOT2,    200    slot3, 100    slot4, 100    slot5, 100    slot6, 300    slot7, 300    slot8, 300    slot9, 300 slot10 FROM DUAL  union all
    SELECT 1,    101,    2011112,    200,    200,    200,    200,    100,    100,    100,    100,    200,    300 FROM DUAL),
    UNPIVOTED AS
    (SELECT DATASOURCE,INTEGRATIONID,SLOTDATE,1 SLOT,SLOT1 SLOT_VALUE
    FROM T
    UNION ALL
    SELECT DATASOURCE,INTEGRATIONID,SLOTDATE,2 SLOT,SLOT2
    FROM T
    UNION ALL
    SELECT DATASOURCE,INTEGRATIONID,SLOTDATE,3 SLOT,SLOT3
    FROM T
    UNION ALL
    SELECT DATASOURCE,INTEGRATIONID,SLOTDATE,4 SLOT,SLOT4
    FROM T
    UNION ALL
    SELECT DATASOURCE,INTEGRATIONID,SLOTDATE,5 SLOT,SLOT5
    FROM T
    UNION ALL
    SELECT DATASOURCE,INTEGRATIONID,SLOTDATE,6 SLOT,SLOT6
    FROM T
    UNION ALL
    SELECT DATASOURCE,INTEGRATIONID,SLOTDATE,7 SLOT,SLOT7
    FROM T
    UNION ALL
    SELECT DATASOURCE,INTEGRATIONID,SLOTDATE,8 SLOT,SLOT8
    FROM T
    UNION ALL
    SELECT DATASOURCE,INTEGRATIONID,SLOTDATE,9 SLOT,SLOT9
    FROM T
    UNION ALL
    SELECT DATASOURCE,INTEGRATIONID,SLOTDATE,10 SLOT,SLOT10
    FROM T)
    select DATASOURCE,INTEGRATIONID,SLOTDATE,slot,slot_value,min(slot) OVER (partition by datasource,integrationid,slotdate,rn) minslot,
        max(slot) OVER (partition by datasource,integrationid,slotdate,rn) maxslot
    FROM   
      select DATASOURCE,INTEGRATIONID,SLOTDATE,max(rn) over (partition by datasource,integrationid,slotdate order by slot) rn,slot,slot_value
      FROM
        (SELECT DATASOURCE,INTEGRATIONID,SLOTDATE,slot,slot_value,
              case when row_number() over (partition by datasource,integrationid,slotdate order by slot) = 1 or
              lag(slot_value) over (partition by datasource,integrationid,slotdate order by slot) <> slot_value
                  then row_number() over (partition by datasource,integrationid,slotdate order by slot)
                  ELSE null
                  END rn
        from unpivoted
    order by DATASOURCE,INTEGRATIONID,SLOTDATE,slot 

  • How to get the length of a field value, not the length of DB's CHAR(20)

    Hello.
    I'm trying to handle a String from my DataBase and get its length:
    String myName;
    int i;
    PreparedStatement sql = Conn.prepareStatement("SELECT NAME FROM MY_TABLE");
    ResultSet results = sql.executeQuery();
    results.next();
    myName = results.getString("NAME");
    i = myName.length();
    out.println("The value is " + myName + " and the length is " + String.valueOf(i) );
    I get:
    " The value is Tom and the lengh is 20 "
    20 is the length of the field (it's a CHAR (20) ), but I would like to get the length
    of 'Tom'.
    On other hand, I would like to detect if this value is 'Tom' or not, but trying with:
    if (myName.equals("Tom")) {...}
    or
    if (myName == "Tom") {...}
    There is no response.
    Any experience?

    myName = results.getString("NAME");
    if(myName!=null) myName = myName.trim(); //Take out trailing spaces
    i = myName.length();Sudha

  • How to get the same period last year value using Fiscal Calendar?

    Hi there,
    I am using DAX in a Tabular Model project but I am getting stuck trying to get the following:
    We are using a Fiscal Calendar (from 01 April to 31 March). 
    Previous Period Value
           Value
    2012
    April
    15
    May
    10
    Jun
    20
    2013
    April
    15
    30
    May
    10
    20
    Jun
    20
    25
    I have tried to use sameperiodlastyear but there is an error saying that this function cannot be used for non contiguous dates. DATEADD is given the same error...
    Could anyone help me getting the right measure expressions for [Previous Period Value]?
    Thanks and best regards,
    Joss

    Hi Joss,
    In SQL Server Analysis Services, we can can compare revenue with the hierarchy periods (year, month, day) by using the PARALLELPERIOD function, and now you want to compare with custom periods. (NOTE: We cannot compare it with the PARALLELPERIOD function
    since
    PARALLELPERIOD function returns a member from a prior period in the same relative position as a specified member. So if the first time span not equal to the second one (such as the first period is 3 days, and the second period is 2 month)).  Here
    is a sample query about PARALLELPERIOD function for your reference.
    with
    set Hotels as
    [Hotels].[Hotel ID].&[1015],
    [Hotels].[Hotel ID].&[5640],
    [Hotels].[Hotel ID].&[8800]
    set Period as [Arrival Date].[Date].[Month].&[2012]&[1]:[Arrival Date].[Date].[Month].&[2012]&[12]
    member [Arrival Date].[Date].[0] as sum({ Period })
    member [Total Amount N-1] as (PARALLELPERIOD([Arrival Date].[Date].[Year], 1, [Arrival Date].[Date].[Year].&[2012]), [Measures].[Total Amount])
    select
    [Measures].[Total Amount],
    [Measures].[Total Amount N-1]
    } on 0,
    nonemptycrossjoin
    Hotels,
    Hotels.[Hotel].children,
    *{[Arrival Date].[Date].[0]}
    } on 1
    from [Booking_Cube]
    Regards,
    Charlie Liao
    TechNet Community Support

  • How to get the first or last row value from a group using ntile

    I want to query and use ntile to divide by data in 4 groups (quartiles). I got this part no problem and it returns the list of rows and the ntile bucket value for each one.
    What I want though is to get only the first row from each ntile group (so in effect the max, q3, median, q1 and min values from the whole result). Of course I coud get max, min and median directly using the other functions, but how about the values for q3 and q1?
    My query contains this:
    NTILE(4) OVER (ORDER BY salary DESC NULLS LAST) as ntile
    So I want the highest, lowest, middle, q3 and q1 values for the salaries.
    Should I be using NTILE, ROWNUM, PERCENTIL_DIST....?
    Any ideas? Thanks in advance.

    SQL> select ename,sal,
      2  NTILE(4) OVER (ORDER BY sal DESC NULLS LAST) as ntile
      3  from emp
      4  /
    ENAME             SAL      NTILE
    KING             5000          1
    FORD             3000          1
    SCOTT            3000          1
    JONES            2975          1
    BLAKE            2850          2
    CLARK            2450          2
    ALLEN            1600          2
    TURNER           1500          2
    MILLER           1300          3
    WARD             1250          3
    MARTIN           1250          3
    ENAME             SAL      NTILE
    ADAMS            1100          4
    JAMES             950          4
    SMITH             800          4
    14 rows selected.
    SQL> select  ename,
      2          sal
      3    from  (
      4           select  ename,
      5                   sal,
      6                   ROW_NUMBER() OVER (PARTITION BY ntile ORDER BY sal DESC NULLS LAST) as rn
      7             from  (
      8                    select  ename,
      9                            sal,
    10                            NTILE(4) OVER (ORDER BY sal DESC NULLS LAST) as ntile
    11                      from  emp
    12                   )
    13          )
    14    where rn = 1
    15  /
    ENAME             SAL
    KING             5000
    BLAKE            2850
    MILLER           1300
    ADAMS            1100
    SQL> SY.

Maybe you are looking for

  • Passing values from HTML to JSP method,

    Hello: I am starting to wonder if what I am doing will ever work... Ok, I am trying to avoid javascript. I have a drop-down list named "year" and I wish to call a JSP method that is defined/declared in the same JSP. First, I want to pass the chosen o

  • External Hard Drives not recognised

    I have a few different external hard drives on which I have stored photos and movies etc. I used to keep them attached and on all the time, but decided some time back it might be better to leave them off until required. I now have OSX 10.5.8 on my Ma

  • Thunderbolt to FireWire 800

    Hey, Just wondering - where is the Thunderbolt to FireWire 800 adapter? Apple promised it by the end of July. I cant find any news. This is a big determining factor in whether or not to return my MBPR. Thanks!

  • Orphaned Blob Files

    We run a gwcheck post office and library maintenance / fix process once a week. we see a large number of the following error message for a single user, different file name for each instance Error 50- Orphaned Blob file: 46ADBF20.000 I suspect the 'do

  • How to separate 2 divisions via authorization; Big Picture needed

    Hi, we are going to use our CRM System for a second Division and we are planning to do this with the SAP Authorization Concept. (Main Issue: Div 2 is not allowed to see the BPs of Div 1) I found some relevant SAP Notes for this; for example Note 5453