Solve this query

hi,
i have a number that including number's 20 percent & i want to get that number without 20 percent
for example
600+(600's 20%)=720 ( i hav this number)
and i want 600 as a result
so try to provide me formula to get 600 from 720 and it shuld work on any number.
thks

In the first post, look at the first line: x+x/5=720
It equals x+x*100/20=720
change 20 and go step by step my algoritm and build your query based on it

Similar Messages

  • Can anyone solve this query requirement

    Would like to know if anyone solved this situation in the query before. If yes, or If you have any ideas, could you please share it with me.
    Below is the scenario.
    Cube data: We have a number of 'FACILIIES'. 'Surveys' are conducted for each facility once in every six to 18 months. No fixed time intervals though. And surveys are numbered sequencially, always in the increasing order with respect to time. each survey has a 'survey date'. and a keyfigure 'Count'.                                                  
    DATA IN THE CUBE AS OF 4/30/2005               
    FACILITY...SURVEYID...SURVEYDATE...COUNTKEYFIGURE     
    525...         121...  1/6/2004...         6     
    624...         132...  2/20/2004...    7     
    525...         138...  10/1/2004...    5     
    624...         140...  9/15/2004...    4     
    525...         157...  3/10/2005...    8     
    624...         245...  4/15/2005...    6     
    If the query is run for the above data, is shouls be displayed like this.               
    REPORT AS OF 04/30/2005                    
    FACILITY...LATESTSURVEY...LATESTCOUNT...PREVIOUSSURVEY PRECOUNT
    525... 157... 8... 138... 5
    624... 245... 6... 140... 4
    Once the data is updated further, this is the data in the Cube as of 10/30/2005
    DATA IN THE CUBE AS OF 10/30/2005          
    FACILITY...SURVEYID...SURVEYDATE...COUNTKEYFIGURE     
    525...          121...     1/6/2004...     6     
    624...          132...     2/20/2004...     7     
    525...          138...     10/1/2004...     5     
    624...          140...     9/15/2004...     4     
    525...          157...     3/10/2005...     8     
    624...          245...     4/15/2005...     6     
    525...       290...     8/20/2005...     9     
    624...          312...     10/15/2005...     4     
    REPORT AS OF 04/30/2005                         
    FACILITY LATESTSUREY LATESTCOUNT PREVIOUSSURVEY PRECOUNT
    525...          290...     9...          157...     8     
    624...          312...     4...          245...     6     
    Dynamically, the latest survey and previous survey has to be determined. Any ideas on how to solve... We alrady thought of making changes to the Survey Master data. Any thing that can be done in the query itself?
    thanks
    Gova
    (I could not improve the display format, so I used '...' to separate the fields. may be SDN should look into improving the display format)

    Hi Gova..
    We too had a similar requirement..to get the previous records..
    We had to end up having to populate the Previous record in a seperate field on the same line..
    I think you are on the right path to modify the master data and have the previous survey and previous count populated on every line..
    Good Luck
    Ashish..

  • How to solve this query

    hi,
    i have a product table like
    product month1 month2 month3 .................
    soap 1200 1256 1895 ............
    i want use a query where i can select column name with a parameter.
    like
    select month||:num from product;
    in num variable it cud be 1 to 10 of value that is dependent on my program.
    so how to make this query .
    thxs

    Hi,
    Here is an example that i am helpful.
    In the example , I am using a table 'table_name' which contains columns like
    assign_attribute1
    assign_attribute2
    assign_attribute15
    Now I will pass any number from 1 to 15 to the function.
    create or replace procedure pass_col_number(v_number varchar2) as
    v_sql varchar2(2000);
    v_assign_attribute1   varchar2(150);
    begin
    v_sql := 'select  assign_attribute'||v_number||'  from  table_name where person_id = 1345';
    execute immediate v_sql into v_assign_attribute1;
    dbms_output.put_line('v_assign_attribute1='||v_assign_attribute1);
    end;Edited by: Sreekanth Munagala on Dec 18, 2008 1:18 AM

  • To solve this query

    i want solution for shape & append query as run in access for oracle
    RS.Open "SHAPE {select ID,MAX(Module_Name) AS MainMenu from USER_MODULE GROUP BY ID} APPEND ({select ID,NAME,USER_module.srno,iif(right(param_str,1)='P','ü','') as Allow,iif(left(param_str,1)='A','ü','') as Ins,iif(MID(param_str,2,1)='E','ü','') as Edit,iif(MID(param_str,3,1) = 'D','ü','') as Del,flag,CODE,NAME from USER_MODULE left join user1 on user1.srno=USER_module.srno where user_name='" & Master_Rst!USER_NAME & "' or user_name is null} RELATE ID TO ID) AS AA", G_CompCn, adOpenDynamic, adLockOptimistic

    Hi ,
    Let the Oracle transform this query and the whole Access application using the Oracle Migration Workbench...
    You can download and test it in http://www.oracle.com/technology/software/index.html
    at the bottom of this page....!!!!!!!!!!
    To find out how to use ..., visit the link:
    http://www.oracle.com/technology/documentation/migration.html
    Regards,
    Simon

  • Help me to solve this Query

    Hi All,
    This is Sindhu..
    Here i got an error while excuting the following query related to BLOB data types in Oracle 11g.
    I have to compare two blobs, because my report needs that.
    for this..1st i ran the following package..
    @ORACLE_HOME/rdbms/admin/dbmslob.sql
    then i did this...
    declare
    src_lob BFILE := &src_lob;
    amount INTEGER := &amount;
    dest_offset INTEGER :=1;
    src_offset INTEGER :=1;
    dest_lob BLOB := &dest_lob;
    BEGIN
    dbms_lob.loadfromfile
    dest_lob,
    amount,
    src_lob,
    src_offset,
    dest_offset
    end;
    SQL> /
    Enter value for src_lob: 0820303623ECCFF8DCD9E0DFF11FDF1E1E7C3E6450E444E2E683A3D
    B03FF7B7CFF34FC24244724CF07CBDBC8EB80C034000436007E018801016B01FEFFFEFEFEFE0F7F0
    D07891FF198F1E9E1F304730C
    old 2: 2 src_lob BFILE := &src_lob;
    new 2: 2 src_lob BFILE := 0820303623ECCFF8DCD9E0DFF11FDF1E1E7C3E6450E444E2E
    683A3DB03FF7B7CFF34FC24244724CF07CBDBC8EB80C034000436007E018801016B01FEFFFEFEFEF
    E0F7F0D07891FF198F1E9E1F304730C;
    Enter value for amount: 18446744073709551615
    old 3: 3 amount INTEGER := &amount;
    new 3: 3 amount INTEGER := 18446744073709551615;
    Enter value for dest_lob: 8F2F1FE032E0E0C8C00CF91E2E1F0EDBDDF2D13292203E61614161
    80C0E689FFAEFFD7FEDF38FC3818013941F1C7C4C74FF3FF90F218000D1CAD9F89ED00E000024404
    D76DDFD6DF935F5B0E5C868E87
    old 6: 6 dest_lob BLOB := &dest_lob;
    new 6: 6 dest_lob BLOB := 8F2F1FE032E0E0C8C00CF91E2E1F0EDBDDF2D13292203E616
    1416180C0E689FFAEFFD7FEDF38FC3818013941F1C7C4C74FF3FF90F218000D1CAD9F89ED00E0000
    24404D76DDFD6DF935F5B0E5C868E87;
    ERROR:
    ORA-00972: identifier is too long
    SQL> declare
    2 lob_1 BLOB := &lob_1;
    3 lob_2 BLOB := &lob_2;
    4 amount INTEGER := 18446744073709551615;
    5 offset1 INTEGER :=1;
    6 offset2 INTEGER :=1;
    7 templob INTEGER;
    8 BEGIN
    9 templob :=dbms_lob.compare(lob_1,lob_2,amount,offset1,offset2);
    10 if (templob !=0 ) then
    11 dbms_output.put_line('Files Are Different');
    12 else
    13 dbms_output.put_line('Files Are Same');
    14 end if;
    15 end;
    16 /
    Enter value for lob_1: 0820303623ECCFF8DCD9E0DFF11FDF1E1E7C3E6450E444E2E683A3DB0
    3FF7B7CFF34FC24244724CF07CBDBC8EB80C034000436007E018801016B01FEFFFEFEFEFE0F7F0D0
    7891FF198F1E9E1F304730C
    old 2: lob_1 BLOB := &lob_1;
    new 2: lob_1 BLOB := 0820303623ECCFF8DCD9E0DFF11FDF1E1E7C3E6450E444E2E683A3DB0
    3FF7B7CFF34FC24244724CF07CBDBC8EB80C034000436007E018801016B01FEFFFEFEFEFE0F7F0D0
    7891FF198F1E9E1F304730C;
    Enter value for lob_2: 8F2F1FE032E0E0C8C00CF91E2E1F0EDBDDF2D13292203E6161416180C
    0E689FFAEFFD7FEDF38FC3818013941F1C7C4C74FF3FF90F218000D1CAD9F89ED00E000024404D76
    DDFD6DF935F5B0E5C868E87
    old 3: lob_2 BLOB := &lob_2;
    new 3: lob_2 BLOB := 8F2F1FE032E0E0C8C00CF91E2E1F0EDBDDF2D13292203E6161416180C
    0E689FFAEFFD7FEDF38FC3818013941F1C7C4C74FF3FF90F218000D1CAD9F89ED00E000024404D76
    DDFD6DF935F5B0E5C868E87;
    ERROR:
    ORA-00972: identifier is too long
    i do not know why i got this problem.. is there any error in my program..
    lobmaxsize=4GB
    how to increase the size of the data type.
    Please Help me.
    Thank You.

    Hi Sindhu,
    Your problem has not to with lob size.
    The error ORA-00972: identifier is too long
    tells you that
    0820303623ECCFF8DCD9E0DFF11FDF1E1E7C3E6450E444E2E683A3D
    B03FF7B7CFF34FC24244724CF07CBDBC8EB80C034000436007E018801016B01FEFFFEFEFEFE0F7F0
    D07891FF198F1E9E1F304730C
    becomes an identifier.
    Look into this for how to use substitution variables
    http://www.oracle.com/technology/support/tech/sql_plus/htdocs/sub_var.html
    If you don't have time to go through it all, I suggest you at least read section 2.
    This won't solve all your problems, but it should explain yur current ORA-00972.
    Regards
    Peter

  • Can u solve this query

    SELECT REPLACE('SHALINI,VINO,MALINI',',',chr(10)) FROM DUAL;
    when run the above query normal the result is
    SHALINIVINOMALINI
    whereas when i run it as script i get the output as
    SHALINI
    VINO
    MALINI
    why it is so..can u explain
    and i want the alternative to display like this
    SHALINI
    VINO
    MALINI
    when i run normally

    “why it is so..can u explain”I take it that you are unaware of what chr(10) does which you are using in your SQL statement.
    Any clue what “\n” in ‘c’ programming does. When you try using it in printf statements or echo statements in UNIX shell - something similar.
    It’s like a “line feed”. Breaks the string at that point and prints the remaining in the subsequent lines.
    Visually, you will see the result appearing in separate lines (i.e 3 in your example) – It’s actually not 3 rows which is displayed but actually only 1 row.
    In your example,
    All commas ‘,’ in the string is replaced with chr(10) “line feed” (control character) thus making each name to appear in separate lines.
    1 select rownum, 'AB', 'A' || chr(10) || 'B'
    2* from dual
    SQL> /
    ROWNUM 'A 'A'
    1 AB A
    B

  • Need solution to solve this query

    i want solution for shape & append query as run in access for oracle
    RS.Open "SHAPE {select ID,MAX(Module_Name) AS MainMenu from USER_MODULE GROUP BY ID} APPEND ({select ID,NAME,USER_module.srno,iif(right(param_str,1)='P','ü','') as Allow,iif(left(param_str,1)='A','ü','') as Ins,iif(MID(param_str,2,1)='E','ü','') as Edit,iif(MID(param_str,3,1) = 'D','ü','') as Del,flag,CODE,NAME from USER_MODULE left join user1 on user1.srno=USER_module.srno where user_name='" & Master_Rst!USER_NAME & "' or user_name is null} RELATE ID TO ID) AS AA", G_CompCn, adOpenDynamic, adLockOptimistic

    This forum is for JHeadstart related questions/suggestions. This problem seems to be related to other products. Please ask this question in the appropriate discussion forum.
    kind regards,
    Sandra Muller
    JHeadstart Team
    Oracle Consulting

  • HI could you solve this query

    Ex: Table : inputval
    Column: inputvalue VARCHAR2(100)
    DATA for above column are
    TCC=0471/12345/0999/8548/4321,VT=15,PRIMDX=false,DUR=365,VISITS=0
    values termination are '/'
    Q: i need to after TCC value from the inputvalue column
    i need 6 values output are below
    1. 471
    2. 12345
    3. 0999
    4. 8548
    5. 4321
    6. null
    i written query but i am not able to get these output
    i am giving sample query which i tried for one value
    SELECT
    case when inputvalue like '%TCC=%' then
    substr(substr(inputvalue,to_number(instr(inputvalue,'TCC=')+4),
    to_number(instr(inputvalue,',',instr(inputvalue,'TCC=')+4))
    -to_number(instr(inputvalue,'TCC=')+4)),1,
    instr(substr(inputvalue,to_number(instr(inputvalue,'TCC=')+4),
    to_number(instr(inputvalue,',',instr(inputvalue,'TCC=')+4))
    -to_number(instr(inputvalue,'TCC=')+4)),'/')-1) end tcc1,
    case when inputvalue like '%TCC=%' then
    substr(substr(inputvalue,to_number(instr(inputvalue,'TCC=')+4),
    to_number(instr(inputvalue,',',instr(inputvalue,'TCC=')+4))
    -to_number(instr(inputvalue,'TCC=')+4)),
    instr(substr(inputvalue,to_number(instr(inputvalue,'TCC=')+4),
    to_number(instr(inputvalue,',',instr(inputvalue,'TCC=')+4))
    -to_number(instr(inputvalue,'TCC=')+4)),'/')+1,
    instr(substr(inputvalue,to_number(instr(inputvalue,'TCC=')+4),
    to_number(instr(inputvalue,',',instr(inputvalue,'TCC=')+4))
    -to_number(instr(inputvalue,'TCC=')+4)),'/',2)-1) end tcc2
    FROM inputval
    please solve me as early as possible
    Thanks,
    krish

    Hi,
    REGEXP_SUBSTR ( s
                  , '[^,]+'
                  , 1
                  , n
                  )returns the nth item in a comma-delimited list s. (It retuirns NULL if there are not that many items.)
    Cross-join with a counter table to get the values for n, and test if the nth item is the one that starts with 'TCC='.
    Depending on you data, it might be easier to use REGEXP_SUBSTR or REGEXP_REPLACE to find the part of the string between 'TCC=' and the next comma. (I can't tell from the one row of sample data.)
    Once you have the TCC-substring, use REGEXP_SUBSTR again to get the m-th item from the /-delimited list. (Use a different counter table.)
    If you need more help, post some more test data and desired results, testing any special cases, such as:
    two or more 'TCC=' items in one string
    NULL entries ('TCC=1///4')
    Misplaced label ('1/2/TCC=3/4/5')
    malformed numbers ('TCC=1.0.0/4')
    REGEXP_ function only work in Oracle 10 and up.

  • HT201210 I am trying to update Ios7 for iPhone 4 but there is an unknown error occurred like (-23). My Laptop OS is Windows 8. Now how can i solved this query.

    Dear Sir/Madam
    I am trying to update Ios7 for iPhone 4 but there is an unknown error occurred like (-23). My Laptop OS is Windows 08.ios 7 update which can updated and remaining  30minutes are left out. Than after error which can be show as i have mentioned above.
    How can i resolved this error? So please help me.
    Thanks & Regards,
    Vatsal Desai

    Error 20, 21, 23, 26, 28, 29, 34, 36, 37, 40
    These errors typically occur when security software interferes with the restore and update process. Use the steps to troubleshoot security software issues to resolve this issue. In rare cases, these errors may be a hardware issue. If the errors persist on another computer, the device may need service.
    Also, check your hosts file to verify that it's not blocking iTunes from communicating with the update server. See the steps under the heading "Blocked by configuration (Mac OS X / Windows) > Rebuild network information > Mac OS X > The hosts file may also be blocking the iTunes Store." If you have software used to perform unauthorized modifications to the iOS device, uninstall this software prior to editing the hosts file to prevent that software from automatically modifying the hosts file again on restart.
    all of this from
    iTunes: Specific update-and-restore error messages and advanced troubleshooting

  • Solve this :about internal tables

    hi experts,
    could u pls solve this query asap.
    i have 7 internal tables,
    in  one internal table i've field
    orgunits
    1
    2
    3
    4
    in other internal tables i have fields like this
    orgunits       personalnumbers
    1                     11
    2                     12
    1                     13
    1                     14
    3                     15
    1                     16
    now i want how many personalnumbers in each orgunit.
    i want the count.
    so, how can i solve this in short coding.
    example :for orgunit 1----
    the count is 4.(11,13,14,15).
    pls explain with coding as soon as possible.
    thanks all.
    Message was edited by:
            devender reddy

    REPORT  ZTEST_00000 message-id zmsg.
    data : cnt type i.
    data : begin of itab1 occurs 0, "internal table with all org units
    org type i, "change data type
    end of itab1.
    data : begin of itab2 occurs 0, "internal table with org units and pernrs
    org type i, "change data type
    per type i, "change data type
    end of itab2.
    data : begin of itab3 occurs 0, "internal table with org units and count of pernrs
    org type i,
    count type i,
    end of itab3.
    itab1-org = 1.
    append itab1.
    clear itab1.
    itab1-org = 2.
    append itab1.
    clear itab1.
    itab1-org = 3.
    append itab1.
    clear itab1.
    itab1-org = 4.
    append itab1.
    clear itab1.
    itab2-org = 1.
    itab2-per = 10.
    append itab2.
    clear itab2.
    itab2-org = 1.
    itab2-per = 11.
    append itab2.
    clear itab2.
    itab2-org = 2.
    itab2-per = 9.
    append itab2.
    clear itab2.
    itab2-org = 2.
    itab2-per = 4.
    append itab2.
    clear itab2.
    itab2-org = 2.
    itab2-per = 7.
    append itab2.
    clear itab2.
    itab2-org = 3.
    itab2-per = 11.
    append itab2.
    clear itab2.
    itab2-org = 4.
    itab2-per = 14.
    append itab2.
    clear itab2.
    sort itab2 by org per.
    sort itab1 by org.
    loop at itab2.
    at new org.
    clear cnt.
    endat.
    cnt = cnt + 1.
    at end of org.
    itab3-org = itab2-org.
    itab3-count = cnt.
    append itab3.
    clear itab3.
    endat.
    endloop.
    loop at itab1.
    read table itab3 with key org = itab1-org.
    if sy-subrc <> 0.
    itab3-org = itab1-org.
    itab3-count = 0.
    append itab3.
    clear itab3.
    endif.
    endloop.
    sort itab3 by org count.
    loop at itab3.
    write :/ itab3-org , itab3-count.
    endloop.
    Regards
    vasu

  • Please help me this query

    Plz help me this query:
    Create a query that displays the employees last name and indicates the amounts of their annual salaries with *. Each * signifies a thousand $'s.
    EG. If the salary of an employee with last name king is 2000 then it should appear as follows:
    King **
    2 (*) for 2 thousand.
    Thanks in advance

    Hi,
    I was able to solve this query on my own. For those who might face a problem in future the solutionto it is:
    SELECT rpad(last_name, length(last_name) + (salary/1000), '*') AS employee_and_their_salaries
    FROM employees;
    Thanks

  • How to solve this issue in query definition

    Hi Experts,
    I need to solve an issue existed in a query.
    This query is built on a infocube which main char and key figures as follow:
    sales doc., item, material, fiscal year/period, ordered qty, billed qty.
    The query has to show opened qty for specific sales doc / item level. the formula for  opened qty = ordered qty - billed qty. But some of the sales doc /item are partial delivered i.e. there are several deliveries' entries for same sales doc/itm. for example the entries as follow:
    sales doc---- item--materailfiscal year/periodordered qty-- billed qty
    20001------ --    30--- m1 2009/002  200--
      25
    20001--    30 -m1 2009/002 -  200--
    100
    Then after the execution of the query we got the opened qty: (200 - 25) + (200 - 100) = 175. This is totally wrong because the correct opened qty should be 200 - 25 - 100 = 75.
    Could any body provide a solution to get the correct result ?
    Thanks a lot
    Edited by: Leon Ouyang on Dec 15, 2008 4:12 PM
    Edited by: Leon Ouyang on Dec 15, 2008 4:13 PM
    Edited by: Leon Ouyang on Dec 15, 2008 4:43 PM

    Hi Leon,
    Somewhere in your infocube there must be an indicator whether it is the first delivery or not.
    Change ordered quantity into a resctricted keyfigure using the restriction of the indicator first delivery.
    Your overview will be:
    sales doc---- item--materailfiscal year/periodordered qty-- billed qty
    20001------ -- 30--- m1 2009/002 200--
    25
    20001-- 30 -m1 2009/002--
    100
    And your total will be correct.
    Success,
    Udo.

  • After updating to Firefox 7.0.1, menu bar for Google,yahoo, Facebook (message,notification,profile,home) and others site are disabled. How can solve this problem?

    after updating to Firefox 7.0.1, menu bar for Google(web ,image,video,map etc),yahoo, Facebook (message,notification,profile,home) and others site are disabled. even I cant log out from different sites cz the log out bar is completely disabled. I tried with Firefox 4;5 and 6, same problem exist . I tried by active all add ons for facebook, same problem exist. If I use internet explorer , I don't find such problem with it.
    How can I solve this problem?

    Thanks a lot for your swift response. And sorry if it was a bit too hectic to go through my detailed query (which I did because it was misunderstood when I asked previously). As I've mentioned above, I was informed that updating to 5.0.1 would '''require''' me to '''delete''' the current version and then install the new one. And doing so will involve losing all my bookmarks. I guess I should have been more specific and detailed there. By losing, I didn't mean losing them forever. I'm aware that they're secured in some place and deleting and installing the software doesn't harm its existence. What I meant that if I install the new version, I'd have to delete the old one. And after installing the new version, I'd have to transfer them (bookmarks) back from wherever they are. Get it? When it updated from 3.6.9 to 3.6.13, and from 3.6.13 to 3.6.18, I didn't need to follow that process. They were already present on their own.
    BTW, I'm having no problems with 3.6.18 but after learning about the existence of version 5.0.1, I'm a bit too eager to lay my hands over it.
    Thanks for your help; hope this wasn't extremely long.

  • How to remove the OR clause in this query?

    Hello Everyone,
    I have this query where i have a lot of joins and in the where clause there is a ISNULL and conditions based on OR clause.
    How to remove the use of the OR clause which may cause performance problems? Can anyone suggest a method to remove the OR clause?
    select RS.PLANNEDSTART,
    OD.ESTSHIPDATE
    FROM TABLE1 RS(NOLOCK)
         INNER JOIN TABLE2 SS(NOLOCK)
         ON RS.ID1             = SS.ID1
         INNER JOIN TABLE3 AM(NOLOCK)
         ON AM.KEYID        = SS.KEYID
         INNER JOIN TABLE4 OD(NOLOCK)
         ON SS.KEYID= OD.KEYID
        INNER JOIN TABLE 8 DR
       ON
    WHERE              (isnull(RS.DATE1,'1970-01-01 00:00:00.000') ='1970-01-01 00:00:00.000'
                     AND OD.DATE1 between @Beginning_Route_Date and @Ending_Route_Date)
                 OR
                 RS.DATE1!='1970-01-01 00:00:00.000'
                   AND RS.DATE1 BETWEEN  @Beginning_Route_Date and @Ending_Route_Date)              
    Regards
    Gautam S
    Gautam S

    this is one way avoiding OR clause
    WHERE CASE WHEN isnull(RS.DATE1,'1970-01-01 00:00:00.000') ='1970-01-01 00:00:00.000'
    THEN OD.DATE1 ELSE RS.DATE1 END between @Beginning_Route_Date and @Ending_Route_Date)
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Getting Error while running this query

    Hi,
    SELECT SUM(BATCHWISE_COUNT) TOTALBATCHCOUNT,
         TO_CHAR(SUM(BATCHWISEAMOUNT),'9,99,99,99,99,99,99,99,990.99') TOTALAMOUNT ,
         SUM(SLIP_RECORDS) TOTALSLIPCOUNT,
         SUM(CHEQUEONLY_RECORD) TOTALCHEQUECOUNT
    from (SELECT COUNT(TI.FLDITEMINITIALID) BATCHWISE_COUNT from TBLITEMINITIAL TI),
    (select SUM(IT.FLDAMOUNT)/100 BATCHWISEAMOUNT from TBLITEMINFOTRANS IT ),
    (SELECT COUNT(FLDITEMINITIALID) FROM TBLITEMINITIAL TI WHERE FLDBATCHNUMBER NOT IN (select FLDBATCHNUMBER from TBLITEMINITIAL_DEL where TI.FLDCAPTURINGDATE=FLDCAPTURINGDATE) AND TI.FLDITEMTYPE = 'P' AND TI.FLDCAPTURINGMODE = 'CP') SLIP_RECORDS,
    (SELECT COUNT(FLDITEMINITIALID) FROM TBLITEMINITIAL TI WHERE FLDBATCHNUMBER NOT IN (select FLDBATCHNUMBER from TBLITEMINITIAL_DEL where TI.FLDCAPTURINGDATE=FLDCAPTURINGDATE) AND FLDITEMTYPE = 'C' AND FLDCAPTURINGMODE = 'CO') CHEQUEONLY_RECORD
    from TBLITEMINITIAL TI,
                   TBLITEMINFO II,
                   TBLITEMINFOTRANS IT
              WHERE     II.FLDITEMINITIALID                    = TI.FLDITEMINITIALID
              AND     II.FLDITEMID                         = IT.FLDITEMID
              GROUP BY TRUNC(TI.FLDCAPTURINGDATE),TI.FLDBATCHNUMBER,TI.FLDCAPTURINGBRANCH,TI.FLDSCANNERID)
    Im geeting error
    ORA-00933: SQL command not properly ended
    when running this query
    I don't know what mistake i have done in this query , Kindly help for solving this issue
    Thanks
    Bala,
    Edited by: 965937 on Feb 11, 2013 9:25 PM

    Dear Friend
    Try with the query below,
    <<
    SELECT SUM(BATCHWISE_COUNT) TOTALBATCHCOUNT,
    TO_CHAR(SUM(BATCHWISEAMOUNT),'9,99,99,99,99,99,99,99,990.99') TOTALAMOUNT ,
    SUM(SLIP_RECORDS) TOTALSLIPCOUNT,
    SUM(CHEQUEONLY_RECORD) TOTALCHEQUECOUNT
    from (SELECT COUNT(TI.FLDITEMINITIALID) BATCHWISE_COUNT from TBLITEMINITIAL TI),
    (select SUM(IT.FLDAMOUNT)/100 BATCHWISEAMOUNT from TBLITEMINFOTRANS IT ),
    (SELECT COUNT(FLDITEMINITIALID) FROM TBLITEMINITIAL TI WHERE FLDBATCHNUMBER NOT IN (select FLDBATCHNUMBER from TBLITEMINITIAL_DEL where TI.FLDCAPTURINGDATE=FLDCAPTURINGDATE) AND TI.FLDITEMTYPE = 'P' AND TI.FLDCAPTURINGMODE = 'CP') SLIP_RECORDS,
    (SELECT COUNT(FLDITEMINITIALID) FROM TBLITEMINITIAL TI WHERE FLDBATCHNUMBER NOT IN (select FLDBATCHNUMBER from TBLITEMINITIAL_DEL where TI.FLDCAPTURINGDATE=FLDCAPTURINGDATE) AND FLDITEMTYPE = 'C' AND FLDCAPTURINGMODE = 'CO') CHEQUEONLY_RECORD
    from TBLITEMINITIAL TI,
    TBLITEMINFO II,
    TBLITEMINFOTRANS IT
    WHERE II.FLDITEMINITIALID = TI.FLDITEMINITIALID
    AND II.FLDITEMID = IT.FLDITEMID
    GROUP BY TRUNC(TI.FLDCAPTURINGDATE),TI.FLDBATCHNUMBER,TI.FLDCAPTURINGBRANCH,TI.FLDSCANNERID;
    Regards
    Ahamed Rafeeque Cherkala
    Edited by: Ahamed Rafeeque on Feb 12, 2013 3:20 AM

Maybe you are looking for