Sort an object by different fields

Hello!
Sorry for the (maybe) bad englisch but I'm a German.
If I have an object fith different fields for example field1, field2, field3.
To write a method which sorts an array of this objects by a given field?
I mean something like this
sort(String field, object[] o) {
//sort by field
instead of this
sortbyfield1(object o){
//sort by "field1"
sortbyfield2(object[] o){
//sort by "field2"
hope you understood
thanks
Stefan

When faced with this problem I usually use a Comparator helper class. Depending on whether the Comparator can be re-used I'll create a separate class or if not an inner or anonymous inner class. For example:
import java.util.Comparator;
import java.util.Arrays;
import java.util.List;
import java.util.Collections;
public class Main {
  // Compares Fields.f1 ascending
  public Comparator c1 = new Comparator() {
    public int compare(Object o1,
                       Object o2) {
      return ((Main.Fields)o1).f1.compareTo(((Main.Fields)o2).f1);
  public void sortem() {
    // Create our array of objects
    Object[] array = new Object[] {
      new Fields(new Integer(1),3,"3"),
      new Fields(new Integer(2),2,"1"),
      new Fields(new Integer(3),1,"2")
    // Sort on Field.f1 using reusable comparator
    Arrays.sort(array,c1);
    System.out.println(Arrays.asList(array));
    // Sort on Field.f2 using inner class
    Arrays.sort(array,new C2());
    System.out.println(Arrays.asList(array));
    // Sort on f3 using an anonymous inner class
    Arrays.sort(array, new Comparator(){
      public int compare(Object o1,
                       Object o2) {
        return((Main.Fields)o1).f3.compareTo(((Main.Fields)o2).f3);
    System.out.println(Arrays.asList(array));
  public static void main(String[] args) {
    Main m = new Main();
    m.sortem();
  // Class with many fields of different types
  class Fields {
    public Integer f1;
    public int     f2;
    public String  f3;
    public Fields(Integer f1, int f2, String f3) {
      this.f1 = f1;
      this.f2 = f2;
      this.f3 = f3;
    public String toString() {
      return ""+f1+" "+f2+" "+f3;
  // Inner class comparator on Field.f2
  class C2 implements Comparator {
    public int compare(Object o1,
                       Object o2) {
      int result = 0;
      int i1 = ((Main.Fields)o1).f2;
      int i2 = ((Main.Fields)o2).f2;
      if (i1==i1) result = 0;
      if(i1<i2) result = -1;
      else if (i1>i2) result = 1;
      return result;

Similar Messages

  • Efficient datastructure to sort on different fields

    Hi,
    I have to write one program where there are different fields like item number,cost,sales qty,sales price,gross margin etc.
    I need to rank the items depending upon its sold quantity ,sold price & gross margin.
    Moreover there will be power ranking which depends upon average of other 3 rankings.
    Which datasture will be suitable for this ? Should I use one class Item with all these fields & take array of objects of this class & sort the array
    1. first depending upon qty & add unit ranking to class
    2. sort the array depending upon sold price & add sell ranking
    3. sort the array depending upon gross margin & add gross margin ranking .
    4. Then take average of this & accordingly add power ranking.
    Or will it be efficient to write four queries to get data from database sorted by each condition respectively & add the whole data to hashtable.
    Please help me in this. I am bit concerned because all my reports are of this kind. For all reports I am using hashtable with one key & corrosponding vector? Is it efficient or should I use class & keep objects of this class in hashtable?
    Regards,
    Veena

    Hi All,
    Thanks a lot for your response. I am writing a class & keeping objects of these in an array, sorting it four times & accordingly adding ranking to the class. Objects can be more than 1000 but still instead of hitting database 4 times to get data ordered by 4 criterias I am finding it efficient to sort the arrays. Do you agree with me?
    I can not do it in the database using stored procedure because user can choose items of any vendorsat a time e.g. he can choose 2 vendors' items &nedd to see ranking only among these 2 vendors.
    Thanks,
    Veena
    Thanks a lot.

  • Sorting a list of different class objects

    Hi All ,
    How to sort a List a.which contains objects of different Classes, b. objects of same class . Is it possible to sort these by implementing Comparable interface .
    Thanks ,
    Rajesh Reddy

    rajeshreddyk wrote:
    Hi All ,
    How to sort a List a.which contains objects of different Classes, b. objects of same class . Is it possible to sort these by implementing Comparable interface .Well, if objects of different classes are kept in the same List and you want to sort them together they at least have that in common. They're Comparable-able. -:) To manifest that the different classes could all implement a Comparableable interface (or maybe Intercomparable would be a better choise of name.)

  • How to sort a object vector by its integer item ?

    hi everybody,
    [there were few topics on this in the forum, but nothing could solve my problem yet. so, please instruct me]
    I have to sort a vector which contains objects, where each object represents, different data types of values,
    ex: {obj1, obj2, obj3, ....}
    obj1---->{String name, int ID, String[] departments}
    i have to sort this vector at three times, once by name, then by ID and then by departments.
    Leaving name and department , first i want to sort the ID of each object and then re-arrange the order of objects in the array according to new order.
    what i did was, copied the vector all objects' ID values to an integer array then i sorted it using selection sort. but now i want to re-arrange the vector, but i still can't. please guide.
    here is the sort i did, and the
    int[] ID = new int[mintomaxID.size()];
              for(int i=0;i<mintomaxID.size();i++)
                   ObjectStore_initialData obj_id = (ObjectStore_initialData)mintomaxID.elementAt(i);
                   ID[i] = obj_id.getID();
              System.out.println("Before sorting array");
              for(int i=0;i<ID.length;i++)
                   System.out.println(ID);     
              System.out.println();
              int i, j, m, mi;
    for (i = 0; i < ID.length - 1; i++) {
    /* find the minimum */
    mi = i;
    for (j = i+1; j < ID.length; j++) {
    if (ID[j] < ID[mi]) {
    mi = j;
    m = ID[mi];
    /* move elements to the right */
    for (j = mi; j > i; j--) {
    ID[j] = ID[j-1];
    ID[i] = m;
    System.out.println("After sorting array");
    for(int y=0;y<ID.length;y++)
                   System.out.println(ID[y]);     
    //*****here is where i need to re-arrange the entire vector by ID.
    I do understand this is some sort of database sort type of a question. but there's no database. it's simply i just want to sort the vector.
    Thank you.

    hi camickr,
    thank you for the detailed reply. but i still don't understand somethings. i tried to read the API and look for the collections.
    i have ObjectStore_initialData class (similar to person class), so do i still have to do a comparable class out of this class ? please simplify that.
    public class ObjectStore_initialData
         String NAME;
         int ID;
         String[] DPART;     
         public ObjectStore_initialData(String name, int id, String[] departments)
              NAME=name;
              ID=id;
              DPART = departments;
    public String getName()//----
              return NAME;
    public String getID()//----
              return ID;
    public String getDpart()//----
              return DPART;
    /*next class is the interface to collect the values from the user and put all of them at once in a vector*/
    //this class is to sort the vector by ID
    public class sorter
       public sorter()
       public static void sortbyID(Vector mintomaxID)
             int[] ID = new int[mintomaxID.size()];
              for(int i=0;i<mintomaxID.size();i++)
                   ObjectStore_initialData obj_id = (ObjectStore_initialData)mintomaxID.elementAt(i);
                   ID[i] = obj_id.getID();
              System.out.println("Before sorting array");
              for(int i=0;i<ID.length;i++)
                   System.out.println(ID);     
              System.out.println();
              int i, j, m, mi;
    for (i = 0; i >< ID.length - 1; i++) {
    /* find the minimum */
    mi = i;
    for (j = i+1; j < ID.length; j++) {
    if (ID[j] < ID[mi]) {
    mi = j;
    m = ID[mi];
    /* move elements to the right */
    for (j = mi; j > i; j--) {
    ID[j] = ID[j-1];
    ID[i] = m;
    System.out.println("After sorting array");
    for(int y=0;y<ID.length;y++)
                   System.out.println(ID[y]);     
    //*****here is where i need to re-arrange the entire vector by ID.
    /*new comparable class */
    public class ObjectStore_initialData implements Comparable
         String NAME;
         int ID;
         String[] DPART;     
         public ObjectStore_initialData(String name, int id, String[] departments)
              NAME=name;
              ID=id;
              DPART = departments;
    public String getName()//----
              return NAME;
    public String getID()//----
              return ID;
    public String getDpart()//----
              return DPART;
    static class IDComparator implements Comparator
              public int compare(Object o1, Object o2)
                   ObjectStore_initialData p1 = (ObjectStore_initialData )o1;
                   ObjectStore_initialData p2 = (ObjectStore_initialData )o2;
                   return p1.getID() - p2.getID();
    /*how can i put the vector here to sort? */
    public sorter()
    public static void sortbyID(Vector mintomaxID)
    int[] ID = new int[mintomaxID.size()];
              for(int i=0;i<mintomaxID.size();i++)
                   ObjectStore_initialData obj_id = (ObjectStore_initialData)mintomaxID.elementAt(i);
                   ID[i] = obj_id.getID();
              System.out.println("Before sorting array");
              for(int i=0;i<ID.length;i++)
                   System.out.println(ID[i]);     
              System.out.println();
              int i, j, m, mi;
    for (i = 0; i >< ID.length - 1; i++) {
    /* find the minimum */
    mi = i;
    for (j = i+1; j < ID.length; j++) {
    if (ID[j] < ID[mi]) {
    mi = j;
    m = ID[mi];
    /* move elements to the right */
    for (j = mi; j > i; j--) {
    ID[j] = ID[j-1];
    ID[i] = m;
    System.out.println("After sorting array");
    for(int y=0;y<ID.length;y++)
                   System.out.println(ID[y]);     
    /* using collections to sort*/
    Collections.sort(mintomaxID, new IDComparator());
    and to check the new order i wanted to print the vector to command line.
    still it doesn't do anything.
    the url you mentioned is good as i see. but how can i implement that in my class ? please instruct and simplify. i know i just repeated the code, i didn't understand to do a comparable class in collections for this class. Please explain where i'm head to and where's my misleading point here.
    Thank you.
    Message was edited by:
    ArchiEnger.711

  • Is it possible to order a group by a different field

    I have a report that groups everything perfectly by Type.  The issue I am having is trying to order the values returned in each grouping by a different field in the returned data, it is a number.
    Is it possible to sort a group based on a field in the returned data, without having to create another group?

    Never mind, just made the the second field a sub group

  • Split data into different fields in TR

    I have a flat file with space (multiple spaces between different fields) as a delimiter. The problem is, file is coming from 3rd party and they don't want to change the separator as comma or tab delimited CSV file. I have to load data in ODS (BW 3x).
    Now I am thinking to load line by line and then split data into different objects in Transfer rules.
    The Records looks like:
    *009785499 ssss BC sssss 2988 ssss 244 sss 772 sss  200
    *000000033 ssss AB ssss        0  ssss   0 ssss 0 ssss 0
    *000004533 ssss EE ssss        8  ssss   3 ssss 2 ssss 4
    s = space
    Now I want data to split like:
    Field1 = 009785499
    Field2 = BC
    Field3 = 2988
    Field4 = 244
    Field5 = 772
    Field6 = 200
    After 1st line load, go to 2nd line and split the data as above and so on. Could you help me with the code pleaseu2026?
    Is it a good design to load data? Any other idea?
    I appreciate your helps..

    Hi,
    Not sure how efficient this is, but you can try an approach on the lines of this link /people/sap.user72/blog/2006/05/27/long-texts-in-sap-bw-modeling
    Make your transfer structure in this format. Say the length of each line is 200 characters. Make the first field of the structure of length 200. That is, the length of Field1 in the Trans Struc will be 200.
    The second field can be the length of Field2 as you need in your ODS, and similarly for Field3 to Field6. Load it as a CSV file. Since there are no commas, the entire line will enter into the first field of the Trans Structure. This can be broken up into individual fields in the Transfer Rules.
    Now, in your Start Routine of transfer rules, write code like this (similar to the ex in the blog):
    Field-symbols <fs> type transfer-structure.
    Loop at Datapak assigning <fs>.
        split <fs>-Field1 at 'ssss' into <fs>-field1 <fs>-field2 <fs>-field3....
        modify datapak from <fs>
    endloop.
    Now you can assign Field1 of Trans Struc to Field1 of Comm Struc, Field2 of Trans Struc to Field2 of Comm Struc and so on.
    Hope it helps!
    Edited by: Suhas Karnik on Jun 17, 2008 10:28 PM

  • Sort Order Driven By Other Field In PowerView on a Relational Source

    Hi,
    Is there a way to sort an attribute in a chart by a different attribute that is not shown in the chart on a relational source (as e.g. possible with a PowerPivot table source where you can specify to use a different field as sort order)? I achieve the desired
    result as per below:
    but I of course don't want to show the sort order attribute in the chart.
    Thanks for your help!
    Martin

    Hi Martin,
    Do you mean you want to sort the chart by a attribute that not shown in the chart and not in the datasource, right?
    Could you please descript the requirements more clearly.
    Swallow

  • Different field groups in the different account groups

    Dear IT Experts,
    I´m working on restructuring authorization in roles concerning the IC and TP customers.
    The goal of this changes is be able to have different field groups in the different account groups (TP and IC), for give you some more detail a good example can be, the same AMS user should be able to change general data and sales views for TP customers  but for IC he should only be allowed to change the sales views, however when the changes are made in the roles they are being ignored because as far as I could check the system does not have as a rule that the field groups are or can be dependent from the account group...
    I can give you a clear example:
    Role A
    F_KNA1_AEN -> VGRUP = 10-16
    F_KNA1_GRP -> ACTVT = 01, 02, 03
    F_KNA1_GRP -> KTOKD = INTR
    Role B
    F_KNA1_AEN -> VGRUP = 16
    F_KNA1_GRP -> ACTVT = 01, 02, 03
    F_KNA1_GRP -> KTOKD = THIR
    Despite it looks fine, the system is not validating the account group with the correspondent field group in each role, so the field groups that the system use is unique, it means it the content of the object F_KNA1_AEN in total independently of used account group!
    So my question is, can we apply any other object that makes the field group being directly depending of the account group, as we can see for example activities for each account group having something similar for field group and account group?
    Can someone please explain me step-by-step how I can do this work even if by another method?
    I´m quite new on this issues and I really need your wisdom to find a solution for this.
    Many thanks
    Katjia

    Hi Manoj
    The debate is each inidividual business unit has defined different account groups for the same vendor in their respective systems.
    The question is : What is the best practice-- Should we keep Vendor account group as main table field and define Vendors with one unique account groups OR we maintain the account group in qualified table each pointing to different business unit.
    In my opinion this is going to be very complex solution. Ideally we need to define all the Harmonization rules before syndicating data to different target systems.
    Is this possibel that the same vendor record which is existing as vendor of different account groups in different systems have same set of attributes. If yes then enabling the remote key for Account group Lookup field is one option and defining a unique Account group 'AG" (which is mapped to say AG1 from remote system1, AG2 from remote system2 and so on..)..
    Managing this via Qualified table will be very complex and not advisabel. As Rajesh also mentioned Account Group in MDM should be considered as Global attribute and all such harmonization rules should be defined in your project. AG1=AG2=AG in above exmaple.
    Hope this clarifies.
    Thanks-Ravi

  • Object ID and Object ID Version fields in Displaying Object Properties - XI

    Hi,
    In displaying Object Properties in XI we can see different fields like Type, Description, SCV, Object ID, Object ID Version, Status, Person Responsible, Changed On, Changed By, Display Language, Original Language.
    But when i refer to the SAP Library documentation for these fields, Object ID and Object ID Version are not included. Here is the link for the documentation
    http://help.sap.com/saphelp_nw04/helpdata/en/f0/fc9a3de2ec0753e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/f0/fc9a3de2ec0753e10000000a114084/frameset.htm
    With that said, i have no information on those two fields, only assumptions i've made that i would like to verify in this forum with the questions below
    1.
    Please correct me if i'm wrong, the Object ID is the unique identifier for the object and the Object ID Version is directly connected with the versioning concept for IR and ID, so the Object ID is generated when you create the object  (e.g. MM) and the Object ID Version changes every time that object is edited and change list activated for it. Is this correct?
    Or does the Object ID change every time the object is edited and change list activated for it?
    What is the behavior of these two fields when transported? e.g. dev to qa...  are they both retained on the target IB's?  (specifically for ID objects because the change list needs to be activated first on the target ID)
    2.
    Does any one know where the Object ID and Object ID Version gets stored?  (saved on a table in the ABAP stack or saved somewhere in the Java stack? e.g. can be viewed in Visual Admin or a URL)  I am thinking of extracting all the XI objects with their corresponding Object ID and Object ID Version (per system) in one step.  I know this is possible only if the Object ID & Object ID Version are stored in an ABAP table...
    Kindly give me some inputs.
    Please answer directly with the questions above. I will reward points for it.
    Thanks in advance.

    HI,
    >Please correct me if i'm wrong, the Object ID is the unique identifier for the object and the Object ID Version is directly connected with the versioning concept for IR and ID, so the Object ID is generated when you create the object (e.g. MM) and the Object ID Version changes every time that object is edited and change list activated for it. Is this correct?
    The Object Id is created the first time you create the object.
    Object Version Id is created the first time you save/activate a object.
    Now suppose if you modify the object a new Object Version Id will be created but the Object ID will remain the same.
    For IR Objects the Object Id & Object Version ID will remain the same across systems.
    For ID Objects the Object Id & Object Version ID is not the same across systems.
    Not sure about the table. Can you try in SE11 and check all tables with SXMS*. Could be also that tables might not be available from GUI i.e you might have to login to DB to find out.
    Regards,
    Sumit

  • Sorting My objects

    I have a class with some fields.
    I want to sort the objects based on a particular field.
    How to use comparable(Oject o)

    I've posted an example here,
    http://forum.java.sun.com/thread.jsp?forum=31&thread=448348

  • Want to compare same object in different systems

    hi all,
    i want to compare same object in different systems
    example:
    same transfer rule in BID to be compared with the one in BIT/BIP
    in these kind of cases, pls help me on how to do the comparison.
    as i have to do some enhancement in BID and release that changes to BIT/P. but while manually checking i might also miss out any important changes which might create issues.
    pls suggest.

    Could you please use the below table for comparision.
    Cubes      RSDCUBE
    DSO's (to identify DSOu2019s based on time stamp field)     RSODSO
    Multiproviders     RSDCUBEMULTI
    Infosets     RSQISET
    Trasnformations      RSTRAN
    DTP's     RSBKDTP, RSBKDTPSTAT
    Trasnfer strcuture     RSTS
    Infopackages     RSLDPIO
    Update Rules     RSUPDINFO
    Aggregates     RSDAGGDIR/RSDAGGDIR
    Process Chians     RSPCCHAIN
    OHD's     
    data sources status      ROOSOURCE,RSDS
    Regards,
    Saveen Kumar

  • Read line and split into different fields

    I have a flat file with space (multiple spaces between different fields) as a delimiter. The problem is, file is coming from 3rd party and they don't want to change the separator as comma or tab delimited CSV file. I have to load data in ODS (BW 3x).
    Now I am thinking to load line by line and then split data into different objects in Transfer rules.
    The Records looks like:
    *009785499     BC               2988              244        772       200
    *000000033     AB                     0                  0            0           0
    *000004533    EE                     8                  3            2           4
    Now I want data to split like:
    Field1 = 009785499
    Field2 = BC
    Field3 = 2988
    Field4 = 244
    Field5 = 772
    Field6 = 200
    After 1st line load, go to 2nd line and split the data as above and so on. Could you help me with the code pleaseu2026?
    Is it a good design to load data? Any other idea?
    Thanks.

    Hi Mau,
    First capture the data into the internal table (say itab).
    Loop at itab.
      it_final-field1 = itab+1(9).
      it_final-field2 = itab+12(2).
      it_final-field1 = itab+16(4).
      it_final-field1 = itab+21(3).
      it_final-field1 = itab+25(3).
      it_final-field1 = itab+29(3).
      Append it_final.
    Endloop.
    &*********** Reward Point if helpful**********&

  • How do I insert multiple values into different fields in a stored procedure

    I am writing a Stored Procedure where I select data from various queries, insert the results into a variable and then I insert the variables into final target table. This works fine when the queries return only one row. However I have some queries that return multiple rows and I am trying to insert them into different fields in the target table. My query is like
    SELECT DESCRIPTION, SUM(AMOUNT)
    INTO v_description, v_amount
    FROM SOURCE_TABLE
    GROUP BY DESCRIPTION;
    This returns values like
    Value A , 100
    Value B, 200
    Value C, 300
    The Target Table has fields for each of the above types e.g.
    VALUE_A, VALUE_B, VALUE_C
    I am inserting the data from a query like
    INSERT INTO TARGET_TABLE (VALUE_A, VALUE_B, VALUE_C)
    VALUES (...)
    How do I split out the values returned by the first query to insert into the Insert Statement? Or do I need to split the data in the statement that inserts into the variables?
    Thanks
    GB

    "Some of the amounts returned are negative so the MAX in the select statement returns 0 instead of the negative value. If I use MIN instead of MAX it returns the correct negative value. However I might not know when the amount is going to be positive or negative. Do you have any suggestions on how I can resolve this?"
    Perhaps something like this could be done in combination with the pivot queries above, although it seems cumbersome.
    SQL> with data as (
      2        select  0 a, 0 b,  0 c from dual   -- So column a has values {0, 1, 4},
      3  union select  1 a, 2 b, -3 c from dual   --    column b has values {0, 2, 5},
      4  union select  4 a, 5 b, -6 c from dual ) --    column c has values {0, -3, -6}.
      5  --
      6  select  ( case when max.a > 0 then max.a else min.a end) abs_max_a
      7  ,       ( case when max.b > 0 then max.b else min.b end) abs_max_b
      8  ,       ( case when max.c > 0 then max.c else min.c end) abs_max_c
      9  from    ( select  ( select max(a) from data ) a
    10            ,       ( select max(b) from data ) b
    11            ,       ( select max(c) from data ) c
    12            from      dual ) max
    13  ,       ( select  ( select min(a) from data ) a
    14            ,       ( select min(b) from data ) b
    15            ,       ( select min(c) from data ) c
    16            from      dual ) min
    17  /
    ABS_MAX_A  ABS_MAX_B  ABS_MAX_C
             4          5         -6
    SQL>

  • How to get similar color for objects in different pictures

    how do you get similar color for objects in different pictures
    I have a prodject that i'm working on and i need to edit several images at once (preferabley) so that they are the same color. They are wooden cupboards and i need all the wood looking the same colour. In light room you can edit a group of images at the same time hence the colours are the same . Is this possible in Elements ? If so how do i do this ?
    I have tried duplicating layers and it just replaces the whole image, it seems to work using levels layers but not the other layers ... I have 30 more images to do and would ideally not like to adjust all the images manually ? I dont mind doing minor tweaks. Essentially all the images where taken with the same camera and lighting and lens's ...
    Screen shot is where I'm at at the moment...
    I have posted this question else where but was told to repost  - this is a link to my previous post as to where we got to
    http://forums.adobe.com/message/4720576#4720576

    You could try using the raw converter. Open one file and edit it (File>Open, pick the image and choose Camera Raw as the format before you click Open). Then open the next image and click the little four-lined square on the upper right side of the ACR window and choose Previous Conversion from the flyout menu.

  • How to creat a Data provider  based on different fields in SAP BW ?

    Hi,
    Experts,
    There are  20 fields  of  Plant Maintainace  like : 
    SWERK
    BEBER
    STORT
    TPLNR
    EQUNR
    INGRP
    QMDAT   ---peroid
    STTXT
    QMDAT  - Date of Notification
    QMNUM
    QMTXT
    QMART
    AUSVN
    AUZTV
    AUSBS
    AUZTB
    AUSZT
    ERNAM
    QMDAB
    AUFNR
    I  want to creat a  Report based upon these fields  ?
    For that I h'v  checked the relevant Fields to the   existing standard  Datasource  in Bw side   &
    Checked  cubes   created  based upon these Datasource  in Bw side !
    i h'v found  some fields are  existing different cubes & some are  missing .
    How to creat a Data provider  based on different fields in SAP BW ?
    plz suggest      !!!!!!!
    Thanx,
    Asit
    Edited by: ASIT_SAP on Jul 15, 2011 6:25 AM
    Edited by: ASIT_SAP on Jul 15, 2011 6:27 AM
    Edited by: ASIT_SAP on Jul 15, 2011 12:37 PM

    Hi Lee, Please see below..
    DECLARE @Machine2 TABLE
    DispatchDate DATE
    INSERT INTO @Machine2 VALUES ('2014/02/01'), ('2014/02/02'), ('2014/02/03')
    DECLARE @DateFrom DATE
    SELECT @DateFrom = DATEADD(D,1,MAX(DispatchDate)) FROM @Machine2
    SELECT @DateFrom AS DateFrom
    Please mark as answer, if this has helped you solve the issue.
    Good Luck :) .. visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.

Maybe you are looking for

  • Best way to implement an EULA popup (imprint) in RH 9

    Hello there , I have a question about RoboHelp 9. The fact is my help page is divided into 2 iframes. A left sidebar iframe containing a navigation menu, and a right sided iframe, the main one, containing the data. (index, content, ...) The fact is I

  • FileWriter not working correctly?

    hi guys, i experience some problems with fileWriter which make me pretty confused.. here's the sample code tempUrl = url.toString().substring(7).replaceAll("/", ".");         try {             File f = new File(txlog.getText().trim()+File.separator+F

  • Problem in taking the control of my application in the test class

    Hi, I am calling an application(Login) from the test class. This test class tests for blank fields entered for the login application. Once i get the login screen, my program is getting hanged, i mean its not executing the test case unless i press the

  • How can I eliminate the X Marks feature?

    the XMarks pop up appears with almost every session and I have to kill it by escape before I can continue. Can I disable this feature? I don't use and don't want to use it!!

  • Physical Path for Essbase Studio Cubes

    Hi All, I have one doubt regarding Cubes developed in Essbase Studio.I want to know the extact phyical existance path for Essbase Studio. Currently we have an space constraint for Essbase Studio in Server.So,Is there any possibility to change the cub