Multiple display formats for several records coming from the same table

Hello all,
I want to create one Crystal Reports XI report to display several records coming from one table, but I need different display format for different records from that one table.
There is a field RecordType and based on that value, the record will be displayed differently on the report page.
Can I have several sections in the report and to define different SQL query in each of them?
Example of the report I need to see on paper:
================================================
Summary of 216 vehicles:  (the value 216 comes from record with RecordType=1)
Vehicle Category    Number of Vehicles
          A                   5          (this value 5 comes from record with RecordType=2)
          B                   7          (this value 7 comes from record with RecordType=3)
          D                   4          (this value 4 comes from record with RecordType=4)
Category A vehicle numbers:
2345   6789   8765   5543   3452    (these five values come from records with RecordType=5)
Category B vehicle numbers:
9876   8876   9987   4321   6754   5215   4543    (these values come from records with RecordType=6)
Category D vehicle numbers:
2343   2344    2348   2377    (these values come from records with RecordType=8)
==============================================================
Text is fixed (labels), number values are coming from table records.
What would be a good way to do this in Crystal Reports XI ? In Cognos ReportNet, I would just create several Queries (SQL sentences) and place their outputs on a page, one after the other.
I use Crystal Reports XI R2 and Oracle 10g database through and ODBC connection.
Thank you,
Milan

Obaid and Debi,
Thank you for your replies.
I can create multiple sections in the report, but I don't know how to split the 20 records that I get back from the database to be displayed in 5 different report sections.
How can I define different SQL statement for each of 5 report sections?
How can I use cross-tabs to display what I need? Can I define SQL statement for each cross-tab and then I could place only RecordType=1 records into cross-tab-1 and all RecordType=2 records into cross-tab-2 ?
In Cognos ReportNet, I defined 2 Queries (SQL statements) and I just placed them in the report one below the other. Query_1 returns 1 record where RecordType value =1. Query_2 returns 5 records where RecordType value =2 and etc. So each record "section" displays record in the way I want it.
================================
Summary of 216 vehicles:  (the value 216 comes from record where RecordType=1)
Category A vehicle numbers:
2345   6789   8765   5543   3452    (these values come from records where RecordType=2)
================================
How can I do that in Crystal Reports XI ?
How can I run several SQL statements from one report?
Thank you,
Milan

Similar Messages

  • Managing multiple iOS devices on different Apple accounts from the same iMac

    May be a very simple question to answer, but can I manage multiple iOS devices on different Apple accounts from the same iMac?
    I ask as whilst I'm totally Mac'd, my partner who has her own Apple account has a Winows laptop and experiences problems updating iOS software on her iPhone 4S and iPad 3 Gen via the laptop. I'm thinking the problems may be overcome if we manage her iOS devices through my iMac.

    Thanks dwb .... I thought there'd be a catch .... not to keen on all that media and apps on my iMac!
    The specific problem is that whenever she updates to the latsest version of iOS using the latest iTunes for Windows on her PC laptop she seems to lose something in the process. One time she lost all her texts and the other day when updating to 5.1.1 she lost all her reminders. Not the end of the world but frustrating and shouldn't really happen and doesn't happen to me using the iMac and OSX.

  • How to compare two fields from the same table in the select statement

    Hi, friends
    I try to compare tow fields from the same table, but no result,
    For example, this
    data: cptotchek tyep i.
    select count(*) into cptotchek
    from aufk where erdat = aufk-idat2 .
    The result is  cptotchek = 0, but there are the records in aufk , where,  aufk-erdat = aufk-idat2.
    Please, help me, i don't use the loop statement for optimize my program.
    Regards

    Hi  ,
           it will not return  any value   when you are using   column of same table 
           such as Date Field   , Because  while Using Aggregate Function  it will not check with self column
    .      For that you have to take data in one internal table and then you can work on it  .
         And if you are worried about Performance  it will not affect  , untill you are selecting only required data  .
    you can try this way  .
    data: cptotchek type i.
    types : begin of  w_aufk.
            include structure aufk  .
          types : end of  w_aufk .
    data : it_aufk type standard table of w_aufk with header line  .
    select * into corresponding fields of table it_aufk
    from aufk  .
    loop at it_aufk .
    if it_aufk-erdat  = it_aufk-idat2 .
    write : / it_aufk-erdat , it_aufk-idat2 .
    else .
    delete it_aufk .
    endif  .
    endloop.
    Regards
    Deepak.

  • Compare two results from the same table

    i have two results from the same table that i would like to compare. below is my query and the results i want to compare
    SELECT tblItemRoutingBOM.ItemRevID, tblItem.ItemID, tblItem.PartNum, tblItem.ItemName, tblItem.ManufacturerPartNum AS [Mfg Part#], tblItemRoutingBOM.Quantity
    FROM tblItemRouting
    INNER JOIN tblItemRoutingBOM ON tblItemRouting.ItemRoutingID = tblItemRoutingBOM.ItemRoutingID
    INNER JOIN tblItem ON tblItemRoutingBOM.ItemID = tblItem.ItemID
    WHERE tblItemRoutingBOM.ItemRevID in (61,70)
    as you can see i am returning two records using the where clause
    ItemRevID, ItemID, PartNum, ItemName, Manufacturer, Mfg Part#, Quantity
    61,121,331503,.233 Aluminum Sheet,,1
    70,121,331503,.233 Aluminum Sheet,,3
    now what i am looking for is to combine these two together into one row with the following added.  two columns for each QTY, QTY1 = 1 and QTY2 = 3 with a third column added that is the difference between the two QTY Diff = 2
    Any thoughts?

    Here are the two statements that i want to combine, results for each are attached
    SELECT tblItem.ItemID, Sum(tblItemRoutingBOM.Quantity) AS SumOfQuantity, tblItem.PartNum AS [Part #],
    tblItem.ItemName, tblManufacturer.ManufacturerName AS Manufacturer, tblItem.ManufacturerPartNum AS [Mfg Part#]
    FROM tblItemRouting
    INNER JOIN tblItemRoutingBOM ON tblItemRouting.ItemRoutingID = tblItemRoutingBOM.ItemRoutingID
    INNER JOIN tblItem ON tblItemRoutingBOM.ItemID = tblItem.ItemID
    INNER JOIN tblUnits ON tblItem.UnitID = tblUnits.UnitID
    LEFT JOIN tblManufacturer ON tblItem.ManufacturerID = tblManufacturer.ManufacturerID
    WHERE tblItemRoutingBOM.ItemRevID=61
    GROUP BY tblItem.ItemID,tblItem.PartNum,tblItem.ItemName,tblManufacturer.ManufacturerName,tblItem.ManufacturerPartNum
    SELECT tblItem.ItemID, Sum(tblItemRoutingBOM.Quantity) AS Quantity, tblItem.PartNum AS [Part #],
    tblItem.ItemName, tblManufacturer.ManufacturerName AS Manufacturer, tblItem.ManufacturerPartNum AS [Mfg Part#]
    FROM tblItemRouting
    INNER JOIN tblItemRoutingBOM ON tblItemRouting.ItemRoutingID = tblItemRoutingBOM.ItemRoutingID
    INNER JOIN tblItem ON tblItemRoutingBOM.ItemID = tblItem.ItemID
    INNER JOIN tblUnits ON tblItem.UnitID = tblUnits.UnitID
    LEFT JOIN tblManufacturer ON tblItem.ManufacturerID = tblManufacturer.ManufacturerID
    WHERE tblItemRoutingBOM.ItemRevID=70
    GROUP BY tblItem.ItemID,tblItem.PartNum,tblItem.ItemName,tblManufacturer.ManufacturerName,tblItem.ManufacturerPartNum
    114,11,55002,Pepsi Blue Cap,NULL,
    117,5,331501,Marigold Yellow For ABS,NULL,
    121,1,331503,.233 Aluminum Sheet,NULL,
    125,2,331504,Velvet Vinyl .008,NULL,
    114,33,55002,Pepsi Blue Cap,NULL,
    117,15,331501,Marigold Yellow For ABS,NULL,
    121,3,331503,.233 Aluminum Sheet,NULL,
    125,6,331504,Velvet Vinyl .008,NULL,
    my returned result should combine above with two extra columns (two extra columns because i have two results to combine)
    114, 11, 33, 22, 55002, Pepsi Blue Cap, NULL,
    117, 5, 15, 10, 331501, Marigold Yellow For ABS, NULL
    121,1, 3, 2, 331503, .233 Aluminum Sheet, NULL
    125, 2, 6, 4, 331504, Velvet Vinyl .008, NULL
    Columns go as such, ID, QTY1 (for 61), QTY2 (for 70), Diff (QTY1-QTY2), PartNum, ItemName, Mfg, Mfg Part#
    IF the results from one of those two are empty then i would see something like this
    114, 11, 0, 11, 55002, Pepsi Blue Cap, NULL,
    117, 5, 0, 5, 331501, Marigold Yellow For ABS, NULL
    121,1, 0, 1, 331503, .233 Aluminum Sheet, NULL
    125, 2, 0, 2, 331504, Velvet Vinyl .008, NULL

  • How to read the hierarchy data from the same table using loop in AMDP method

    Hi All,
    We have a requirement to get the top partner from BUT050 table.
    Here the Top parent is nothing but the top most in the hierarchy of the partners from BUT050.
    Example:
    For partner 1234 (BUT050-PARTNER1) there is partner 3523(BUT050-PARTNER2) one level above
    For partner 3523(BUT050-PARTNER1)  there is partner 4544 (BUT050-PARTNER2) last level .
    so in this case for the partner 1234 the Top parent is 4544 .
    I have created AMDP Procedure method to get the top-parnet and below given is the logic implemented in AMDP method.
    Here i have implemented a recursive logic with the WHILE loop to get the top most hierarchy partner from the same table BUT050
    IV_Parent is the input partner and ev_top_parent is the output value.
    AMDP Procedure Method:
        DECLARE lv_date VARCHAR(8) := TO_VARCHAR (current_date, 'YYYYMMDD');
        DECLARE found INT := 1;
              iv_partner1 =  SELECT partner1 FROM but050
                              WHERE partner2 = iv_partner
                              AND reltyp = :iv_hierarchy
                              AND date_to >=  :lv_date
                              AND date_from <= :lv_date;
         WHILE found <> 0  do
           select partner1 into ev_top_parent from :iv_partner1;
                           iv_partner1 =  SELECT partner1 FROM but050
                           WHERE partner2 in ( select partner1 from :iv_partner1 where partner1 is not null)
                           AND reltyp = 'ZBP004'
                           AND date_to >= :lv_date
                           AND date_from <= :lv_date;
           select COUNT ( partner1 ) INTO found FROM :IV_PARTNER1;
        END WHILE;
    This method is working fine, but here it is only taking one single partner and getting the top parent as output.
    Now i would like to convert this mehtod so as to accept n number of partners (not one single partner) as input and should process each partner to get the top parent.
    Could anyone guide me how can i handle the given AMDP method further so as to work some how it is within another loop from other AMDP method.
    Thanks.
    Regards,
    Laxman.P

    Hi
    Go to SE11 and enter the hierarchy table name.
    /BIC/H....(infoobject name)...and execute the table and select table entry and delete all....
    Thanks
    TG

  • How to update a table (CUSTOMER) on a Report Server with the data from the same table (CUSTOMER) from another server Transaction server?

    I had an interview question that is:
    How to update a table (Customer) on a server ex: Report Server with the data from the same table (Customer) From another server ex: Transaction server?
    Set up steps so inset, update or delete operation takes place across the servers.
    It would be great if someone please enlighten me in details about this process in MS SQL Server 2008 R2.
    Also please describe would it be different for SQL Server 2012?
    If so, then what are the steps?

    I had an interview question that is:
    How to update a table (Customer) on a server ex: Report Server with the data from the same table (Customer) from another server ex: Transaction server?
    Set up steps so that inset, update or delete operation gets done correctly across servers.
    I was not sure about the answer, it would be great if someone please put some light on this and explain in details about this process in MS SQL Server 2008 R2.
    Also it would be very helpful if you please describe would it be different for SQL Server 2012? If so, then what are the steps?

  • SUM two fileds from different rows from the same table

    I would like to SUM two fileds from different rows from the same table but I don't know how to do that.
    E.g.
    BillingTransactionsIndex      CreateDate      UserType      UserIndex      TransType      Reference      Total      Balance
    2      6/5/2008 15:02      1      51      1      150      -288.2      -288.2
    5      6/8/2008 11:55      1      51      1      157      -1.58674      -289.787
    In the table above I want SUM fields Total and Balance for the first row and the the next row SUM 2nd row Total with 1st row Balance
    Please help
    Thanks

    SQL> with tbl as
      2  (select 1 as ID,  90 as total from dual
      3          union all
      4  select 2 as ID,  23 as total  from dual
      5          union all
      6  select 3 as ID,  15 as total  from dual
      7          union all
      8  select 4 as ID,  20 as total  from dual)
      9  select id , total, sum(total) over (order by ID) as balance from tbl
    10  /
            ID      TOTAL    BALANCE
             1         90         90
             2         23        113
             3         15        128
             4         20        148
    SQL>

  • Retrieve data from the same table

    i have a table with following fields
    emp_no,name,salary,department,dept_prev,prev_emp_no.
    now i want retrieve emp_no,name,salary,department, from the data base for a perticular employeee number along with dept_prev
    but dept_prev is the prev_emp_no dept_prev
    now iam doing two query like this
    first query to retreive name,salary,department
    select name,salary,department from employee where emp_no = 10
    second to retrieve the dept_prev from the same table but this
    dept_prev must be based on prev_emp_no
    select dept_prev from employee where emp_no in(select prev_emp_no from employee where emp_no =10)
    can any one suggest to combine these two queries in a single sql statements, because all the fieldds are from the same table.
    Thanks

    Would this one solve it?
    SELECT emp.NAME, emp.salary, emp.department,
           prev_emp.dept_prev
      FROM employee emp,
           employee prev_emp
    WHERE emp.emp_no      = 10
       AND prev_emp.emp_no = emp.prev_emp_no;
    not tested
    C.

  • Comparing totals from the same table

    I am trying to compare data from the same table..
    i am using an alias of the table to set up the select but i am running into a cartesian set.
    I am comparing data (totals) from different dates from the same table ; i have included the query which is giving me a problem:
    select a.date_in,b.date_in,a.Table_name,
    DECODE(a.schema_name,
    'EZLIVE','ITP','EZAC','ACT','OTHER')AS DEPT,
    a.type,
    a.status,
    a.TOTAL,
    b.total
    from agg_results a,agg_results b
    where a.schema_name=b.schema_name
    and to_char(a.date_in,'mm/dd/yyyy')='&date_in'
    and to_char(b.date_in,'mm/dd/yyyy')='&date_in';
    any help thanks
    Ellery

    I think you need to join in-line views instead of the tables directly. something like:
    SELECT a.date_in,b.date_in,a.table_name,a.dept,a.type,a.status,a.total,b.total
    FROM (SELECT date_in,table_name,
                 DECODE(schema_name,'EZLIVE','ITP',
                                    'EZAC','ACT','OTHER') dept,
                 type,status,total
          FROM agg_results
          WHERE date_in = to_date('&date_in','mm/dd/yyyy') a,
         (SELECT date_in,table_name,
                 DECODE(schema_name,'EZLIVE','ITP',
                                    'EZAC','ACT','OTHER') dept,
                 type,status,total
          FROM agg_results
          WHERE date_in = to_date('&date_in','mm/dd/yyyy') b
    WHERE a.dept = b.deptTTFN
    John

  • Why does iTunes display the same album art for different songs, but from the same artist?

    Hi,
    a couple of days ago I decided I wanted all of my songs to have an album art. Before I didn't actually care, but since I discovered the view mode with the album arts at the top (the fourth one) I began searching for the right arts, since I like it this way.
    I've stumbled upon a problem though. When I add two or more songs from the same artist, iTunes chooses to assign the same album art to the songs. It chooses the album art of the song I added first to my music library. How do I get it to show the proper album art?
    I use a program called 'Mp3Tag' to change all the information of my songs. When it's just a single, I end up having an 'artist', 'title', 'genre' and 'cover'. The rest of the information doesn't bother me. With albums I add more information though.
    Here's an example:
    I added two songs, one being 'Usher - Climax (Kaskade Remix)' and the other one being 'Usher - Scream'. The one added first was 'Scream'. As you can see below, iTunes somehow assigns the same album art to both songs, while clicking on 'get info' clearly shows the songs have different album arts.
    I discovered something else though:
    When adding an 'album name' to the songs, they will show properly, as seen below. The thing is though, I don't want to add an album name. When I sync the songs to my iPod, my 'albums' list will show all of the songs as well, which I don't want.
    Is there any way to solve this another way where iTunes won't sort by album, but by song title?
    Thanks in advance.

    Can anyone please answer my question?

  • Is it possible for several users to share the same user ID and password?

    Is it possible for several iPlanet Calendar Server users to use the same user
    ID and password and to use the same calendar to make changes? If this sharing
    is possible, are there any limitations for multiple users updating the same
    record, and does any database locking take place?
    Yes, more than one person can use the same user ID and password and update the
    same record. The database code uses the First In First Out(FIFO) rule, where
    only one person updates a record at a given time. So, if two users are
    updating the same record, the changes made by the user who updates the record
    last will get written to the record.
    <P>
    If the deployment requirement specifies a shared calendar, where users do not
    have their own users IDs, you can set an appropriate Access Control List(ACL).
    It is also possible to make the calendar publicly writable.

    Hi matrixxzero,
    In my opinion, you want to use the same Apple/iCloud/iTunes ID on both devices. That is exactly what iCloud is designed for - to keep devices with the same Apple ID in sync. Your Mail, Contacts, Calendars, Reminders, Safari Bookmarks, Notes, Photo Stream photos, and Documents will all be kept in sync if you have those options set up on both devices under Settings>iCloud.
    Unless you have some reason to not want to have the same information on both devices, then going with a single ID on both is the way to go.
    Cheers,
    GB

  • Calculating average time from two records from the same table.

    Hi all
    I need to calculate the average time between two events that are recorded in the same table.
    The table is TMS_MESSAGE_AUDIT_LOG
    MESSAGE_ID VARCHAR2(16 BYTE) NOT NULL,
    MESSAGE_VERSION NUMBER(2) NOT NULL,
    CREATE_TM VARCHAR2(18 BYTE) NOT NULL,
    MESSAGE_STATUS VARCHAR2(30 BYTE),
    TRANSACTION_TYPE_NM VARCHAR2(30 BYTE),
    MESSAGE_TP VARCHAR2(3 BYTE),
    WORKFLOW_OBJECT VARCHAR2(30 BYTE) NOT NULL,
    WORKFLOW_REQUEST VARCHAR2(30 BYTE) NOT NULL,
    WORKFLOW_RETURN_CD VARCHAR2(30 BYTE) NOT NULL,
    AUDIT_ACTION VARCHAR2(255 BYTE),
    LAST_UPDATE_USER_LOGON_ID VARCHAR2(12 BYTE),
    LOCAL_TM VARCHAR2(18 BYTE) NOT NULL,
    LOCAL_TIME_ZN_NM VARCHAR2(70 BYTE) NOT NULL,
    LOCAL_DAYLIGHT_IN CHAR(1 BYTE) NOT NULL,
    FPRINT VARCHAR2(30 BYTE)
    What i now need is
    When the MESSAGE_ID is the same i need have the average time between when the MESSAGE_STATUS is AA and BB ( I need the time out of the CREATE_TM field )
    And this for every 15 minutes interval.
    Because this table will become BIG millions and millions of records it needs to be fast.
    Can anybody help me.
    Marcel

    Something like this?
    CREATE TABLE wr_test
    ( message_id                 VARCHAR2(16 BYTE) NOT NULL
    , message_version            NUMBER(2) NOT NULL  -- Assumption: Acknowledged ver > Received ver
    , create_tm                  VARCHAR2(18 BYTE) NOT NULL
    , message_status             VARCHAR2(30 BYTE)
    , transaction_type_nm        VARCHAR2(30 BYTE)
    , workflow_object            VARCHAR2(30 BYTE) DEFAULT 'x' NOT NULL
    , workflow_request           VARCHAR2(30 BYTE) DEFAULT 'x' NOT NULL
    , workflow_return_cd         VARCHAR2(30 BYTE) DEFAULT 'x' NOT NULL
    , audit_action               VARCHAR2(255 BYTE)
    , last_update_user_logon_id  VARCHAR2(12 BYTE)
    , local_tm                   VARCHAR2(18 BYTE) NOT NULL
    , local_time_zn_nm           VARCHAR2(70 BYTE) DEFAULT 'GMT' NOT NULL
    , local_daylight_in          CHAR(1 BYTE) DEFAULT 'x' NOT NULL );
    INSERT ALL
    INTO   wr_test
           ( message_id
           , message_version
           , create_tm
           , message_status
           , local_tm )
    VALUES ( message_id
           , 1
           , create_tm
           , '(Receive)'
           , TO_CHAR(local_tm,'YYYYMMDD HH24:MI:SS') )
    INTO   wr_test
           ( message_id
           , message_version
           , create_tm
           , message_status
           , local_tm )
    VALUES ( message_id
           , 2
           , create_tm
           , 'Wait CLSB Ack'
         , TO_CHAR
           ( local_tm + NUMTODSINTERVAL(DBMS_RANDOM.VALUE(0,2e5),'SECOND')
           , 'YYYYMMDD HH24:MI:SS' ) )
    SELECT ROWNUM AS message_id
         , TO_CHAR(SYSDATE,'YYYYMMDD HH24:MI:SS') AS create_tm
         , DATE '2000-01-01' + DBMS_RANDOM.VALUE(0,3) AS local_tm
    FROM dual CONNECT BY ROWNUM < 100000;
    WITH src AS
         ( SELECT message_id
                , message_status
                , message_version
                , TO_DATE(SUBSTR(local_tm,1,17),'YYYYMMDD HH24:MI:SS') AS dt
                , TO_DATE(SUBSTR(local_tm,1,8),'YYYYMMDD') AS dt_day
                , TO_CHAR(TO_DATE(SUBSTR(local_tm,10,8),'HH24:MI:SS'),'SSSSS') AS dt_sec
           FROM   wr_test
           WHERE  message_status IN ('(Receive)','Wait CLSB Ack') )
    SELECT dt_day + NUMTODSINTERVAL(period,'SECOND') AS dt
         , NUMTODSINTERVAL(AVG(elapsed),'DAY') AS avg_elapsed
         , NUMTODSINTERVAL(MIN(elapsed),'DAY') AS min_elapsed
         , NUMTODSINTERVAL(MAX(elapsed),'DAY') AS max_elapsed
         , COUNT(*)
    FROM   ( SELECT message_id
                  , message_status
                  , dt_day
                  , TRUNC(dt_sec/300)*300 AS period
                  , LEAD(dt) OVER (PARTITION BY message_id ORDER BY message_version) AS ack_dt
                  , LEAD(dt) OVER (PARTITION BY message_id ORDER BY message_version) - dt AS elapsed
             FROM   src ) cal
    WHERE  cal.message_status = '(Receive)'
    GROUP BY dt_day, period
    ORDER BY 1;Replace "wr_test" with "tms_message_audit_log" in the WITH subquery to test on your data.

  • Several chain steps loaing the same table

    I have several files coming from different places that my chain will use to update a table. I have set up a file arrival event for each file, so that when it arrives it is loaded into the same table. The problem is i don't know when each file will be arriving. What's the best way to setup the job chain so there aren't several loads to the same table happening at the same time?
    thanks.

    hi,
    Maybe it is possible to use dbms_lock to restrict access to the table to only one loading step at a time e.g. instead of loading the table, first get a lock, then load into it, then release the lock.
    I can't think of how to set this up cleanly using chain logic.
    -Ravi

  • Print parent to child link or path from the same table

    create table dummy(nodeid number, parentid number, nodename varchar2(20));
    insert into dummy values(100,-1,'homegoods');
    insert into dummy values(101,100,'kitchen');
    insert into dummy values(102,101,'skillet');
    select * from dummy gives:
    nodeid     parentid   node_name
    100         -1         HOMEGOODS
    101         100       KITCHEN
    102         101       SKILLETnote: parent id is the node id in the same table except for the top node.
    select nodeid, nodename, 'i want complete path from parent to child here' as path from dummy where nodeid = 102
    expected result
    nodeid   name     path
    102       skillet     homegoods>kitchen>skillethow can I do this ?
    thanks

    I thought it worked but I guess i am stuck in with real data . Please bear with me. I have never done hierarchical queries -
    there are more ids and fields that I have to put in the condition so here are the new create/insert sample stmnts.
    drop table dummy;
    create table dummy(hdr_id number,node_id number, config_item_id number, parent_config_item_id number,ps_node_name varchar2(20));
    insert into dummy values(35981400,     21400,     24547505,     -1,     'AT2200-10H');
    insert into dummy values(35981400,     21420,     24547506,     24547505,     'AT2200-10H-UWMOD');
    insert into dummy values(35981400,     37020,     24547564,     24547506,     'Corona Treater');
    insert into dummy values(35981400,     37021,     24547565,     24547564,     'None');
    insert into dummy values(35981400,     37024,     24547566,     24547506,     'Corona Type');
    insert into dummy values(35981400,     1877321,25766779,     24547566,     'None');
    select ps_node_name name,'path' from dummy where hdr_id = 35981400
    --I have to have hdr_id=something as a condition as there are numerous rows with different ids.
    so when I query for names in one hrd_id, I should get all names in that session, with paths linking parent to child upto current level.
    expected result :
    AT2200-10H     
    AT2200-10H-UWMOD        AT2200-10H>AT2200-10H-UWMOD
    Corona Treater        AT2200-10H>AT2200-10H-UWMOD>Corona Treater
    None                        AT2200-10H>AT2200-10H-UWMOD>Corona Treater>None
    Corona Type        AT2200-10H>AT2200-10H-UWMOD>Corona Type
    None                        AT2200-10H>AT2200-10H-UWMOD>Corona Type>None
    sorry for the confusion.
    Edited by: OAF-dev on Nov 18, 2009 4:24 PM

  • Want to select individual data as well as aggregate data from the same table

    want to select a, b  from tab1  also need to find in the same table  tab1 need to do sum(b) group by a

    SELECT a,b,0 AS Ord
    FROM tab1
    UNION ALL
    SELECT a,SUM(b),1
    FROM tab1
    GROUP BY a
    ORDER BY a,Ord
    assuming SQL Compact
    If its SQL Server then we have much simpler methods
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

Maybe you are looking for

  • Zip a text file and send as email attachment

    Hi,   I have a requirement to zip a text file and send it as an email attacment. I saw many posts with similar discussion on the forum but none gave me a very clear answer. Have anyone done this? If so please help. Regards, Hari.

  • Windows XP Pro Running on MacBook Pro

    With the MacBook Pro's running on Intel processors, can the MacBook Pro run Windows XP Pro? I love my Mac (currently a 15" G4, before that a Wall Street) but my work requires running applications that work on Windows. Virtual PC use to be descent but

  • Understanding the DECODE statement in an SQL Query......

    Hi, This is my query: SELECT DECODE(IT.master_flag,0,'-',ea_submission_date), DECODE(IT.master_flag,0,'-',ea_approval_date), DECODE(IT.master_flag,0,'-',ea_date), DECODE(IT.master_flag,0,'-',ea_comments) FROM amendment it, {CODE} The master_flag on t

  • Download to EXCEL not working.

    Hi,    in FBL3N report, the option to download to excel is not showing any data on excel. I am doing like below. on the report, I am going to menu LIST -> EXPORT -> SPREAD SHEET. A pop up appears. I am selecting last radio button "All available forma

  • What is the top right button in the color palette used for

    I've seen several tutorials on different mac apps and when they refer to the color palette I see a oval shape button in the top right corner. Maybe that was in 10.5 or latter but I'm using Lion and there is no oval button in my color palette. I see t