Problem with the query of Sharepoint Calculated Fields

Hello,
I am developing an application in sharepoint 2013 foundation. but i have problems with a list, when executing a caml query on a calculated field. I try the solution of this blog
http://sptalks.wordpress.com/2013/03/25/query-on-calculated-field-problem
but i got no result
attentive to any comments
thanks

Hello,
This is my CAML Query
<View>
<ViewFields>
<FieldRef Name="ID" />
<FieldRef Name="PermMask" />
<FieldRef Name="FSObjType" />
<FieldRef Name="Nombre" AutoHyperLink="TRUE" />
<FieldRef Name="Apellidos" AutoHyperLink="TRUE" />
<FieldRef Name="Cargo" /><FieldRef Name="Edad" />
<FieldRef Name="Compa_x00f1_ia" />
<FieldRef Name="Created" />
</ViewFields>
<Query>
<GroupBy Collapse="TRUE" GroupLimit="30">
<FieldRef Name="Compa_x00f1_ia" />
<FieldRef Name="Edad" />
</GroupBy>
<OrderBy>
<FieldRef Name="ID" />
</OrderBy>
<Where>
<Contains>
<FieldRef Name="Ano" LookupId="FALSE" />
<Value Type="Text">2014</Value>
</Contains>
</Where>
</Query>
</View>

Similar Messages

  • [Execute SQL Task] Error: Executing the query "DECLARE_@XMLA nvarchar(3000) ,__@DateSerial nvarch..." failed with the following error: "Incorrect syntax near '-'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly,

    Hi
    DECLARE @XMLA nvarchar(3000)
    , @DateSerial nvarchar(35);
    -- Change date to format YYYYMMDDHHMMSS
    SET @DateSerial = CAST(GETDATE() AS DATE);
    --SELECT @DateSerial
    Set @XMLA = 
    N' <Batch xmlns="http://schemas.microsoft.com/analysis services/2003/engine">
     <ErrorConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2"
    xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2" xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200"
    xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200">
    <KeyErrorLimit>-1</KeyErrorLimit>
    <KeyNotFound>IgnoreError</KeyNotFound>
    <NullKeyNotAllowed>IgnoreError</NullKeyNotAllowed>
     </ErrorConfiguration>
     <Parallel>
    <Process xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2" xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2"
    xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200" xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200"
    xmlns:ddl300="http://schemas.microsoft.com/analysisservices/2011/engine/300" xmlns:ddl300_300="http://schemas.microsoft.com/analysisservices/2011/engine/300/300">
     <Object>
     <DatabaseID>MultidimensionalProject5</DatabaseID>
     <CubeID>giri</CubeID>
     <MeasureGroupID>Fact Internet Sales</MeasureGroupID>
     </Object>
     <Type>ProcessFull</Type>
     <WriteBackTableCreation>UseExisting</WriteBackTableCreation>
     </Process>
      </Parallel>
    </Batch>';
    EXEC (@XMLA) At SHALL-PCAdventureWorksDw ;
     iam executive the    query when iam getting below error.
      [Execute SQL Task] Error: Executing the query "DECLARE
    @XMLA nvarchar(3000)
    , @DateSerial nvarch..." failed with the following error: "Incorrect syntax near '-'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set
    correctly, or connection not established correctly. 
     how to solve this error;
     please help me

    What are you trying to do? What sort of data source is  SHALL-PCAdventureWorksDw?
    When you use EXEC() AT, I would execpt to see an SQL string to be passed to EXEC(), but you are passing an XML string????
    If you explain why you think this would work in the first place, maybe we can help you.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • : "Invalid object name '#Temp'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

     Hi   .
        I was creating the  pass the values t in temp tables  though s sis package vs2012 .
      First I was taken on executive SQL TASK.
     IN EXCUTIVE SQL TASK  . I was write the stored proce:
    Sp;
    reate  procedure  USP_GETEMP2333
    AS
    begin
    Select  eid,ename,dept,salary from emp
    end;
    create table #temp(eid int,ename varchar(20),dept varchar(20),salary int)
      insert into #temp
       exec USP_GETMP02333
       go.
     It was executive correctly.
     I was taken another sequence container. In the sequence container iam creating one   executive  sql
    In 2<sup>nd</sup> excutive sql task: sql statements is
    if object_id('emp_fact_sal') is not null
     drop table emp_fact_sal
    select eid,ename as emp_name,sal_bar=
    case when salary<=5000 then 'l'
    when salary >5000 and salary<=7000 then 'm'
    else
    'h'
    end
    into emp_fact_sal from #temp.
     and one falt flies  it was taken to designation .
     iam changing  all  connection properties:
     in oldeb connection:
    in excutive sal task properties .
    delay validation is true,
    and retain connection maner is also true,
    and package mode is 64 bit is false.
     But iwas excutive in 2<sup>nd</sup> excutive ql task .
    Iam getting this type of errors,
                    [Execute SQL Task] Error: Executing the query " if object_id('emp_fact_sal') is not null
     drop ta..." failed with the following error: "Invalid object name '#Temp'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established
    correctly.
     Please help me

    Arthur suggestion works but you shouldnt even be doing this on a SQL Task.
    Use a data flow task. You'll have better control over the data that is being transfered and get better performance because no staging table will be used.
    Just because there are clouds in the sky it doesn't mean it isn't blue. But someone will come and argue that in addition to clouds, birds, airplanes, pollution, sunsets, daltonism and nuclear bombs, all adding different colours to the sky, this
    is an undocumented behavior and should not be relied upon.

  • The file .docx cannot be opened because there are problems with the contents in sharepoint document library

    I created a site and  created a document libarary and assigned a word document as a content type . I have written a workflow to create a new document . The workflow is working fine and all the document is getting created and values are getting stored
    in it .
    As per my requirement I am saving the above site as site template .
    After that I am creating a new site based on the above site template , Its getting created and I started the workflow , its working fine and the document is also getting created .
    The problem is I am getting error while opening the word document
    Error - The file filename.docx cannot be opened because there are problems with the contents .
    Details - No error details availble .
    Indresh

    What are you doing within the txt document?  Is it general text and string based items, or have you something more elaborate going on?
    An older discussion here elaborates a bit more on the dotx vs docx side of things.
    http://social.msdn.microsoft.com/Forums/en-US/de1b5ff9-ea6d-460c-a707-8c28acd4906f/error-opening-office-open-xml-file-when-using-sd-workflow-to-create-item-in-document-library?forum=sharepointcustomizationlegacy
    Steven Andrews
    SharePoint Business Analyst: LiveNation Entertainment
    Blog: baron72.wordpress.com
    Twitter: Follow @backpackerd00d
    My Wiki Articles:
    CodePlex Corner Series
    Please remember to mark your question as "answered" if this solves (or helps) your problem.

  • Problem With The Query

    Hi gurus,
    I have a problem in a query
    I have a lot of records that are the same and I don’t want to sum the value of them more than once. How can this be done??
    The following table should illustrate my problem:
    DEPT--MONTHCFBID----SCORE
    ALST--APR100--
    3
    ALST--MAY100--
    3
    ALST--JUN101--
    4
    ALST--APR102--
    5
    Overall Score 15
    I want the Overall Score to be 12. (only summing up unique records Of CFBID).
    Any help will be greatly appreciated.
    Regards
    Supraja.K

    Hi,
    I had Done with Formula with Excveption Aggregation as Average And reference charecterstic as CFBID
    DEPT--MONTHCFBID----SCORE
    ALST--APR100--
    3
    ALST--MAY100--
    3
    ALST--JUN101--
    4
    ALST--APR102--
    5
    Overall Score 15
    I want the Average Score12/3 = 4.
    but I am getting as 15/3 = 5
    What to Do any other Solution please

  • Problem with the query in group by clause

    hi, i have problem with group by clause, can some one please help me.
    select
    header_id,
    (select sum(nvl(dr,0) - nvl(cr ,0)) from temp_tab a1
    where
    a1.country=a.country
    and a1.source='AP'
    and a1.header_id=a.header_id) WHT,
    sum(dr),
    sum(cr) from temp_tab a
    group by header_id,
    (select sum(nvl(dr,0) - nvl(cr ,0)) from temp_tab a1
    where
    a1.country=a.country
    and a1.source='AP'
    and a1.header_id=a.header_id)
    select * from temp_tab
    drop table temp_tab
    create table temp_tab(header_id number ,line_num number, country varchar2(2),
    source varchar2(2), dr number, cr number,primary key(header_id,line_num));
    insert into temp_tab(header_id, line_num,country, source, dr,cr) values(1, 1,'NL','AP',100,20);
    insert into temp_tab(header_id, line_num,country, source, dr,cr) values(1, 2,'PO','AP',20,20);
    insert into temp_tab(header_id, line_num,country, source, dr,cr) values(1, 3,'NL','AP',70,20);
    insert into temp_tab(header_id, line_num,country, source, dr,cr) values(2, 1,'NL','PA',100,20);
    insert into temp_tab(header_id, line_num,country, source, dr,cr) values(2, 2,'NL','PA',100,20);
    insert into temp_tab(header_id, line_num,country, source, dr,cr) values(3, 1,'KR','PO',100,20);
    commit;
    Appreciate your help.
    Thanks,

    select header_id,
             (select sum(nvl(dr,0) - nvl(cr ,0)) from temp_tab a1
             where a1.country=a.country
             and a1.source='AP'
             and a1.header_id=a.header_id) WHT,
             sum(dr),
             sum(cr)
      from temp_tab a
    group by header_id
    ,countryIt's kinda hard to follow what your query does... maybe because I'm only at my second coffee..
    Edited by: Alex Nuijten on Oct 2, 2009 8:07 AM

  • How can i use index in select query.. facing problem with the select query.

    Hi Friends,
    I am facing a serious problem in one of the select query. It is taking a lot of time to fetch data in Production Scenario.
    Here is the query:
      SELECT * APPENDING CORRESPONDING FIELDS OF TABLE tbl_summary
        FROM ztftelat LEFT JOIN ztfzberep
         ON  ztfzberep~gjahr = st_input-gjahr
         AND ztfzberep~poper = st_input-poper
         AND ztfzberepcntr  = ztftelatrprctr
        WHERE rldnr  = c_telstra_accounting
          AND rrcty  = c_actual
          AND rvers  = c_ver_001
          AND rbukrs = st_input-bukrs
          AND racct  = st_input-saknr
          AND ryear  = st_input-gjahr
          And rzzlstar in r_lstar                            
          AND rpmax  = c_max_period.
    There are 5 indices present for Table ZTFTELAT.
    Indices of ZTFTELAT:
      Name   Description                                               
      0        Primary key( RCLNT,RLDNR,RRCTY,RVERS,RYEAR,ROBJNR,SOBJNR,RTCUR,RUNIT,DRCRK,RPMAX)                                          
      005    Profit (RCLNT,RPRCTR)
      1        Ledger, company code, account (RLDNR,RBUKRS, RACCT)                                
      2        Ledger, company code, cost center (RLDNR, RBUKRS,RCNTR)                           
      3        Account, cost center (RACCT,RCNTR)                                        
      4        RCLNT/RLDNR/RRCTY/RVERS/RYEAR/RZZAUFNR                        
      Z01    Activity Type, Account (RZZLSTAR,RACCT)                                        
      Z02    RYEAR-RBUKRS- RZZZBER-RLDNR       
    Can anyone help me out why it is taking so much time and how we can reduce it ? and also tell me if I want to use index number 1 then how can I use?
    Thanks in advance.

    Hi Shiva,
    I am using two more select queries with the same manner ....
    here are the other two select query :
    ***************1************************
    SELECT * APPENDING CORRESPONDING FIELDS OF TABLE tbl_summary
        FROM ztftelpt LEFT JOIN ztfzberep
         ON  ztfzberep~gjahr = st_input-gjahr
         AND ztfzberep~poper = st_input-poper
         AND ztfzberepcntr  = ztftelptrprctr
        WHERE rldnr  = c_telstra_projects
          AND rrcty  = c_actual
          AND rvers  = c_ver_001
          AND rbukrs = st_input-bukrs
          AND racct  = st_input-saknr
          AND ryear  = st_input-gjahr
          and rzzlstar in r_lstar             
          AND rpmax  = c_max_period.
    and the second one is
    *************************2************************
      SELECT * APPENDING CORRESPONDING FIELDS OF TABLE tbl_summary
        FROM ztftelnt LEFT JOIN ztfzberep
         ON  ztfzberep~gjahr = st_input-gjahr
         AND ztfzberep~poper = st_input-poper
         AND ztfzberepcntr  = ztftelntrprctr
        WHERE rldnr  = c_telstra_networks
          AND rrcty  = c_actual
          AND rvers  = c_ver_001
          AND rbukrs = st_input-bukrs
          AND racct  = st_input-saknr
          AND ryear  = st_input-gjahr
          and rzzlstar in r_lstar                              
          AND rpmax  = c_max_period.
    for both the above table program is taking very less time .... although both the table used in above queries have similar amount of data. And i can not remove the APPENDING CORRESPONDING. because i have to append the data after fetching from the tables.  if i will not use it will delete all the data fetched earlier.
    Thanks on advanced......
    Sourabh

  • Problem with the% deviation from Project Server 2010 field

    hello
    I have a problem with the% deviation from Project Server 2010 field.
    Within a file or project, this project contains tasks.
    Each task has completed the field% deviation.
    Within the row "Summary" in the field of% deviation does not perform the sum of all fields of tasks.
    Only occurs on certain projects, these projects have the view of PR Progress Report
    Anyone know happens?
    thank you very much

    Hi
    Sorry, I'll be more specific now.
    Within the field% deviation. Your settings in PWA is:
    The formula for field% Deviation:
    Str (IIf ([Job baseline] = 0; IIf ([Working] = 0, 0, 100); IIf ([Working] = 0; -100; Int (100 * ([Job] - [Work Online base]) / [Working baseline])))) + "%"
    Under the heading rows Calculation Summary:
    > Use formula.
    Within the field Allocation Calculation of rows:
    > It is labeled the "Apply unless you manually specify".
    The field [Job] and field [Job baseline] are fields Pack project server.
    The error is in project, in the list of tasks.
    In the top row, this row summary makes the sum of the ranks of the tasks of the file.
    But in my case only in the summary field the same value appears in the tasks.
    In all the cells in column% deviation appears the same value.
    I hope it helps.
    thank you very much

  • Problem with the calculator and modifications needed

    i have got a problem with the calculator on my iphone i.e i cannot find any DEL key or Backspace....the problem is when typing a long value if one number is entered wrong we should start again.
    EXAMPLE...if i need to type    114678047 * 345612
    if acidentally if i type 114678047 * 3455           ( then i should start over typing  "C"  key)
    i should start over to type the whole data..if we have a delete key we can just correct it right away and continue.....rather than starting over
    we can find this feature in all the other smart phones , i dont know why apple coudnt find that
    even every scientific calculator have a DEL key...
    Thanks
    vickyk7

    FEEDBACK
    If you want to give Apple feed back then do it here http://www.apple.com/feedback/iphone.html

  • Problem with the quantity field

    hi every one
    i am facing a problem with the quantity field (vbap-kwmeng)
    as per my requirement i need to display this quantity field along with some other item fields from VBAP in an alv grid.
    among all the fields displayed in the alv grid only this quantity field is editable(end user can change this quantity)
    once end user changes this quantity and press save button i need to capture this new quantity in my internaltable.
    problem is input of length of quantity is 15 and the output length is 19
    so when i am pressing save
    say my quantity is 50 when i am pressing save '0.050' is coming because of the length difference
    how can i capture the original changed value.
    vamsi

    what about define two fields in  you inner table ,one as char and the other as vbap-kwmeng, you can show the char one in the ALV gird , when user input value and press SAVE ,you can move the value to vbap-kwmeng.
    you can test it,mybe some one has one better idea.

  • Facing problem with the code for sending an .xls attachment via email, a field value contains leading zeros but excel automatically removes these from display i.e. (00444 with be displayed as 444).kindly guide .

    Facing problem with the code for sending an .xls attachment via email, a field value contains leading zeros but excel automatically removes these from display i.e. (00444 with be displayed as 444).kindly guide .

    Hi Chhayank,
    the problem is not the exported xls. If you have a look inside with Notepad or something like that, you will see that your leading zeros are exported correct.Excel-settings occurs this problem, it is all about how to open the document. If you use the import-assistant you will have no problems because there are options available how to handle the different columns.
    Another solution might be to get familiar with ABAP2XLS-Project. I got in my mind, that there is a method implemented, that will help you solving this problem. But that is not a five minute job
    ~Florian

  • Problems with the interlaced Fields after burning with iDVD

    The original quicktimes have interlaced frames and once I burn them with iDVD seams that there is a problem with the fields, like they are in ht ewrong order or something.
    Is there something I'm not doing right?
    Anyone?
    jd

    I Have a similar problem my apple health app hasn't worked from day one - I use my fitness pal and no matter what I do it just doesn't communicat or pass information to apples app - ive even tried a different steps app and that doesn't communicat either. Even running on ISO 8.2 hasn't  rectified connectivity issues.
    I Wonder if apple is aware of these issues lol

  • Problem with the hierarchial fields in a Purchase order xml report

    Hi,
    I am having a problem with the hierarchy problem. We are populating attribute 15 of a PO header. some times it can be null. FYI, we are using 11.5.10 instance where oracle supports direct PO template rather than having a rdf file.
    And now in the xml report, if attribute15 of po header is not null then it is fine.
    But if attribute15 is null, then the template is picking from the next available attribute15 that is from the po lines. As the line level group of "LINES" is between the "PO_DATA" (header group), hence the template is checking for next available attribute15.
    Can any one please suggest how to design the template where we can make the template to check only for that tag at the header level group rather than the line level group tag?
    Thank You in advance.
    Regards,
    Srinivas.

    Hi
    Incase you want to transfer attachements from SRM to R/3, then you try implementing the BADI in SRM side. The BADI which will help in this case is
    <b>BBP_CREATE_PO_BACK</b> BADI.
    <b>Please read the standard SAP documentation of this BADI using SE18 Transaction, before making any code changes.</b>
    <u>Few Important SAP OSS notes to refer in this case -></u>
    Note 989184 - Transferred shopping cart with internal attachments
    Note 550071 - FAQ: EBP - Shopping Cart
    Note 916347 - Transfer shopping cart with internal attachments
    Note 1001130 - FAQ - Attachment questions (Buyside)
    <u>Few useful links -></u>
    <b>http://help.sap.com/saphelp_srm50/helpdata/en/49/b32640632cea01e10000000a155106/frameset.htm
    Re: Attachments to backend
    Re: Document Attachments in Shopping Cart
    Re: Attachment in SRM
    Re: SRM Documents and Attachments
    Re: Limit in Attachments of an item in Shopping Cart
    Re: return delivery text from material document is not passed to SUS
    </b>
    Do let me know, incase you face any problems.
    Regards
    - Atul

  • Issue with the query

    Hi Friends,
    I am having a problem with this query. The query is to fetch all the elements for the employees. The elements that need to be fetched are set up in the flex sets.
    In the table fnd_flex_values there are columns start_date_active and end_date_active fields and these are null. In the below query when I use the condition
    and trunc(sysdate) between NVL(ffv.start_Date_active,TO_DATE('01-JAN-1951','DD-MON-YYYY')) and NVL(ffv.end_Date_active,TO_DATE('31-DEC-4712','DD-MON-YYYY'))
    the query fetches the results in 5seconds
    but when I replace the same query with the statement
    and to_date(to_char(ppa.date_earned,'DD-MON-YYYY'),'DD-MON-YYYY') between NVL(ffv.start_Date_active,TO_DATE('01-JAN-1951','DD-MON-YYYY')) and NVL(ffv.end_Date_active,TO_DATE('31-DEC-4712','DD-MON-YYYY'))
    the query takes a lot of time. Infact it gets timed out
    Columns start_date_active and end_date_active fields are date type. Can anyone say what is the issue with this query
    When I give the sysdate instead of ppa.date_earned date
    select papf.person_id, papf.full_name, papf.employee_number
    ,petf.element_name, pivf.name,
    prrv.result_value, ppa.date_earned,ppa.effective_date, to_char(ppa.date_earned,'DD-MON-YYYY') date_earned, paaf.assignment_id, petf.effective_start_date
    ,petf.effective_end_date, ffv.*
    from per_all_people_f papf
    ,per_all_assignments_f paaf
    ,pay_payroll_actions ppa
    ,pay_assignment_actions paa
    ,pay_element_types_f petf
    ,pay_input_values_f pivf
    ,pay_run_results prr
    ,pay_run_result_values prrv
    ,per_person_type_usages_f pptuf
    ,per_person_types ppt
    ,fnd_flex_values ffv
    ,fnd_flex_value_sets ffvs
    where 1=1
    and papf.person_id = paaf.person_id
    and trunc(ppa.date_earned) between trunc(papf.effective_start_date) and trunc(papf.effective_end_date)
    and trunc(ppa.date_earned) between trunc(paaf.effective_start_date) and trunc(paaf.effective_end_date)
    and paa.assignment_id = paaf.assignment_id
    and paa.action_status='C'
    and ppa.payroll_id = 61
    --and ppa.consolidation_set_id = 108
    and ppa.payroll_action_id = paa.payroll_action_id
    and prr.assignment_action_id = paa.assignment_action_id
    and prr.element_type_id = petf.element_type_id
    -- and trunc(ppa.date_earned) between trunc(petf.effective_start_date) and trunc(petf.effective_end_date)
    and trunc(sysdate) between petf.effective_start_date and petf.effective_end_date
    and prrv.run_result_id = prr.run_result_id
    and prrv.input_value_id = pivf.input_value_id
    and     prr.status in ('P','PA')
    and pivf.name ='Pay Value'
    and ppa.date_earned between pivf.effective_start_date and pivf.effective_end_date
    and ppa.time_period_id=145
    and paaf.person_id = pptuf.person_id
    and pptuf.person_type_id = ppt.person_type_id
    and ppt.user_person_type = nvl('Employee',ppt.user_person_type)
    and trunc(ppa.date_earned) between pptuf.effective_start_date and pptuf.effective_end_date
    and petf.element_name = ffv.flex_value
    and ffv.flex_value_set_id = ffvs.flex_value_set_id
    and ffv.enabled_flag ='Y'
    and ffvs.flex_value_set_name='GROUP_ELEMENTS'
    and trunc(sysdate) between NVL(ffv.start_Date_active,TO_DATE('01-JAN-1951','DD-MON-YYYY')) and NVL(ffv.end_Date_active,TO_DATE('31-DEC-4712','DD-MON-YYYY'))
    -- and trunc(ppa.effective_date) between nvl(ffv.start_Date_active,trunc(ppa.effective_date)) and NVL(ffv.end_Date_active,trunc(ppa.effective_date))
    -- and to_date(to_char(ppa.date_earned,'DD-MON-YYYY'),'DD-MON-YYYY') between NVL(ffv.start_Date_active,TO_DATE('01-JAN-1951','DD-MON-YYYY')) and
    order by ffv.parent_flex_value_low, papf.employee_number;
    Thanks

    ʃʃp wrote:
    /* Formatted on 2012/06/11 13:34 (Formatter Plus v4.8.8) */
    SELECT DISTINCT fr_ir_code, fr_fc_code1, product1, param_rep_prd, no_of_links_start_ir, no_of_supps_start_ir
               FROM comm_exst_rp_comit_aggr_irview
              WHERE fr_ir_code = 'AS01'
                AND srta_period = 2
                AND srta_year = 2011
                AND param_rep_prd = '2011-2'
                AND DECODE (:bind_variable, 'All', 1, 0) = DECODE (:bind_variable, 'All', 1, 1)
           GROUP BY fr_ir_code, fr_fc_code1, product1, param_rep_prd, no_of_links_start_ir, no_of_supps_start_ir
    UNION
    SELECT DISTINCT fr_ir_code, fr_fc_code1, product1, param_rep_prd, no_of_links_start_irda AS no_of_links_start_ir,
                    no_of_supps_start__irda AS no_of_supps_start_ir
               FROM comm_exst_rp_comit_aggr_irview
              WHERE fr_ir_code = 'AS01'
                AND srta_period = 2
                AND srta_year = 2011
                AND param_rep_prd = '2011-2'
                AND da_status = 'N'
                AND DECODE (:bind_variable, 'All', 1, 0) = DECODE (:bind_variable, 'All', 0, 0)
           GROUP BY fr_ir_code, fr_fc_code1, product1, param_rep_prd, no_of_links_start_irda, no_of_supps_start__irdaYes Union is one of the best solutions for handling two queries.
    As per my understanding DECODE function use is:
    DECODE (value,<if this value>,<return this value>,
    <if this value>,<return this value>,
    <otherwise this value>)
    But I am little bit jumbled for understanding below two lines in the query..
    1)
    AND DECODE (:bind_variable, 'All', 1, 0) = DECODE (:bind_variable, 'All', 1, 1)
    2)
    AND DECODE (:bind_variable, 'All', 1, 0) = DECODE (:bind_variable, 'All', 0, 0)Can you please tell me how the comparision is done using DECODE function?

  • One more Problem with SAP query

    Hi All,
    I am having a problem with SAP query
    Execution of SAP query transaction is leading to Dump
    the dump says Field 'R01' contains no fields, syntax check on the program shows same error.
    When I tried regenerating the Query in SQ01
    " Query Specification cannot be use to generate list
    Ranked list contains only numeric fields
    Please help me

    Gianpiero Bucchieri wrote:
    > So its important to listening the following tables too: Faktura (invoice), Partner Role, Partnernumber and the requierements number. The table are EKKO EKPO AND VRKPA OR vbkd, but if I join this table the query doesn't listining any results. If I cancel this 3 or 4 table and I start the query, the listening are ok. 
    >
    I am not sure what business process you are describing here - is it some kind of third-party sales order? If so, your join is wrong.
    From VB E P, firled BANFN and BNFPO you can go to table EBAN, where in field EBELN you will find the number of the purchase order (if somebody already had an MRP+Me58 run over the PR) which will lead you to table EKKO, and EKPO.
    So what we have here (essentially is):
    VBAK -> VBAP -> VBEP -> EBAN -> EKKO -> EKPO
    But that only solves one of your problems - you still have a long way to go to get invoices, partner and partner roles into there and I am beginning to ask myself what exactly it is you want to evaluate.
    Care to explain?
    Edited by: Mylène Dorias on Apr 1, 2010 2:10 PM

Maybe you are looking for

  • Impression impossible avec PhotoShop CS5  sous Mac OS 10. 7. 5

    bonjour, je n'arrive pas à imprimer à partir de Photoshop CS 5 sous Mac OS X. 7. 5. Et cela aussi bien sur mon Mac pro, que sur mon MacBook pro, et quel que soit l'imprimante connectée. Quelqu'un a-t-il rencontré ce problème ? Merci

  • Deployed components in table or file

    Hi, I'm looking for a table or file where the level of my j2ee components is stored. It should have the contents of the systeminfo->'all componnents', but I want to read it with a script so I need a file oder table. Thanks Jan

  • How to attach iBase to iBase through code

    Hi all, If there are iBase A and B, in transaction IB52 (on A), [Directly subordinate objects], [Installation], one could add B as 'Installed iBase', and B becomes a 'Component' of A. My task is to do this in a program, but CRM_IBASE_COMP_CREATE does

  • Animation of letters filling

    Is it possible to animate text/object with 'end' in after effects just like you do with strokes? How can I achieve this? See the video and you'll understand what I wan't to achieve. Guy showing of the 'end' animation on stroke Cheers, Tommie Using Ad

  • How do I disable an app's recent documents?

    When I secondary click an app in my Dock, it brings up a menu with a list of recently opened documents. How do I disable this so it doesn't display these?