Query SQL into Brio

Hi
I am new working with brio.
I need to do this in Interactive reporting.
SELECT DISTINCT al1.pdship, al1.pdsddt, al2.pmppds, al1.pditcd, al3.ititds,
al1.pdlimt, al1.pdbkct, al1.pdofct, al1.pdopcl, al1.pdppid,
al2.pmpkid, al2.pmefdt, al2.pmefbt, al2.pmaprv
FROM dpc_resmmx.icppdd@colonial al1, dpc_pssmmx.icppmd@colonial al2, dpc_pssmmx.icitnd@colonial al3
WHERE al2.pmpkid = al1.pdpkid
AND al2.pmppid = al1.pdppid
AND al2.pmcurc = al1.pdcurc
AND al2.pmmkyr = al1.pdmkyr
AND al2.pmsncd = al1.pdsncd
AND al3.ititcd = al1.pditcd
and al1.pdppid='BINGOPAD'
and al1.pdsddt=1110327
AND al1.pdship = 'HR'
AND al1.pdsddt BETWEEN 1110327 AND 1110612
AND (NOT al1.pdppid = 'FIT')
AND al2.pmmkyr = 2011
AND (PMEFDT - DECODE (NVL (PMEFBT, 0), 0, 0, 1, 0.1, 1 / PMEFBT)) =
*(SELECT MAX(PMEFDT*
- DECODE (NVL (PMEFBT, 0),
*0, 0,*
*1, 0.1,*
*1 / PMEFBT))*
FROM   dpc_pssmmx.icppmd@colonial AlF
WHERE       AlF.PMPKID = al2.PMPKID
AND AlF.PMPPID = al2.PMPPID
AND AlF.PMCURC = al2.PMCURC
AND AlF.PMMKYR = al2.PMMKYR
AND AlF.PMSNCD = al2.PMSNCD)
The text in Blod is my problem the select into the other.
Thanks.

What Version of IR
What is your Database?
Have you looked at Derived Query?
Have you looked at Sub Query?
Edited by: WVanSluys on Oct 22, 2010 6:56 AM

Similar Messages

  • Use var of sql:query tag into a jsp fragment code

    Hi, i'm spanish and my english is not very good XD.
    I need to use some data from <sql:query> tag into code jsp <% %>
    EXAMPLE:
    <sql:query var="variable">
    </sql:query>
    <% what can i do to access to "variable" here????????? %>
    i need to save in session (session.setAttribute(...)) a field of the response of the query saved in "variable"
    i need help!!!!, thanks!!!!!!!!

    i need to save in session (session.setAttribute(...)) a field of the response of the query saved in "variable"Why do you need java code to do this? If you are using JSTL sql tags, then why not keep using JSTL tags?
    <c:set var="valueToSave" value="${variable.field}" scope="session"/>EL variables are actually already stored as attributes in scope.
    So to get hold of "variable" you could use <%= pageContext.findAttribute("variable") %>
    and that would give you the object stored by the EL.
    cheers,
    evnafets

  • How to output a query results into a text file

    How to output a query results into a text file instead of outputing it to the screen..
    is there a way for us to write a SQL query which specifies to output the query results to a text file.
    Pls let me know how to do it
    Thanking u in advance
    regards
    Muraly

    Muraly,
    If you are using SQL*Plus 8.1.6 or later, you can also spool output to a file in HTML format, eg
    SET MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP ON
    SPOOL c:\temp\report.html
    SELECT DEPARTMENT_NAME, CITY
    FROM EMP_DETAILS_VIEW
    WHERE SALARY>12000;
    SPOOL OFF
    SET MARKUP HTML ENTMAP OFF
    In iSQL*Plus 9.0.1 (the browser-based interface to SQL*Plus) onwards, you can also send the HTML output to a new web browser window, or an html file -- much easier than the command line method.
    Alison

  • Importing SQL into Discoverer?

    I've converted an Access application (35 tables and 150 queries) to Oracle. Is there any way to import or 'cut and paste' the SQL into Discoverer? I don't like to think I have to do each by hand.

    In discoverer plus in file options you can see
    Import Sql click this it will prompt you to give the name of sql file
    here you can give the name of the sql file containing the sql query.

  • Oracle query export into the Excel file

    Hi,
    How can i automatically export oracle query result into the excel file in oracle?

    SQL and PL/SQL FAQ
    Re: Excel query to Oracle Database
    http://blog.mclaughlinsoftware.com/microsoft-excel/how-to-query-oracle-from-excel-2007/
    Edited by: swapnil kambli on May 28, 2013 11:07 PM

  • How to copy existing query report into new query report in SQ00

    Hi Experts,
    Hi Experts,
    I want to add fields "company code" "'region" to existing  query report AQZZ/SAPQUERY/FKF1============
    (list of vendor address) for this i done as following:
    1.In SQ01  go to "EDIT->other user group" and i selected user group as /SAPQUERY/FK
    2.I typed F1 in query field and click change button
    3.I clicked next screen button and entered into "change query f1: select fields screen".here i clicked "basic list" button and searched company code checkbox and saved it as result company code is appearing in the standard report"AQZZ/SAPQUERY/FKF1============"
    but unfortunately there is no region field(LFA1-REGIO) for this i think i should copy the existing  query report  into new query report(Ex:Z_LIST_OF_VEND) which should be 14 characters.please tell me briefly how to do this because this is first time i am using SQ00.
    one more issue is when i selected "edit-otheruser group" and choosing /SAPQUERY/FK  i  am getting only infoset "/SAPQUERY/FIKD" but i should need Info set: "/SAPQUERY/FIDD" please tell me how to add the previous one into user group.i think if i got /SAPQUERY/FIDD into usergroup  /SAPQUERY/FK i can add region also into Query report as i mentioned above by going SQ01 ...............................
    please help regarding this which should be very beneficiary to my carrier.
    Regards,
    naresh

    Hi Experts ,
    I solved issue by changing infoset in SQ02 by means of assigning field to field group and changed the query in SQ00.
    Regards,
    naresh.

  • How to set Query SQL Statement parameter dynamically in Sender JDBCAdpter

    Hi All,
    I have one scenario in which we are using JDBC Sender Adapter.
    Now in this case,we need to set Query SQL Statement with a SELECT statement based on some fields.
    This SQL statement is not constant, it would need to be changed.
    Means sometimes receiver will want to execute SQL statement with these fields and sometimes they will want to execute it with different fields.
    We can create separate channels for each SQL statement but again that is not an optimum solution.
    So ,I am looking out for a way to set these parameters dynamically or set SQL statement at Runtime.
    Can you all please help me to get this?

    Shweta ,
    <i>Sometimes receiver will want to execute SQL statement dynamically</i>....
    How you will get the query dynamically? Ok Let me assume, consider they are sending the query through file, then its definitely possible. But u need BPM and also not sender JDBC receiver adapter instead, receiver JDBC adapter.
    SQL Query File ->BPM>Synchronous send [Fetch data from DB]--->Response -
    >...............
    Do u think the above design will suit's ur case!!!!
    Best regards,
    raj.

  • Query SQL code gets deleted after export to Excel. "Query must have at least one destination field"

    Hi all,
    I'm getting really frustrated by this Access error. It happens when I export the result of a query through an Access macro to Excel, the first time it runs well but the next time, there is a chance that the query won't run and the error "Query
    must have at least one destination field" will be displayed. After that, I try to check the query SQL code and discover the code has vanished. I'm using simple Select query without joins, only "where", "group by" and "order by"
    statements.
    Thank you in advance for your help,
    Jesus 
    Edit:
    One of these queries are like the following (all of them are of this type):
    SELECT Field1, field2, field3, field4, field5, Sum(Field6) AS SumOfField6, Sum(Field7) AS SumOfField7
    FROM Table1
    WHERE Field6 is not null
    GROUP BY Field1, field2, field3, field4, field5
    Order By Sum(Field6) desc

    Hi Peter, 
    Thank you for your response, I updated the original question with one of the codes.
    Thanks,
    Jesus

  • Xi JDBC Adapter - Query SQL Statement & Update SQL Statement

    Hi!
    I configure the JDBC adapter sender (XI) to take data from Oracle database.
    I set the Query and Update SQL Statement in the Processing parameters of the communication channel in this way:
    Query SQL Statement :
    SELECT * FROM XI_TABLE WHERE STATUS = 'WAIT' ORDER BY ROW_NUM
    Update SQL Statement :
    UPDATE XI_TABLE SET STATUS = 'DONE', DATE = SYSDATE WHERE STATUS = 'WAIT'
    My question is :
    If a new record with the field STATUS = 'WAIT' is added to the table (xi_table) during the time between the execution of the query statement and the start of the update statement, what will happen to that record during the update?
    There is a way to avoid the update of that record? or to pass to the update statement only the record selected in the query statement?
    Please, may you give me some example?
    Thanks,
    Francesco

    hi,
    did you check "Isolation Level for Transaction"
    for the sender jdbc adapter?
    http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm
    Regards,
    michal

  • Export Query SQL multi-linee in XML format and Import XML in SAP

    Good morning
    Someone know if is possible after Export Query SQL on OITT and ITT1 with thousands rows in XML with values already change thru the query.
    Then import the XML without using loop in SAP with the above code vb.net
    oDistinta = DirectCast(m_oCompany.GetBusinessObjectFromXML(xmlFile, 0), SAPbobsCOM.ProductTrees)
                    Dim errCode As Integer = 0
                    Dim strErrore As String = ""
                    Dim iErrore As Integer = 0
                    oDistinta.Browser.ReadXml(xmlFile, 0)
                    errCode = oDistinta.Update
                    m_oCompany.GetLastError(iErrore, strErrore)
                    'on error
                    If iErrore <> 0 Then
    To make easy the program i post with 2 ProductTrees item. The 2 item already exist in OITT e ITT1.
    When i update the 1st item is modify but the 2nd not change.
    Here is the XML
    <?xml version="1.0" encoding="UTF-16"?>
    <BOM>
      <BO>
        <AdmInfo>
          <Object>66</Object>
          <Version>2</Version>
        </AdmInfo>
        <ProductTrees>
          <row>
            <TreeCode>V9998</TreeCode>
            <TreeType>iProductionTree</TreeType>
            <Quantity>1000.000000</Quantity>
            <U_SHI_MZDA>0</U_SHI_MZDA>
            <U_SHI_PUMA>0</U_SHI_PUMA>
            <U_SHI_PUUO>0</U_SHI_PUUO>
          </row>
        </ProductTrees>
        <ProductTrees_Lines>
          <row>
            <ItemCode>1047</ItemCode>
            <Quantity>5.000000</Quantity>
            <Warehouse>Mc</Warehouse>
            <Price>0.000000</Price>
            <Currency>
            </Currency>
            <IssueMethod>im_Backflush</IssueMethod>
            <Comment>
            </Comment>
            <ParentItem>V9998</ParentItem>
            <PriceList>2</PriceList>
            <DistributionRule>
            </DistributionRule>
            <U_IDE_POS>10</U_IDE_POS>
            <U_IDE_FASE>0</U_IDE_FASE>
            <U_IDE_OPER>10</U_IDE_OPER>
            <U_SHI_UndInv>N</U_SHI_UndInv>
            <U_SHI_Pri1>
            </U_SHI_Pri1>
            <U_SHI_Pri2>
            </U_SHI_Pri2>
            <U_SHI_Pri3>
            </U_SHI_Pri3>
            <U_SHI_Prgm>
            </U_SHI_Prgm>
            <U_SHI_Tim2>0.000000</U_SHI_Tim2>
            <U_SHI_Tim3>0.000000</U_SHI_Tim3>
            <U_SHI_DexNACQ>
            </U_SHI_DexNACQ>
            <U_SHI_BP>
            </U_SHI_BP>
            <U_SHI_PrcKit>0.000000</U_SHI_PrcKit>
            <U_SHI_ItmNACQ>
            </U_SHI_ItmNACQ>
            <U_SHI_LineOk>N</U_SHI_LineOk>
          </row>
        </ProductTrees_Lines>
        <ProductTrees>
          <row>
            <TreeCode>V9999</TreeCode>
            <TreeType>iProductionTree</TreeType>
            <Quantity>1000.000000</Quantity>
            <U_SHI_MZDA>0</U_SHI_MZDA>
            <U_SHI_PUMA>0</U_SHI_PUMA>
            <U_SHI_PUUO>0</U_SHI_PUUO>
          </row>
        </ProductTrees>
        <ProductTrees_Lines>
          <row>
            <ItemCode>1015</ItemCode>
            <Quantity>1000.000000</Quantity>
            <Warehouse>Mc</Warehouse>
            <Price>0.000000</Price>
            <Currency>
            </Currency>
            <IssueMethod>im_Backflush</IssueMethod>
            <Comment>
            </Comment>
            <ParentItem>V9999</ParentItem>
            <PriceList>5</PriceList>
            <DistributionRule>
            </DistributionRule>
            <U_IDE_POS>30</U_IDE_POS>
            <U_IDE_FASE>0</U_IDE_FASE>
            <U_IDE_OPER>30</U_IDE_OPER>
            <U_SHI_UndInv>N</U_SHI_UndInv>
            <U_SHI_Pri1>
            </U_SHI_Pri1>
            <U_SHI_Pri2>
            </U_SHI_Pri2>
            <U_SHI_Pri3>
            </U_SHI_Pri3>
            <U_SHI_Prgm>
            </U_SHI_Prgm>
            <U_SHI_Tim2>0.000000</U_SHI_Tim2>
            <U_SHI_Tim3>0.000000</U_SHI_Tim3>
            <U_SHI_DexNACQ>
            </U_SHI_DexNACQ>
            <U_SHI_BP>
            </U_SHI_BP>
            <U_SHI_PrcKit>0.000000</U_SHI_PrcKit>
            <U_SHI_ItmNACQ>
            </U_SHI_ItmNACQ>
            <U_SHI_LineOk>N</U_SHI_LineOk>
          </row>
        </ProductTrees_Lines>
      </BO>
    </BOM>
    Someone know the reason ?
    Thanks in advance.
    Regards

    Hi Gabriele,
    The issue is that the ReadXml method takes an index parameter which is the number of the object that you want to read from the XML data. In your code you are specifying index 0 which is the first product tree in your file so when you call the Update method this is the only record that will be updated. It is not possible to do a mass update using the DI API in this way, you must always load each object separately. You can use the GetXMLelementCount method of the Company object to find out how many product tree objects are in your file and then use the ReadXML method to load each one by incrementing the index parameter in a loop.
    Kind Regards,
    Owen

  • Import SQL into Fact Table - Conversion Error

    Hi All,
    I am new to BPC MS and did not know much into MS SQL.
    I am facing the Conversion error while converting between unicode and non unicode string data types.
    We are using SAP BPC 10.0 MS SP13, EPM-Addin SP18 on .Net 4
    The below is the error log
    Total Step: 4
    SQLToTxt: Failed in 0 seconds
    Import SQL into Fact Table: Failed in 0 seconds
    [Selection]
    DB = BPC
    TABLE = GlBalanceOpening
    COLUMNS = Account,Auxiliary,Curr,BalanceDateTime,Amount
    TRANSFORMATION = \JMG\LIQ_JMG\DataManager\TransformationFiles\GLOpeningBalances.xls
    CLEARDATA = No
    RUNLOGIC = No
    PROCESSCUBE = Yes
    CHECKLCK = No
    [Message]
    An error occurred while executing a package.
    Package Error Events: 
    ErrorCode = -1071636234
    Source = SQLToTxt
    SubComponent= OLE DB Source [68]
    Description = Column "Account" cannot convert between unicode and non-unicode string data types.
    IDOfInterfaceWithError= {C81DFC5A-3B22-4DA3-BD3B-10BF861A7F9C}
    Package Error Events: 
    ErrorCode = -1071636234
    Source = SQLToTxt
    SubComponent= OLE DB Source [68]
    Description = Column "AccountName" cannot convert between unicode and non-unicode string data types.
    IDOfInterfaceWithError= {C81DFC5A-3B22-4DA3-BD3B-10BF861A7F9C}
    Package Error Events: 
    ErrorCode = -1071636234
    Source = SQLToTxt
    SubComponent= OLE DB Source [68]
    Description = Column "Auxiliary" cannot convert between unicode and non-unicode string data types.
    IDOfInterfaceWithError= {C81DFC5A-3B22-4DA3-BD3B-10BF861A7F9C}
    Package Error Events: 
    ErrorCode = -1071636234
    Source = SQLToTxt
    SubComponent= OLE DB Source [68]
    Description = Column "AuxiliaryName" cannot convert between unicode and non-unicode string data types.
    IDOfInterfaceWithError= {C81DFC5A-3B22-4DA3-BD3B-10BF861A7F9C}
    Package Error Events: 
    ErrorCode = -1071636234
    Source = SQLToTxt
    SubComponent= OLE DB Source [68]
    Description = Column "Curr" cannot convert between unicode and non-unicode string data types.
    IDOfInterfaceWithError= {C81DFC5A-3B22-4DA3-BD3B-10BF861A7F9C}
    Package Error Events: 
    ErrorCode = -1071636234
    Source = SQLToTxt
    SubComponent= OLE DB Source [68]
    Description = Column "Dr" cannot convert between unicode and non-unicode string data types.
    IDOfInterfaceWithError= {C81DFC5A-3B22-4DA3-BD3B-10BF861A7F9C}
    Package Error Events: 
    ErrorCode = -1071636234
    Source = SQLToTxt
    SubComponent= OLE DB Source [68]
    Description = Column "Cr" cannot convert between unicode and non-unicode string data types.
    IDOfInterfaceWithError= {C81DFC5A-3B22-4DA3-BD3B-10BF861A7F9C}
    Package Error Events: 
    ErrorCode = -1073450901
    Source = SQLToTxt
    SubComponent= SSIS.Pipeline
    Description = "component "OLE DB Source" (68)" failed validation and returned validation status "VS_ISBROKEN".
    IDOfInterfaceWithError= {C81DFC5A-3B22-4DA3-BD3B-10BF861A7F9C}
    Package Error Events: 
    ErrorCode = -1073450996
    Source = SQLToTxt
    SubComponent= SSIS.Pipeline
    Description = One or more component failed validation.
    IDOfInterfaceWithError= {C81DFC5A-3B22-4DA3-BD3B-10BF861A7F9C}
    Package Error Events: 
    ErrorCode = -1073594105
    Source = SQLToTxt
    SubComponent=
    Description = There were errors during task validation.
    IDOfInterfaceWithError= {B4E78907-3D9C-4229-9DB9-6A311E45C779}
    Thanks and Regards,
    Raj

    Hi Raj,
    you have to modify the script of your package, see please 1629737 - Error in ImportSQL Data Manager Package
    Regards
         Roberto

  • Can I use a OID rule for a Query SQL Lov of BIP?

    Hi. Can I use OID data (rules) for a query sql lov in BIP? Ex. filters users/store.
    Thank you.
    R.

    Hi,
    I didn't look at the example, but if you want to secure your application then you should use container managed security. Read this .
    Anyway, you could add this before return "good"; in your login_action()
    FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put("username", user);Then, you can access this from anywhere in the application by using #{sessionScope.username}.
    Pedja

  • Query SQL database inside XSL

    Do you guys know how can I query SQL database select records and input them to XSL file?
    Let me know this is urgent.

    Is there an efficient way of doing this, rather than
    hardcoding all the less than,greater than lines?Sounds like you need to read this:
    http://java.sun.com/webservices/docs/1.1/tutorial/doc/index.html

  • Query SQL and output to text file then loop through list to execute

    It seems there's no obvious way to do what I want to below as everyone has their own take on querying SQL server with Powershell!
    I need to use PowerShell to connect to ServerA and query a test database and select Name from it.  The Name results of that query need to output to C:\names.txt and then I need a ForEach loop to go through that file line by line and execute some text
    against each Name from the list.
    Any ideas how I can achieve this?
    Thanks!

    I can't even output SQl to a table at the moment, the text file has a column header and about 50 empty rows in the file.
    $dataSource = "DEMO"
    $database = "TESTDB"
    $connectionString = "Server=$dataSource;uid=$user; pwd=$pwd;Database=$database;Integrated Security=True;"
    $query = "SELECT name FROM dbo.names"
    $connection = New-Object System.Data.SqlClient.SqlConnection
    $connection.ConnectionString = $connectionString
    $connection.Open()
    $command = $connection.CreateCommand()
    $command.CommandText  = $query
    $result = $command.ExecuteReader()
    $table = new-object "System.Data.DataTable"
    $table.Load($result)
    $format = @{Expression={$_.Id};Label="Name";width=25}
    $table | format-table $format | Out-File C:\export\servers.txt
    $connection.Close()

  • How to set query SQL on db throug item value?

    Hi
    I've two pages:
    the first page contain the item textfield value (P1_NAME) and second page contain the query SQL.
    Where the query sql instruction insert in the second page rendering?
    In the Items, in the buttons, in the computation, in the process?
    How display the results of query?
    Help Me!!!

    On re-reading I think I get it. When you open the second page, which could be anywhere, you'll have to tell me (could be a Branch, could be a linked column in a report, could be triggered from a button). Whervever the code that opens the second page is, you will see a setting labelled "Target is a" and the chosen selection will be "Page in this Appication" Right under that, you will see two other fields labelled "Set These Items" and "With These Values" this will let you set whatever items you wish on the page that you are opening.

Maybe you are looking for

  • Pattern Swatch From Pattern Maker Filter

    Is there a way to copy a new custom Pattern Swatch that you create using the Pattern Maker filter? I have often created a pattern that worked perfect but could only apply it to a layer. I want to be able to save just the custom swatch that patterns c

  • Link to a chapter of another pdf document

    In brief: I want to insert links from a pdf document to a section or chapter of a different pdf document. ¿How can I do this? (The documents are done with Word and then passed to pdf) In detail: The documents are originally done with word and then pa

  • Can I turn off the reflections in the slideshow?

    Posted to .mac, the slideshow automatically puts a reflection under every photo. Can I turn it off? At least when posted to a different site, the slideshow function just puts up a big frame, and does not use a reflection. Mark

  • Can I go back in time with Contacts saved on iCloud?

    I noticed that roughly 300 contact on my iPhone were duplicated. When I started deleting the duplicates, both would disaper. I back up my contact and most other things to iCloud (not iTunes). Is there a way to go "back in time" to receive them? Thank

  • Will the iPhone 3G and/or 2.0 software give push email for all email?

    ..instead of just MobileMe? I'd really like consistent push email for my gmail and yahoo! email accounts similar to the blackberry. Will I be getting this? I don't have a mobileme account nor desire to pay $90 for it.