Kind of query on an array

Hi,
I have an array like this :
DATA | YEAR | SCENARIO | JAN | FEB | MAR | ....
data1 2008 1 120 101 109
data2 2008 2 120 105 104
data3 2007 1 100 108 111
data4 2008 1 124 101 116
and I want to search something like we do with a query but on
an array
SELECT JAN
FROM myArray
WHERE
YEAR = 2008
AND SCENARIO = 1
AND DATA= data3
is it possible ? and how to do it ?
Thanks !

Here's a simple schema :
1. query from flex to coldfusion
2. cf return array to flex
3. from flex I send the array to cf in order to make some
calcuations (that's where I need to "query" the array)
4. new array returned by cf to flex
the idea is that I make a query on the server A (sql server)
that returns all the infos I need
then I send those infos to the server B (coldfusion) to avoid
using server A ...
do you know what I mean ?

Similar Messages

  • How to get the recordcount of a query in a array

    I have an array called "sums" that holds 4 query's, each
    query has a different number of records.
    Then i use this code to loop the records of the query inside
    the array:
    <cfloop index="x" from="1" to="#arrayLen(sums)#">
    <cfloop index="i" from="1" to="#sums[x].recordcount#">
    data to loop
    </cfloop>
    </cfloop>
    This results in 4 times 4 records, of course as i now use the
    array length in the inner loop.
    My question is, how can i get the recordcount of a query in a
    array so i can use that for the inner loop "to" value.
    Thanks.

    quote:
    Originally posted by:
    MarcovandenOever
    Does sums[x]recordcount point to the first query in the array
    sums when i use it like this?
    In the array there are four query's, i want to loop the
    array, then i want to loop the records of each query.
    <cfloop index="x" from="1" to="#arrayLen(sums)#">
    <cfloop index="i" from="1" to="#sums[x].recordcount#">
    data to loop
    </cfloop>
    </cfloop>
    No. It points to each query in turn. So if you have four
    queries, the first time it will point to sum[1]. Then next time
    sum[2], etcetera. It should work exactly the way you want "as is".
    If you are having a problem, it is probably related to the code
    inside your inner loop.

  • View query to results array

    previus information... jdeveloper 10.1.3.0.4, the application is java swing adf bc .
    hi, i have a bc view (sql only) inside an application module, how could i assign the results of view's query with an array of objects.

    Not sure if this is on target, but if you are using ADF BC the view object's query results are already in an array of objects. Reference the following document to view how the results are structured. You can programmatically then work with the results set using the ViewObject, RowSet, and RowSetIterator Interfaces. See the SRDemo Application Module services for some examples of this in action (demo is in JSF though, not Swing.)
    http://www.oracle.com/technology/products/jdev/tips/muench/mostcommon/index.html
    thanks

  • Accessing Query ColumnList in Array Collection

    I want to get the Column names in a query object returned
    from a WebService as an Array Collection.
    I have a WebService that is returning the following SOAP
    data:
    <?xml version="1.0"
    encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="
    http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="
    http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="
    http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
    <ns1:sStockQuotesResponse soapenv:encodingStyle="
    http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:ns1="
    http://cfc.private">
    <sStockQuotesReturn xsi:type="ns2:QueryBean" xmlns:ns2="
    http://rpc.xml.coldfusion">
    <columnList soapenc:arrayType="xsd:string[4]"
    xsi:type="soapenc:Array" xmlns:soapenc="
    http://schemas.xmlsoap.org/soap/encoding/">
    <columnList
    xsi:type="xsd:string">name</columnList>
    <columnList
    xsi:type="xsd:string">symbol</columnList>
    <columnList
    xsi:type="xsd:string">lastprice</columnList>
    <columnList
    xsi:type="xsd:string">lastpricedate</columnList>
    </columnList>
    <data soapenc:arrayType="xsd:anyType[][7]"
    xsi:type="soapenc:Array" xmlns:soapenc="
    http://schemas.xmlsoap.org/soap/encoding/">
    <data soapenc:arrayType="xsd:anyType[4]"
    xsi:type="soapenc:Array">
    <data xsi:type="soapenc:string">ALCOA INC</data>
    <data xsi:type="soapenc:string">AA</data>
    <data xsi:type="soapenc:string">35.87</data>
    <data xsi:type="soapenc:string">11/12/2007
    4:00pm</data>
    </data>
    </data>
    </sStockQuotesReturn>
    </ns1:sStockQuotesResponse>
    </soapenv:Body>
    </soapenv:Envelope>
    I have no problem converting the data to a Flex Array
    Collection, and populating a DataGrid with this data.
    However, I want to grab the Column Names, so that I can
    create the DataGrid columns dynamically. I have searched the FB3
    documentation, but cannot find an answer. Please help.
    Thank you.
    Eric.

    I'm not sure about dealing with a Remote Object / CFC
    configuration, but if your collection essentially ends up like:
    var myAC:ArrayCollection = new ArrayCollection([{name:
    'First', phoneNumber: '555'}]);
    Then yes you should be able to access it with:
    myAC.getItemAt(0).phoneNumber
    I take this has not worked?

  • Urgent query about copying array of objects to html item

    I have an urgent query about how I can display an array of objects on a html form. The only suitable html item I can see for this is a drop down box. Ideally a combo box would be preferable but I cant find anything like this. Basically the display item needs to contain 3 columns of data and has to display a number of rows. Can anyone tell me how to copy the array of values into a drop down box?

    Here is all the code from my jsp. It keeps returning null:
    <%@ page language="java" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ page import="java.util.*, java.lang.*" %>
    <html:html locale="true">
    <head>
    <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252"/>
    <link rel="stylesheet" type="text/css" name="timesheet" href="stylesheets/timesheet.css"></link>
    <script type="text/javascript" language="javascript" src="javascript/sum.js"></script>
    <title><bean:message key="eng.title"/></title>
    <html:base/>
    </head>
    <body bgcolor="white">
    <table border="0" width="100%">
    <tr>
    <td width="30%"><html:img page="/images/PwC_logo.gif"/></td>
    <td width="40%" class="applicationTitleCell">
    <div align="center">
    <bean:message key="application.title"/>
    </div>
    </td>
    <td width="30%"> </td>
    </tr>
    </table>
    <center>
    <html:form action="/selectEng" focus="engSearchNumber">
    <table border="0" width="100%">
    <tr>
    <td width="30%"></td>
    <td width="20%" align="center"> <b> <bean:message key="eng.prompt.engSearchNumber"/> </b> </td>
    <td width="20%" align="center"> <b> <bean:message key="eng.prompt.clientSearchName"/> </b> </td>
    <td width="40%">   </td>
    </tr>
    <tr>
    <td width="30%"></td>
    <td width="20%" align="center"> <html:text property="engSearchNumber" size="20" maxlength="9" onchange='<%= "SearchLength(this)" %>' onkeypress="return NumberOnly()" /> </td>
    <td width="20%" align="center"> <html:text property="clientSearchName" size="20" maxlength="20" onchange='<%= "SearchLength(this)" %>'/> </td>
    <td width="30%">   </td>
    </tr>
    </table>
    <table border="0" width="100%">
    <tr>
    <td width="30%"></td>
    <td width="40%" align="center"><html:image property="findButton" src="images/Find.gif" alt="Find"/></td>
    <td width="30%">   </td>
    </tr>
    <jsp:useBean id="selectEngForm" scope="session" class="Time.SelectEngForm" />
    <% if (selectEngForm.getEngSearchNumber() != null) { %>
    <tr>
    <td width="30%"></td>
    <td width="40%" align="center"><select name="engListing" size="5">
    <%= selectEngForm.getEngListing() %>
    </select></td>
    <td width="30%">   </td>
    </tr>
    <% } else if (selectEngForm.getClientSearchName()!=null){ %>
    <tr>
    <td width="30%"></td>
    <td width="40%" align="center"><select name="engListing" size="5">
    <%= selectEngForm.getEngListing()%>
    </select></td>
    <td width="30%">   </td>
    </tr>
    <% } %>
    <%=request.getParameter("engListing")%>
    </table>
    <br><br>
    <table border="0" width="100%">
    <tr>
    <td width="30%"></td>
    <td width="11%" align="center"> <html:image property="addButton" src="images/Add.gif" alt="Add the selected engagement to the timesheet"/> </td>
    <td width="11%" align="center"> <html:image property="cancelButton" src="images/Cancel.gif" alt="Cancel"/> </td>
    <td width="30%">   </td>
    </tr>
    </table>
    </html:form>
    </center>
    <br>
    <center><html:link forward="timesheet"> <html:img src="images/Back.gif" border="0"/> </html:link></center>
    </body>
    </html:html>

  • Convert JPA Query getResultList to Array

    I have been struggling with this problem for several hours now. All I have succeeded in doing is attempt every possible way to convert a List into an array and I just get errors.
         // create native SQL query
         Query q = em.createNativeQuery("SELECT * FROM Project p");
         // get and process the results
         List<Project> list = q.getResultList();
            Project[] retVal = new Project[list.size()];
         for (int i = 0; i < list.size(); i++)
             retVal[i] = list.get(i);
         }One would assume this to work, however this generates a ClassCastException, cannot convert Object to Project, oddly because as far as I can see everything in the code is strongly typed. I think Persistence fills the typed List with Object and not Project??
    So I tried:
    Project[] retVal = list.toArray(new Project[0]);This generates an ArrayStoreException.
    Finally I tried the basic, should generate x-lint warning:
    Project[] retVal = (Project[])(list.toArray());This also return ClassCastException, same reason as the first attempt.
    I want my WebService function to return a standard Project[] not the java.lang.List class. But it seems JPA queries only support getting a List. I have googled to no end for a solution. Help appreciated!
    Thanks.

    You are almost right, you can solve this two ways as below:
    First, use native query with result class reference.
    Second, use JPA query with createQuery method.
    Both the options should work, see code below:
    // First option, create native SQL query with result class reference.
    Query q = em.createNativeQuery("SELECT * FROM Project p",Project.class);
    // Second option, Create JPA Query.
    // Query q = em.createQuery("SELECT p FROM Project p");
    // get and process the results
    List<Project> list = q.getResultList();
    // Putting result to an array
    Project[] retVal = new Project[list.size()];
    list.toArray(retVal);*Cheers,
    typurohit* (Tejas Purohit)

  • How to store select query output in arrays.

    i created a varray type variables and now want to assign some data though select query output in pl/sql code as well as in reports 6i.

    You're in the wrong forum (this one is for issues with the SQL Developer tool). You were in the right one where you posted first, but don't reuse unrelated threads as you did.
    Regards,
    K.

  • Need different kinds of query's  for same result

    Hi all,
    I need a query for the following scenario,the query which i mentioned below is giving me result as i need,i would like to know whether there are any other better ways to get the same result.
    create table xxeaccess
    (client_name varchar2(100), service_id number,requestee_id number,requestor_name varchar2(100));
    insert into xxeaccess values('UBS', 100,1000,'Raghu');
    insert into xxeaccess values('UBS', 100,1000,'Tedla');
    insert into xxeaccess values('SBI', 200,2000,'Sai');
    insert into xxeaccess values('SBH',300,3000,'Radha');
    insert into xxeaccess values ('SBH',300,3000,'Krishna');
    insert into xxeaccess values('Canara Bank',400,4000,'Bharath');
    select * from xxeaccess
    where (client_name,service_id,requestee_id) in
    (select client_name,service_id,requestee_id
    from xxeaccess
    group by client_name,service_id,requestee_id
    having count(*) > 1);
    Requirement is like this,client_name,service_id,requestee_id should be same only requestor_name should be differnt and there should be more  than one record with same client_name,service_id and requestee_id.
    Thanks
    Raghu                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    SQL> select * from xxeaccess
      2  where (client_name,service_id,requestee_id) in
      3  (select client_name,service_id,requestee_id
      4  from xxeaccess
      5  group by client_name,service_id,requestee_id
      6  having count(*) > 1)
      7  /
    CLIENT_NAME          SERVICE_ID REQUESTEE_ID REQUESTOR_NAME
    SBH                         300         3000 Radha
    SBH                         300         3000 Krishna
    UBS                         100         1000 Raghu
    UBS                         100         1000 Tedla
    4 rijen zijn geselecteerd.
    Uitvoeringspan
       0      SELECT STATEMENT Optimizer=CHOOSE
       1    0   MERGE JOIN
       2    1     SORT (JOIN)
       3    2       TABLE ACCESS (FULL) OF 'XXEACCESS'
       4    1     SORT (JOIN)
       5    4       VIEW OF 'VW_NSO_1'
       6    5         FILTER
       7    6           SORT (GROUP BY)
       8    7             TABLE ACCESS (FULL) OF 'XXEACCESS'
    SQL> select client_name
      2       , service_id
      3       , requestee_id
      4       , requestor_name
      5    from ( select t.*
      6                , count(*) over (partition by client_name,service_id,requestee_id) mycount
      7             from xxeaccess t
      8         )
      9   where mycount > 1
    10  /
    CLIENT_NAME          SERVICE_ID REQUESTEE_ID REQUESTOR_NAME
    SBH                         300         3000 Radha
    SBH                         300         3000 Krishna
    UBS                         100         1000 Raghu
    UBS                         100         1000 Tedla
    4 rijen zijn geselecteerd.
    Uitvoeringspan
       0      SELECT STATEMENT Optimizer=CHOOSE
       1    0   VIEW
       2    1     WINDOW (SORT)
       3    2       TABLE ACCESS (FULL) OF 'XXEACCESS'Regards,
    Rob.

  • Column Header for Select AS kind of query

    Hi,
    I wish to write a csv file by using the odisqlunload function. I have wrote the funtion as :
    OdiSqlUnload "-FILE=#FILE_PATH/#FILE_NAME" "-DRIVER=<%=odiRef.getInfo("SRC_JAVA_DRIVER")%>" "-URL=<%=odiRef.getInfo("SRC_JAVA_URL")%>" "-USER=<%=odiRef.getInfo("SRC_USER_NAME")%>" "-PASS=<%=odiRef.getInfo("SRC_ENCODED_PASS")%>" "-FILE_FORMAT=VARIABLE" "-FIELD_SEP=," "-ROW_SEP=\r\n" "-DATE_FORMAT=yyyy/MM/dd HH:mm:ss" "-CHARSET_ENCODING=ISO8859_1" "-XML_CHARSET_ENCODING=ISO-8859-1" "-FETCH_SIZE=1000" "-QUERY=SELECT RPAD(CI_FT_GL.GL_ACCT, 31, ' '),LPAD(CASE WHEN CI_FT.CURRENCY_CD != CI_FT_GL_EXT.DIVISION_CURCY_CD THEN sum(CI_FT_GL_EXT.DIVISION_AMT) ELSE sum(CI_FT_GL.AMOUNT) END,17,' '),' ',RPAD(CI_DST_CD_CHAR.CHAR_VAL, 25, ' '),RPAD(CI_DST_CD_CHAR.DST_ID, 8, ' '),'RMB ',' ',RPAD(to_char(sysdate, 'YYYYMMDD'), 8, ' ') FROM CI_DST_CD_CHAR CI_DST_CD_CHAR,CI_FT CI_FT,CI_FT_GL CI_FT_GL,CI_FT_GL_EXT CI_FT_GL_EXT where (CI_FT.FT_ID = CI_FT_GL.FT_ID) AND (CI_FT_GL.FT_ID = CI_FT_GL_EXT.FT_ID(+)) AND CI_FT_GL.GL_SEQ_NBR = CI_FT_GL_EXT.GL_SEQ_NBR(+) AND (CI_FT_GL.DST_ID = CI_DST_CD_CHAR.DST_ID) AND (CI_DST_CD_CHAR.CHAR_TYPE_CD = 'DTLREF1') AND (trim(CI_FT_GL.GL_ACCT) is not null) AND (CI_FT.XFER_TO_GL_DT is null) AND (CI_FT.GL_DISTRIB_STATUS in ('G','M')) AND (trunc(CI_FT.SCHED_DISTRIB_DT) <= trunc(sysdate)) AND CI_FT.CIS_DIVISION = '#DIVISION' GROUP BY CI_FT_GL.GL_ACCT,CI_DST_CD_CHAR.CHAR_VAL,CI_DST_CD_CHAR.DST_ID,CI_FT.CURRENCY_CD,CI_FT_GL_EXT.DIVISION_CURCY_CD"
    Then i used a jython code to generate headers. Bcoz the OdiSqlUnload does not generate headers. But the jython code is not useful when we have sql statements lik 'Select AS' :
    SELECT RPAD(CI_FT_GL.GL_ACCT, 31, ' ') AS GL_ACCT,
    LPAD(CASE WHEN CI_FT.CURRENCY_CD != CI_FT_GL_EXT.DIVISION_CURCY_CD THEN sum(CI_FT_GL_EXT.DIVISION_AMT) ELSE sum(CI_FT_GL.AMOUNT) END,17,' ') AS GL_AMOUNT,
    My Jython code is:
    import string
    import java.sql as sql
    import java.lang as lang
    import re
    sourceConnection = odiRef.getJDBCConnection("SRC")
    output_write=open('d:/Bijal/output1.csv','r+')
    myStmt = sourceConnection.createStatement()
    my_query = "SELECT RPAD(CI_FT_GL.GL_ACCT, 31, ' ') AS GL_ACCT,
    LPAD(CASE WHEN CI_FT.CURRENCY_CD != CI_FT_GL_EXT.DIVISION_CURCY_CD THEN sum(CI_FT_GL_EXT.DIVISION_AMT) ELSE sum(CI_FT_GL.AMOUNT) END,17,' ') AS GL_AMOUNT,
    ' ' AS BLANK1,
    RPAD(CI_DST_CD_CHAR.CHAR_VAL, 25, ' ')AS DESCR,
    RPAD(CI_DST_CD_CHAR.DST_ID, 8, ' ')AS DST_ID,
    'RMB ' Currency_Cd,
    ' ' AS BLANK2,
    RPAD(to_char(sysdate, 'YYYYMMDD'), 8, ' ') AS DT_OF_TXN
    FROM CI_DST_CD_CHAR CI_DST_CD_CHAR,CI_FT CI_FT,CI_FT_GL CI_FT_GL,CI_FT_GL_EXT CI_FT_GL_EXT
    where (CI_FT.FT_ID = CI_FT_GL.FT_ID) AND (CI_FT_GL.FT_ID = CI_FT_GL_EXT.FT_ID(+)) AND
    CI_FT_GL.GL_SEQ_NBR = CI_FT_GL_EXT.GL_SEQ_NBR(+) AND (CI_FT_GL.DST_ID = CI_DST_CD_CHAR.DST_ID)
    AND (CI_DST_CD_CHAR.CHAR_TYPE_CD = 'DTLREF1') AND (trim(CI_FT_GL.GL_ACCT) is not null)
    AND (CI_FT.XFER_TO_GL_DT is null) AND (CI_FT.GL_DISTRIB_STATUS in ('G','M')) AND
    (trunc(CI_FT.SCHED_DISTRIB_DT) <= trunc(sysdate)) AND CI_FT.CIS_DIVISION = 'MF'
    GROUP BY CI_FT_GL.GL_ACCT,
    CI_DST_CD_CHAR.CHAR_VAL,
    CI_DST_CD_CHAR.DST_ID,
    CI_FT.CURRENCY_CD,
    CI_FT_GL_EXT.DIVISION_CURCY_CD"
    my_query=my_query.upper()
    if string.find(my_query, '*') > 0:
    myRs = myStmt.executeQuery(my_query)
    md=myRs.getMetaData()
    collect=[]
    i=1
    while (i <= md.getColumnCount()):
    collect.append(md.getColumnName(i))
    i += 1
    header=','.join(map(string.strip, collect))
    elif string.find(my_query,'||') > 0:
    header = my_query[7:string.find(my_query, 'FROM')].replace("||','||",',')
    else:
    header = my_query[7:string.find(my_query, 'FROM')]
    print header
    old=output_write.read()
    output_write.seek(0)
    output_write.write (header+'\n'+old)
    sourceConnection.close()
    output_write.close()
    But it does not populate for Select As statements and throws error lik:
    'mismatched character \'\\n\' expecting \'"\'', ('<string>', 8, 62, 'my_query = "SELECT RPAD(CI_FT_GL.GL_ACCT, 31, \' \') AS GL_ACCT,\n'))
    Plz help me get headers in my output file :)

    Solution1:
    Still you can achieve this by using sys_connect_by_path ( if you know the use of it) to generate header. below link can help with another approach.
    http://www.business-intelligence-quotient.com/?p=546
    Solution2:
    You need to create one file (header= true )with interface as suggested by sutirtha. Then you can copy (odifilecopy) this file to another directory with dynamic name (inside variable) and dynamic path. In this interface keep the truncate option to true so that everytime data wont be appended to the end of file. After reversing the file change the column name Manually from C1 to your ACTUAL_COL_NAME in file. Because ODI always generate the column names using C1,C2,C3 ....
    The only risk in second approach is that if someone will delete the file then you will get error. For this you need to create a temp table in ODI with all column-name (header in file). then using above jython code or sys_connect_by_path (select * from temp_table), you can generate the header easily. Now this file will be generated dynamically and can be used by the interface. So even if someone will delete the file you can generate it during run time.
    Thanks.

  • Not getting all results in Array Populated from Query

    When running this it is only giving me the last value of my query in the array. Any thoughts on why this is happening? I appreciate any assistance. Thank you
    <cfset result = arrayNew(1) />
               <cfset ArrayMedSchools = structNew() />
            <cfloop query="GetMedSchool" >
                 <cfoutput>
                  <cfset ArrayMedSchools.name = Institution />
                  <cfset ArrayMedSchools.id = InstitutionID />
                  <cfset arrayAppend(result,ArrayMedSChools) />
                 </cfoutput>
            </cfloop>
            <cfset ArrayMedSchools = structNew()/>
            <cfdump var="#GetMedSchool#" label="Original Query">
            <cfdump var="#result#" label="resulting array">

    So your query has X rows.  Does your array have the values for the last row in your query, duplicated X times?  Or does it just have one element, with the values from the last row in the query?
    One thing you might want to try is resetting the structure within your query loop:
    <cfset result = arrayNew(1)>
    <cfset ArrayMedSchools = structNew()>
    <cfloop query="GetMedSchool">
        <cfset ArrayMedSchools = structNew()>
        <cfset ArrayMedSchools.name = GetMedSchool.Institution>
        <cfset ArrayMedSchools.id = GetMedSchool.InstitutionID>
        <cfset arrayAppend(result, ArrayMedSchools)>
    </cfloop>
    <cfdump var="#GetMedSchool#" label="Original Query">
    <cfdump var="#result#" label="resulting array">
    Also note that you don't need to use <cfoutput> within your loop there.

  • Array con Query

    Buenas tardes es que estoy haciendo una consulta y recorriendo el query pero me esta trayendo problemas, entonces lo que quiero es pasar la informacion del query a un array para recorrer el array pero me aparece error al convertir lo stipos de datos??

    el error es al tratar de convertir los datos complejos a datos simples.

  • [Solved] Problem with LOV and 'enter query' mode

    Hi all,
    I'm kind of new to Forms and I'm having some problems that I'm not being able to resolve. I already search it on the net, but nothing relevant came up. If anyone could help me I appreciated it.
    In my form I have some fields, and in one of them I have a LOV, and almost everything works fine. I inserted data, changed it, deleted it and all it's ok.
    But when I change to 'enter query' mode, when I try to search for data on the LOV field it ignores what I write.
    That is, for it, it's the same if I make F11 -> write 'aaaa' -> ctrl + F11 or if I make F11 -> '%' -> ctrl + F11.
    It behaves the same way, shows me all the records.
    Probably I'm missing something basic, but I'm not getting it...
    Thanks,
    Ana

    when you create a lov by wizard the lov and record group have always the same name..
    the problem is that the item is NOT based in the tabe.
    what kind of query do you execute if you choose something from a love which is not based on the db?
    i mean, this item has no influence on the query of the table, so whatever you choose it's like a "select * from table"
    i hope i was clear

  • Query Report PO

    Hi Experts,
    Is it possible to get full flow of purchase order: from Purchase order to A/P Credit memo.
    Item foreign name,Itemcode,Cardcode,Docdate,Quantity,Total.e.t.c..
    In SAP Purchase analysis report : Item Foreign name not included so i need to write separate query. can any one help me regarding this ..query.
    kart

    Please check if you are looking this kind of query:
    Select t2.frgnname,t0.itemcode, t1.cardcode as Vendor#, sum(t0.quantity)
    as Quantity, sum(t0.LineTotal) as Amount
    from pch1 t0
    inner join opch t1 on t1.docentry = t0.docentry
    Inner Join oitm t2 on t2.itemcode = t0.itemcode
    where t1.DocType = 'I' and T1.DocDate between '[%0]' and '[%1]'
    Group By t2.frgnname,t0.itemcode, t1.cardcode
    This is based on A/P invoice. If this meets your need, all other A/P documents have exact query format.
    Thanks,
    Gordon

  • Updating array data in sql database

    HI,
    Im facing problems in updating array data in SQL database.
    As of now, i am able to write an "insert" query and insert array data in an image datatype field. Im using image datatype because the array size is very big(around 80,000 x and y values).
    Althoug inserting data is easy im unable to write a query to update this data.
    Referring to the help of SQL server and Labview database connectivity toolkit, i came across a method of accessing image datatype....using textpointers, which are 16 bit binary values and using the WRITETEXT function instead of the UPDATE function.
    but the problem im facing is that ive to pass the array as a 2d string array in the query as a result the updated array is retrieved in the form of a string a
    nd not as an array. how do I get over this problem?

    Hi Pavitra,
    I'm not very clear on how you have inserted the data into your application, but I do know that when you call the UPDATETEXT or WRITETEXT function you use the TEXTPOINTERS to point to the first location of a 1d array. So, depending on how you've stored the data, you may have problems updating your data if you're looking at it as a 1d array instead of how you originally formatted it. If you are able to successfully access the data as a 1d array, you can use the database variant to data type vi and pass in a string array constant for the data type. This will convert the variant datatype into whatever you specify. You may have to index the row and column of the variant (you receive a 2d array of variant) first before you convert. If possible, can yo
    u provide some more detail and maybe some example code of how you perform the insert and plan to do the update? I can probably give you a better solution if I know how you are formatting the data. Thanks!
    Jeremy L.
    National Instruments
    Jeremy L.
    National Instruments

  • How can i see the values of a prepared query

    Somebody knows about a tool that show me the values of a prepared query.
    I tried with the view V$SQL and with the TKPROF, but both show me the same query text and i need to know the parameter's values. Example of a prepared query - I don't know if it is the correct name of that kind of query.
    UPDATE "CL0E01" SET "BLOQUEO"=:1
    WHERE
    "CLAVE"=:2 AND "NUM_REGS"=:3 AND "ULT_CLV"=:4 AND "BLOQUEO"=:5
    Is it a tool that show me the value??
    Thanks for the help.
    Roberto Moreno

    I tried with the view V$SQL_BIND_CAPTURE but i get this error. "ORA-00932: inconsistent datatypes: expected CHAR got -". I executed in the Application Express.
    What could be wrong??
    I put my STATISTICS_LEVEL to ALL but nothing happen. I recieved the same result.
    I executed the view V$STATISTICS_LEVEL, for the Bind Data Capture I have enabled the session and system status, the activation level is TYPICAL.
    Thanks for your help TongucY

Maybe you are looking for

  • Can't watch a programme and record at the same time.

    I rang Sky who say it's nothing to do with them. Gave me Lovedigital number. Rang them they said contact my landlord. Rang Bristol City Council, they say it's nothing to do with them.

  • Can Anyone help save my Nokia Lumia 1520?

    Hello I am in need of help to save my Lumia 1520. I made the mistake of flashing my lumia 1520 (RM-937) with a lumia 1520 (RM-938) rom. Ever-since, my phone started acting out. The phone is stuck in aiplane mode and does not connect to GSM network an

  • Saving a document

    I am a novice with this stuff but here goes.  My wife was able to work within and save a certain .pdf document.  I recently uninstalled Reader 7.0 and installed Reader X.  My wife then couldn't work and save the document that she could previously.  I

  • Ok to update to iOS 5 from 4.2?

    Hello. I have an iPhone 4 and would like to iOS 5. I am currentyl running 4.2.1 and have nerver updated to any of the 4.3 versions for whatever reason. Is it ok to skip 4.3 and update directly from 4.2 to 5? Are there any known issues of skipping ver

  • SRGB vs. Adobe (1998) RGB

    This is likely a basic question for all the pros out there, but here it is: In Scott Kelby's The Photoshop CS Book (2003), it says on p. 116: "Photoshops' default color space (sRGB...) is arguably the worst possible color space for professional photo