Iteratively inserting values based on the condition

PUB_USER_TABLE
COMM_ID|PUB_USER_ID|
123 |1234577 |
345 |3456777 |
678 |6789077 |
USS_XREF_TABLE
COMM_ID | XREF_ID|
123 | 1234 |
345 | 3456 |
678 | 7890 |
UI_SERVICE_TABLE
XREF_ID
1234
3456
7890
SD_ENTITY
XREF_ID | ED_DESC
1234 | PASSPORT
3456 | PASSPORT
7890 | ABC
I NEED TO INSERT THE RECORD IN THE BELOW TABLE AS FOR THE QUERY WHICH I WROTE
Insert into service_subscription_detail (SSID,SRVC_ID|,LPUB_ID,SPUB_CD,SP_STATSU_CD,SE_IND,MFDT,MFDI,CRET_TIME_STMP,UPDATE_TIME_STMP,REQ_IND)
values (select max(XREF_ID)+1 from SSD_DETAILS_TABLE,17,(SELECT A.PUB_USER_ID'AnyEmail'
FROM PUB_USER_TABLE A, USS_XREF_TABLE B, UI_SERVICE_TABLE C, SD_ENTITY D
WHERE A.COMM_ID = B.COMM_ID
AND C.XREF_ID B.XREF_ID
AND C.XREF_ID = D.XREF_ID
AND D.XREF_ID = B.XREF_ID
AND d.ED_DESC = 'PASSPORT'),'NO','1','0',null,null,SELECT SYSDATE FROM DUAL,SELECT SYSDATE FROM DUAL,'N');
and also i want to put the where condition for the insert like below
Insert into service_subscription_detail (SSID,SRVC_ID|,LPUB_ID,SPUB_CD,SP_STATSU_CD,SE_IND,MFDT,MFDI,CRET_TIME_STMP,UPDATE_TIME_STMP,REQ_IND)
values (select max(XREF_ID)+1 from SSD_DETAILS_TABLE,17,(SELECT A.PUB_USER_ID'AnyEmail'
FROM PUB_USER_TABLE A, USS_XREF_TABLE B, UI_SERVICE_TABLE C, SD_ENTITY D
WHERE A.COMM_ID = B.COMM_ID
AND C.XREF_ID B.XREF_ID
AND C.XREF_ID = D.XREF_ID
AND D.XREF_ID = B.XREF_ID
AND d.ED_DESC = 'PASSPORT'),'NO','1','0',null,null,SELECT SYSDATE FROM DUAL,SELECT SYSDATE FROM DUAL,'N');
WHERE A.COMM_ID = B.COMM_ID
AND C.XREF_ID B.XREF_ID
AND C.XREF_ID = D.XREF_ID
AND D.XREF_ID = B.XREF_ID
AND d.ED_DESC = 'PASSPORT'
is this possible? also need help in correcting the above query
SSD_DETAILS_TABLE
XREF_ID|SRVC_ID| LPUB_ID | SPUB_CD | SP_STATSU_CD| SE_IND | MFDT | MFDI | CRET_TIME_STMP | UPDATE_TIME_STMP | REQ_IND|               
78901 | 17 | 4444444ABCDE |     NO |     1 | 0     |NULL | NULL | <CURRENT DATE TIME> |<CURRENT DATE TIME>| N |
78902 |     17 | 5555555ZZZZZZZZZ |     NO |     1 | 0     |NULL | NULL | <CURRENT DATE TIME> |<CURRENT DATE TIME>| N |
78903 | 17 | 1234577AnyEmail |     NO |     1 | 0     |NULL | NULL | <CURRENT DATE TIME> |<CURRENT DATE TIME>| N |
78904 |     17 | 3456777AnyEmail |     NO |     1 | 0     |NULL | NULL | <CURRENT DATE TIME> |<CURRENT DATE TIME>| N |
i am getting subquery return more than one value error. should i need to user curoser and fetch the values and insert?
i am using 10gDB
Edited by: [email protected] on May 14, 2009 3:37 AM

Hi,
I modified the above query as shown below
DECLARE
CURSOR anyEmailService IS
SELECT A.PUB_USER_ID'AnyEmail' as public_usr_id
FROM PUB_USER_TABLE A, USS_XREF_TABLE B, UI_SERVICE_TABLE C, SD_ENTITY D
WHERE A.COMM_ID = B.COMM_ID
AND C.XREF_ID B.XREF_ID
AND C.XREF_ID = D.XREF_ID
AND D.XREF_ID = B.XREF_ID
AND d.ED_DESC = 'PASSPORT'
anyEmailServiceData anyEmailService%ROWTYPE;
BEGIN
OPEN anyEmailService;
FETCH anyEmailService INTO anyEmailServiceData;
WHILE anyEmailService%FOUND LOOP
Insert into service_subscription_detail (SSID,SRVC_ID,LPUB_ID,SPUB_CD,SP_STATSU_CD,SE_IND,MFDT,MFDI,CRET_TIME_STMP,UPDATE_TIME_STMP,REQ_IND)
     values ((select max(XREF_ID)+1 from SSD_DETAILS_TABLE),17,anyEmailServiceData.public_usr_id,'NO','1','0',null,null,SYSDATE,SYSDATE,'N');
FETCH anyEmailService INTO anyEmailServiceData;
END LOOP;
CLOSE anyEmailService;
COMMIT;
END;
it worked fine.
thank you

Similar Messages

  • Inserting new columns based on the condition!

    Hi guys,
    I have a very simple query like the following… 
    SELECT table2.column_code2,
    table2.column_description2,
                 table2.column_code1,
                 table1.column_description1
    FROM database_001.table2 table1 LFET OUTER JOIN database_001.table2 table1 on (table2.column_code1 = table1.column_code1)
    From this query, its returning me a result set of something like below:
    column_code1       column_description1        column_code2                 column_description2
    RO1                              BOOK                              RL1            
                               PDF/ECOPY
    RO2                              PAPER                             RL2            
                            CONFERENCE
    RO5                            JOURNAL 
    RL11  OTHER
    Now, on the above query I want to insert three extra columns with the name (status, location and contact) where the results in the extra three columns would be based on the conditions I want to define in the query based on the above results…
    Something for example (sorry, I am not trying to write a condition: my question is how to write it), 
    if column_code1 = RO1 and column_description2  =  PDF/ECOPY on status column it should return a value ‘ONLINE’ & on location column it should return ‘WEB’ and on contact column it should write ‘BOB’.
    Also,
    if column_code1 = RO5 and column_description1 = JOURNAL on status column it should return a value ‘ON PRESS FOR PRINT’ & on location column it should return ‘S.R STREET, LONDON’ and on contact column it should write
    ‘SMITH’ like below result…so the final output should be the top four columns and the extra three columns…I hope someone can help me into this…thanks a lot…
    status                                            location                
                            contact
    ONLINE                                               WEB                          
                           BOB
    ON PRESS FOR PRINT                     S.R STREET, LONDON                           SMITH

    Hi artistdigital,
    you can use case statment for same in sql server. MSDN link - > http://technet.microsoft.com/en-us/library/ms181765.aspx
    Try code like this:
    SELECT table2.column_code2,
    table2.column_description2,
    table2.column_code1,
    table1.column_description1,
    case when column_code1 = 'RO1' and column_description2 = 'PDF/ECOPY' then 'ONLINE'
    when column_code1 = 'RO5' and column_description1 = 'PDF/ECOPY' then 'ON PRESS FOR PRINT'
    end as [status],
    case when column_code1 = 'RO1' and column_description2 = 'PDF/ECOPY' then 'WEB'
    when column_code1 = 'RO5' and column_description1 = 'PDF/ECOPY' then 'S.R STREET, LONDON'
    end as [Location],
    case when column_code1 = 'RO1' and column_description2 = 'PDF/ECOPY' then 'BOB'
    when column_code1 = 'RO5' and column_description1 = 'PDF/ECOPY' then 'SMITH'
    end as [contact]
    FROM table2
    join table1
    on table2.column_code1 = table1.column_code1
    Regards Harsh

  • Can we take standard report for all sales orders based on the condition typ

    Hi all,
    Based on the condition type, we need to take a report for sales orders on the particular date.
    Thanks and Regards.....VM

    Hello again.
    Searching for a solution, I found a Logical Database for sales orders, that have all the information that you need.
    Using like reference the post of Bhagavatula, in the same transaction SQVI you can use, instead of the suggested join, you can select a logical database called VAV in Data source.
    This logical database links the tables, VBAK, VBAP, VBUK and KONV that is the central point of the question.
    You can list the information of logical database using the transaction SLDB.
    In 'Logical Database' inform VAV.
    Press F8 to list all the fields.
    More information about logical database in:
    Link: [SAP Logical Database|http://help.sap.com/saphelp_46C/helpdata/EN/9f/db9b5e35c111d1829f0000e829fbfe/content.htm]

  • Value based on the periodic unit price (only with pr.ctrl S)

    Dear all,
    There is this field in mateial master called "Value based on the periodic unit price (only with pr.ctrl S)" in accounting view 1,
    1 - May I know what is this field about (in between our company using material ledger).
    2 - May I know why the value of this field are different between our company period 6 and period 7 for this year? what contribute to it? and is it something wrong with different value between two different period or absolutely normal?
    Thanks.
    Tuff

    Dear all,
    Does anyone know my question?
    Thanks,
    tuff

  • Value based on the periodic unit price(only with pr.ctrl S) field in MatMas

    Dear all,
    There is this field in mateial master called "Value based on the periodic unit price (only with pr.ctrl S)" in accounting view 1,
    1 - May I know what is this field about (in between our company using material ledger).
    2 - May I know why the value of this field are different between our company period 6 and period 7 for this year? what contribute to it? and is it something wrong with different value between two different period or absolutely normal?
    Thanks.
    Tuff

    Hi Tuffy,
    For your 1st query:
    PUP field in Accounting 1 (if ML is active, Price Determination indicator=3) is the result of Actual Costing Run (CKMLCP) closing entry.
    For your 2nd query:
    In most of the cases the values will be different in Previous Period and Current Period. e.g.Period 6 values are the results of Actual Costing Run (CKMLCP) in 1st week of Period 6 for Previous Period (i.e. Period 5). Period 7 values are the results of Actual Costing Run (CKMLCP) in 1st week of Period 7 for Previous Period (i.e. Period 6).
    The reason for the different values: Price differences, Exchange rate differences, Price/Exchange rate differences from Low lower materials, etc.
    Thanks & Regards,
    ADI

  • Value based on the periodic unit price (only with pr.ctrl S) field in mat.

    Dear all,
    There is this field in mateial master called "Value based on the periodic unit price (only with pr.ctrl S)" in accounting view 1,
    1 - May I know what is this field about (in between our company using material ledger).
    2 - May I know why the value of this field are different between our company period 6 and period 7 for this year? what contribute to it? and is it something wrong with different value between two different period or absolutely normal?
    Thanks.
    Tuff

    Hi Tuffy,
    For your 1st query:
    PUP field in Accounting 1 (if ML is active, Price Determination indicator=3) is the result of Actual Costing Run (CKMLCP) closing entry.
    For your 2nd query:
    In most of the cases the values will be different in Previous Period and Current Period. e.g.Period 6 values are the results of Actual Costing Run (CKMLCP) in 1st week of Period 6 for Previous Period (i.e. Period 5). Period 7 values are the results of Actual Costing Run (CKMLCP) in 1st week of Period 7 for Previous Period (i.e. Period 6).
    The reason for the different values: Price differences, Exchange rate differences, Price/Exchange rate differences from Low lower materials, etc.
    Thanks & Regards,
    ADI

  • Need to show the images in calculated column based on the condition in sharepoint 2013.

    Hi ,
    I'm working in sharepoint 2013, In this i want to show an image in calculated column based on the condition, but image is not showing .
    In sharepoint 2010 its working with help of javascript in content editor on the same page. Same thing i tried in SP 2013. but doesn't work.
    Could any one please give proper solution for this?
    Thanks in advance.
    by,
    Siva.

    Hi please provide the JS you have used in the content editor as well as the calculation for the column so we can better understand what's maybe differs?
    Blog: chrisstahl.wordpress.com Twitter:
    @Cstahl

  • Is there a way to fill a cell with a value based on the selection from another cell?

    For example: If have a drop down menu created for Cell A1 with options (Dog 1, Cat 2, Bird 3). Is there a way to fill cell A2 automatically when I select from the drop down menu.
    So if I selected 'Cat' in A1, cell A2 would automatically input the 2.

    I suggest an extensible method that allows you to add other animals:
    This method adds a small table called "Animal Lookup" that matches names (same as in the pop-up menu) with a value.
    The table on the left uses this table to retrieve the value based on the animal:
    B2=VLOOKUP(A2, Animal Lookup :: A:B, 2, 0)
    select B2 and fill down

  • Column value coloring Based on the condition in ssrs 2008

    Hi,
    I need to change color formating based on below conditions
    Red if <=28 days or > 65 days       
    Green if >28 and <=60 days       
    Yellow if > 60 days and <=65 days
    <=0 No color
    I tried with below IIF condition it's not working.
    =iif(Fields!HDSI13.Value<=0,
    "No color",iif((Fields!HDSI13.Value<=28
    or Fields!HDSI13.Value>64),"Red",iif((Fields!HDSI13.Value>29
    and Fields!HDSI13.Value<=60),"Green",iif((Fields!HDSI13.Value>60
    and Fields!HDSI13.Value<=65),"yellow",Nothing))))
    Can any one help me on this.
    Thanks,
    Manasa.
    Thank You, Manasa.V

    hi all,
    When i wrote like this in table report ...woking fine.
    =iif(((Fields!HDSI13.Value<=28
    and Fields!HDSI13.Value>0)
    or Fields!HDSI13.Value>64),"Red",iif((Fields!HDSI13.Value>=29
    and Fields!HDSI13.Value<=60),"Green",iif((Fields!HDSI13.Value>=61
    and Fields!HDSI13.Value<=65),"yellow",iif(Fields!HDSI13.Value<=0,"Nocolor",""))))
    Thank You, Manasa.V

  • Get Old Value and the new value based on the date

    Hi
    I have a table called roster created below with following insert statements.
    CREATE TABLE ROSTER
    ROSTER_EMPLOYEE_DEF_ID NUMBER,
    EMPLOYEE_ID NUMBER,
    DEFINITION_REGION_CODE NUMBER,
    DEFINITION_DISTRICT_CODE NUMBER,
    DEFINITION_TERRITORY_CODE NUMBER,
    START_DATE DATE,
    END_DATE DATE
    INSERT INTO ROSTER
    (ROSTER_EMPLOYEE_DEF_ID,EMPLOYEE_ID,DEFINITION_REGION_CODE,DEFINITION_DISTRICT_CODE,DEFINITION_TERRITORY_CODE,START_DATE,END_DATE)
    VALUES
    (1,299,222,333,444,'1-JUN-2011','30-JUN-2011')
    INSERT INTO ROSTER
    (ROSTER_EMPLOYEE_DEF_ID,EMPLOYEE_ID,DEFINITION_REGION_CODE,DEFINITION_DISTRICT_CODE,DEFINITION_TERRITORY_CODE,START_DATE,END_DATE)
    VALUES
    (2,299,223,334,445,'1-JUL-2011','20-JUL-2011')
    INSERT INTO ROSTER
    (ROSTER_EMPLOYEE_DEF_ID,EMPLOYEE_ID,DEFINITION_REGION_CODE,DEFINITION_DISTRICT_CODE,DEFINITION_TERRITORY_CODE,START_DATE,END_DATE)
    VALUES
    (3,299,224,335,446,'1-AUG-2011','30-AUG-2011')
    INSERT INTO ROSTER
    (ROSTER_EMPLOYEE_DEF_ID,EMPLOYEE_ID,DEFINITION_REGION_CODE,DEFINITION_DISTRICT_CODE,DEFINITION_TERRITORY_CODE,START_DATE,END_DATE)
    VALUES
    (4,300,500,400,300,'1-JUN-2011','20-JUN-2011')
    INSERT INTO ROSTER
    (ROSTER_EMPLOYEE_DEF_ID,EMPLOYEE_ID,DEFINITION_REGION_CODE,DEFINITION_DISTRICT_CODE,DEFINITION_TERRITORY_CODE,START_DATE,END_DATE)
    VALUES
    (5,300,501,401,301,'1-JUL-2011','20-JUL-2011')
    In the above table we have columns like
    EMPLOYEE_ID,DEFINITION_REGION_CODE,DEFINITION_DISTRICT_CODE,DEFINITION_TERRITORY_CODE,START_DATE,END_DATE
    The result i am looking from the above table is based on the EMPLOYEE_ID OF START_DATE AND END_DATE
    I need to get OLD_DEFINITION_REGION_CODE and the NEW_DEFINITION_CODE
    Similarly OLD_DEFINITION_REGION_CODE and the NEW_DEFINITION_REGION_CODE
    and OLD_DEFINITION_TERRITORY_CODE and the NEW_DEFINITION_TERRITORY_CODE
    I need to get one row of data for each employee saying old value and new value
    for employee 299 there are 3 records it must give the new record which is the latest date i.e start date 1-aug-2011 and end date 30-aug-2011 old record will be
    start date 1-jul-2011 and 20-jul-2011
    For the above table data i need to get the data as below
    EMPLOYEE_ID OLD_DEFINITION_REGION_CODE NEW_DEFINITION_CODE OLD_DEFINITION_REGION_CODE NEW_DEFINITION_REGION_CODE START_DATE END_DATE
    299 223 224 334 335 20-JUL-11 30-AUG-11
    300 500 501 400 401 20-JUN-11 20-JUL-11
    Please suggest me to get the above result based on the data. Please let me know if my posts are not clear
    Thanks
    Sudhir

    SELECT  EMPLOYEE_ID,
            OLD_DEFINITION_REGION_CODE,
            NEW_DEFINITION_REGION_CODE,
            OLD_DEFINITION_DISTRICT_CODE,
            NEW_DEFINITION_DISTRICT_CODE,
            OLD_DEFINITION_TERRITORY_CODE,
            NEW_DEFINITION_TERRITORY_CODE,
            START_DATE,
            END_DATE
      FROM  (
             SELECT  EMPLOYEE_ID,
                     ROW_NUMBER() OVER(PARTITION BY EMPLOYEE_ID ORDER BY START_DATE DESC) RN,
                     LAG(DEFINITION_REGION_CODE) OVER(PARTITION BY EMPLOYEE_ID ORDER BY START_DATE) OLD_DEFINITION_REGION_CODE,
                     DEFINITION_REGION_CODE NEW_DEFINITION_REGION_CODE,
                     LAG(DEFINITION_DISTRICT_CODE) OVER(PARTITION BY EMPLOYEE_ID ORDER BY START_DATE) OLD_DEFINITION_DISTRICT_CODE,
                     DEFINITION_DISTRICT_CODE NEW_DEFINITION_DISTRICT_CODE,
                     LAG(DEFINITION_TERRITORY_CODE) OVER(PARTITION BY EMPLOYEE_ID ORDER BY START_DATE) OLD_DEFINITION_TERRITORY_CODE,
                     DEFINITION_TERRITORY_CODE NEW_DEFINITION_TERRITORY_CODE,
                     LAG(END_DATE) OVER(PARTITION BY EMPLOYEE_ID ORDER BY START_DATE) START_DATE,
                     END_DATE
               FROM  ROSTER
      WHERE RN = 1
    EMPLOYEE_ID OLD_DEFINITION_REGION_CODE NEW_DEFINITION_REGION_CODE OLD_DEFINITION_DISTRICT_CODE NEW_DEFINITION_DISTRICT_CODE OLD_DEFINITION_TERRITORY_CODE NEW_DEFINITION_TERRITORY_CODE START_DAT END_DATE
            299                        223                        224                          334                          335                           445                           446 20-JUL-11 30-AUG-11
            300                        500                        501                          400                          401                           300                           301 20-JUN-11 20-JUL-11
    SQL>  SY.

  • Assign varaible a value based on a condition

    How can I assign a conditional numerical value to one variable based on the value of a xml tag. I.e. if it's "company A" assign it 12 if it's "company B" assign it 17. Also be able to use that value later on in the template.
    Thanks in advance

    Use this :
    <?if:COMPANY='company A'?><?xdoxslt:set_variable($_XDOCTX, 'x', 12)?><?end if?>
    <?if:COMPANY='company B'?><?xdoxslt:set_variable($_XDOCTX, 'x', 17)?><?end if?>
    To retrieve and print its value sometime later in the template simply put:
    <?xdoxslt:get_variable($_XDOCTX, 'x')?>
    This is documented here:
    http://download.oracle.com/docs/cd/E12844_01/doc/bip.1013/e12187/T421739T481157.htm#4535390
    Please spend sometime reading the documentation for this.
    regards
    Jorge

  • [ADF BC] Showing a list of values based on the contents of another list

    I have tried to make a simplified example to illustrate what I want to do. Here is a picture of my example schema:
    Example Schema Image
    There are three entity tables: Employee, Department and Location.
    There are also two intersection tabels: Employee_Location and Department_Location.
    My ADF BC model layer is based on this schema.
    What I am trying to do is have a creation process for an employee where you first fill in the employee details (forname and surname), then you assign the employee to a department, then - based on the locations assigned to the department - assign one or more locations to the employee.
    Imagine that the employee is a door-to-door salesman and that each department in is company has several areas of a town that they cover (locations). Each employee will cover a subset of the locations that the department covers.
    The first two steps are easy - the details page can be created using a form on the employee view and the department assignment can be done with a list of values drop down on the departments view.
    The third step is a little more complex. You can use a shuttle to assign one or more locations to the employee, but you shouldn't just show a list of all locations, since some of these will not be covered by the department and therefore not be available to the employee. What I want is only the locations associated with the employee's department to appear in the list.
    So my question is how do I model this using ADF Business Components?
    Also, if an employee is allowed to be assigned to more than one department (adding another intersection table between the employee and department tables), how would I model that?

    Hi,
    For your reference variable name should be simply any name i.e resorts_resort.No need to put @ in front when declaring variable and to refer presentation variable you should use the below syntax
    @{Variable_name}{Default_value} where default_value is some default value you want to give.
    Now coming to your problem you can fulfill your requirement by simply checking constrain checkbox.If you choose all values instaed of SQL results constrain checkbox will appear.Approach followed by you should also work but constrain is an easy option.
    Thanks
    Sandeep
    Edited by: Sandeep Saini on 10-Sep-2010 00:59
    Edited by: Sandeep Saini on 10-Sep-2010 00:59

  • Search Fields value based on the input.

    Hi Experts,
    I was trying to develop a web dynpro with two  input-fields and process the logic based on the input-fields.
    The scenario is,have two Input fields, the value for the first input-field a static search help is assigned and for the second input-field the value are populated on the based of the values selected in the first input-fields.
    so here the values for second input-field depends on the first input-field.
    Please put in your thoughts or suggestion for the scenario.
    Thanks
    Best Regards,
    Lalitkumar.
    Moderator message: wrong forum, please post again in Webdynpro forum.
    Edited by: Thomas Zloch on Jul 9, 2010 1:36 PM

    Please refer the following for achieving the same.
    http://wiki.sdn.sap.com/wiki/display/Snippets/OVSsearchhelp

  • Problem in populating lookup values based on the lookup query from database

    HI all
    I have problem of population look-up values based on look-up query
    I am giving the details what i am trying
    I need to populate the values from the UD_LDAP_USR table into the field of UD_USRGRPC_NisNetTriple of type lookup
    i planned to set the properties of lookup as like this
    look up query as select UD_LDAP_USR_COMMON_NAME as NisNetTriple from UD_LDAP_USR
    ColumnNames as UD_LDAP_USR_COMMON_NAME
    Column captions as UD_LDAP_USR_COMMON_NAME
    Column width as 30
    Lookup Column Name as UD_LDAP_USR_COMMON_NAME
    But when i try to add ColumnName as wht i mentioned above i m getting invalid property exception,update failed
    I am not sure about that are we able to use other Connector table prefix with UD into the another processFrom
    Let me give update on this issue
    Urgent,struck my work here
    thanks
    Nagaraj

    Thanks for the reply raghav
    I tried but it was not working
    I gave like what u specified but no use
    It is throwing exception like set look-up query for the field
    Any one help me out on this issue
    Edited by: Nagaraju Chowdary on Jan 21, 2013 3:41 AM
    Edited by: Nagaraju Chowdary on Jan 21, 2013 3:42 AM

  • Displaying record based on the condition in Crystal report

    Hi All,
    I want to display certain records in crystal based on some condition.
    For example,
    If I am having 5 student records like,
    Name  Mark1 Mark2 Mark3 Total
    aaa      40       50       60      150
    abc      30       60       40       130
    tcr        25      25        25       75
    Now in table i have only 4 fields (STUNAME, MARK1, MARK2, MARK3).
    I have to calculate the total at runtime and if total is greater than 150, then actual record should display in report.
    For example, I can use formula to calculate total but I can calculate total only after each record prints. But i want to calculate total internally only it should display in report if condition satisfies. I dont want to keep one more field for total in crystal report.
    Please help me on this.

    If the filter is not "pushed" down to the database, then Crystal will pull all of the data into memory and then filter it there.  This is not a big deal if you only have a couple of records, but it can significantly slow down a report that is pulling in more than a few records.
    An alternative, if your report is just linking tables in the Database Expert, would be to create a SQL Expression that adds the three fields together.  Using this in the Select Expert WILL push the condition down to the database.
    If you're using a command instead of linking table, they you would add this to the Where clause of the comment.  If you're using a stored proc instead of tables or a command, you would want to do this filter in the code for the stored proc.
    -Dell
    Message was edited by: Dell Stinnett-Christy

Maybe you are looking for

  • Msi k7n2 delta ilsr problem

    hi i have this configuration on my pc: antec true control 550 watts msi k7n2 delta ilsr kingston hyper x pc3700 2x512 mb athlon xp 3200+ seagate 120 gb sata 7200.7 hd ati radeon 9800 pro excalibur ice q i have 2 problems : the first one is that somet

  • Dual-Net : What's it all about???

    Hi,     Looking at http://www.msi.com.tw/program/products/mainboard/mbd_index.php there's an advert at the top of the page advertising 'dual-net'. Now this looks like a socket 745 or 939 motherboard with something using the comm slot - which apparent

  • My ipod classic won't show in itunes after a restore

    My ipod classic would only show apple logo. So I restored it following the appe support instructions. Once this was done it said do not disconnect, ipod will appear in itunes. But it doesn"t and there is still the apple logo on the screen of the ipod

  • Purchasing new iMac 04/22/09 Questions

    I want to purchase an iMac 24" this weekend but I am concerned about the issues with the video cards freezing the computer. Should I not buy one at all or purchase one with the NVIDIA GeForce 130 512MB vs the ATI Redeon HD 4850 512 MB. Is this a bug

  • Where can I find Elements 11 online for a redownload?

    I purchased Elements 11 last June online, downloaded it, and it has worked very well. My computer crashed this weekend and I need to redownload the program. I could not find it. I still have my order number and serial number, but did not see it liste