Query required to get data

hi
i need to a query to get the data as per given structure below.
tha data should be based on stock code and dates.
for example : stock_code = 01 and
from date 01/01/08
to date 31/01/08
Date particulars reciepts issued returns closing bal
01/01/08 opening balance 0
01/01/08 recieved stock : no 1 18 18
02/01/08 issued stock : no 5 5 13
03/01/08 return stock : no 50 3 16
and so on
here is the tables i m using
SQL> desc bal_sheet (balance sheet holds the opening and closing record)
Name Null? Type
BDATE DATE
ACC_CODE VARCHAR2(20)
OPENBAL NUMBER(20,4)
CLOSEBAL NUMBER(20,4)
SQL> desc stock_reg
Name Null? Type
STOCKCODE NOT NULL VARCHAR2(20)
ITEM_CODE VARCHAR2(10)
DESCR NOT NULL VARCHAR2(50)
COMCODE VARCHAR2(6)
COMPANY NOT NULL VARCHAR2(200)
SHORT_NAME VARCHAR2(10)
PACK VARCHAR2(10)
PRICE NUMBER(10,4)
TOTAL_STOCK NUMBER
SQL> DESC PURCHASE_HEADER
Name Null? Type
P_ID NOT NULL VARCHAR2(10)
ACC_CODE VARCHAR2(10)
P_DATE DATE
REMARK VARCHAR2(500)
INVOICE_DATE DATE
NTOTAL NUMBER(12,4)
SQL> DESC PURCHASE_DETAIL
Name Null? Type
STOCKCODE VARCHAR2(20)
P_ID VARCHAR2(10)
QTY NUMBER
BONUS NUMBER
PRICE NUMBER(15,4)
EXPIRE_DATE DATE
DAMAGE NUMBER
AMOUNT NUMBER(15,4)
SQL> DESC SALES_HEADER
Name Null? Type
S_ID NOT NULL VARCHAR2(8)
ACC_CODE VARCHAR2(10)
SALES_MANID VARCHAR2(20)
S_DATE DATE
REMARKS VARCHAR2(500)
NTOTAL NUMBER(12,4)
SQL> DESC SALES_DETAIL
Name Null? Type
S_ID NOT NULL VARCHAR2(8)
STOCKCODE NOT NULL VARCHAR2(20)
QTY NUMBER
BONUS NUMBER
BATCH_NO NOT NULL VARCHAR2(10)
EXPIRY_DATE DATE
AMOUNT NUMBER(15,4)
SQL> DESC SALES_HEADER
Name Null? Type
SR_ID NOT NULL VARCHAR2(8)
ACC_CODE VARCHAR2(10)
SALES_MANID VARCHAR2(20)
S_DATE DATE
REMARKS VARCHAR2(500)
NTOTAL NUMBER(12,4)
SQL> DESC SALES_DETAILR
Name Null? Type
SR_ID NOT NULL VARCHAR2(8)
STOCKCODE NOT NULL VARCHAR2(20)
QTY NUMBER
BONUS NUMBER
BATCH_NO NOT NULL VARCHAR2(10)
EXPIRY_DATE DATE
AMOUNT NUMBER(15,4)
hope the information would be enough to get understand the problem

Query required to get data Agreed ! Even on your side it is required.
Well, please, understand we are not here to do your job. So, make effort on your side, show us what you have already done/tried, and post here your results.
And also, use the tags [pre] and [/pre] around your code against the forum side to keep your post readable.
Help us to help you,
Nicolas.

Similar Messages

  • Adhoc Query Requirement with Multiple Data Source

    Hi All,
    I have a Adhoc Query Requirement with Multiple Data Source. Is there any way to achive it. Other than Resultant set and bring into Model.
    Thanks
    SS

    You can compare stuff in the EL, but I don't think this is what you need.
    You can just use Java code in the backing bean class for all the business logic. You can use DAO classes for database access logic. Finally for displaying you can use the JSF tags such as h:outputText.

  • Sql query required to fetch data in desired format.

    Hi All,
    Greetings,
    I have 1 table called sessioninfo. below are the table structure and table data,
    CREATE TABLE HR.SESSIONINFO
    REPORT_DATE DATE,
    REPORT_TIME VARCHAR2(100 BYTE),
    SESSION1 NUMBER,
    SESSION2 NUMBER,
    SESSION3 NUMBER,
    SESSION4 NUMBER,
    SESSION5 NUMBER,
    SESSION6 NUMBER,
    SESSION7 NUMBER,
    SESSION8 NUMBER,
    SESSION9 NUMBER,
    SESSION10 NUMBER,
    SESSION11 NUMBER,
    SESSION12 NUMBER,
    SESSION13 NUMBER,
    SESSION14 NUMBER,
    SESSION15 NUMBER,
    SESSION16 NUMBER,
    SESSION17 NUMBER,
    SESSION18 NUMBER,
    SESSION19 NUMBER,
    SESSION20 NUMBER,
    SESSION21 NUMBER,
    SESSION22 NUMBER,
    SESSION23 NUMBER,
    SESSION24 NUMBER,
    SESSION25 NUMBER,
    SESSION26 NUMBER,
    SESSION27 NUMBER,
    SESSION28 NUMBER,
    SESSION29 NUMBER,
    SESSION30 NUMBER,
    SESSION31 NUMBER,
    SESSION32 NUMBER,
    SESSION33 NUMBER,
    SESSION34 NUMBER,
    SESSION35 NUMBER,
    SESSION36 NUMBER,
    SESSION37 NUMBER,
    SESSION38 NUMBER,
    SESSION39 NUMBER,
    SESSION40 NUMBER,
    SESSION41 NUMBER,
    SESSION42 NUMBER,
    SESSION43 NUMBER
    REPORT_DATE     REPORT_TIME     SESSION1     SESSION2     SESSION4     SESSION5     SESSION6     SESSION7     SESSION8     SESSION9     SESSION10     SESSION11     SESSION14     SESSION15     SESSION16     SESSION17     SESSION18     SESSION19     SESSION20     SESSION21     SESSION22     SESSION23     SESSION24     SESSION25     SESSION26     SESSION27     SESSION30     SESSION31     SESSION32     SESSION35     SESSION36     SESSION37     SESSION38     SESSION40     SESSION41     SESSION42     SESSION43
    8/22/2011     7:01:00     2     1     2               2               1          2     1     2     1     1     1     1     1     2     1     1     0     1     2     2     0     1     1     2     2     2     2     1     1     2
    8/22/2011     7:15:41     1     2     2               2               2          3     1     2     2     1     1     1     1     2     3     1     3     2     2     5     1     1     2     1     2     1     2     1     1     1
    8/22/2011     7:30:45     1     1     4               3               2          3     2     2     3     2     1     2     2     1     2     1     2     2     2     2     2     3     2     1     2     2     2     2     1     2
    8/22/2011     7:46:10     1     2     1               2               2          2     3     3     3     1     1     3     4     3     1     5     3     3     2     2     3     3     2     3     3     2     3     2     2     2
    8/22/2011     8:01:05     5     5     7               4               2          3     3     5     2     6     2     3     2     3     4     4     3     3     4     4     2     4     3     4     2     3     4     3     3     4
    8/22/2011     8:15:48     2     4     4               4               5          3     3     3     3     4     3     4     4     4     3     3     5     4     4     4     7     3     3     4     3     3     3     5     4     5
    8/22/2011     8:30:50     4     5     3               5               4          3     5     5     5     4     5     5     6     5     4     6     7     3     3     5     7     5     4     4     4     4     5     8     3     4
    8/22/2011     8:45:42     4     7     5               5               6          5     4     5     4     4     6     4     6     4     7     5     4     4     7     5     7     5     5     5     6     3     7     6     5     5
    8/22/2011     9:01:24          5     6               6               5          3     6     8     6     7     6     4     5     4     7     7     5     6     4     7     5     4     5     4     4     5     6     11     4     6
    8/22/2011     9:15:56     5     6     4               4               4          6     6     4     13     5     8     5     4     6     3     5     4     6     8     5     5     6     7     5     5     7     5     7     6     8
    8/22/2011     9:30:45     7     7     5               5               12          7     4     5     5     6     15     8     6     7     9     9     5     6     5     5     6     5     5     8     9     9     7     5     7     8
    8/22/2011     9:45:41     5     10     7               8               7          6     7     5     6     8     8     7     7     9     5     6     7     9     7     8     6     11     6     10     8     10     6     12     9     12
    8/22/2011     10:01:00     8     5     5               9               6          7     6     7     5     7     7     7     9     6     6     7     7     7     11     8     7     8     10     8     6     5     7     6     9     6
    8/22/2011     10:16:16     6     8     6               14               9          7     7     10     8     8     23     11     16     6     6     4     8     10     9     7     7     10     7     14     12     7     5     10     11     6
    8/22/2011     10:31:09     7     9     8               9               8          7     8     8     9     7     20     11     6     8     9     9     11     8     14     11     12     7     8     7     12     10     12     8     7     11
    8/22/2011     10:46:11     7     8     10               8               12          7     7     9     8     9     8     11     10     12     9     8     9     7     8     6     8     9     10     10     9     8     9     18     7     9
    8/22/2011     11:01:10     8     7     6               9               13          8     10     9     11     9     10     8     7     8     11     14     6     9     12     8     8     7     17     13     12     7     16     19     14     9
    8/22/2011     11:15:40     11     12     9               10               10          11     8     10     9     10     10     8     7     9     8     10     6     10     11     10     8     13     14     8     10     13     9     10     12     10
    8/22/2011     11:31:45     8     7     10               11               10          12     11     11     8     13     30     11     8     8     8     7     8     12     7     10     9     10     12     15     11     11     10     9     9     11
    8/22/2011     11:46:05     9     7     8               7               12          6     11     8     6     9     8     10     7     8     14     9     8     13     8     23     13     7     12     8     12     8     12     10     9     9
    8/22/2011     12:01:22     9     10     10               11               11          10     13     7     9     13     11     11     10     10     8     10     13     12     12     11     10     8     7     8     10     9     20     23     10     9
    8/22/2011     12:16:02     8     9     11               10               9          11     12     9     22     9     7     7     6     9     10     11     9     8     9     8     25     6     9     10     12     18     16     10     7     7
    8/22/2011     12:31:11     18     11     8               14               9          11     5     8     9     7     8     7     8     7     21     10     13     7     6     10     8     7     10     8     7     10     7     10     10     10
    8/22/2011     12:46:15     10     7     11               12               8          13     16     14     23     10     8     10     11     33     9     15     13     16     14     9     10     25     11     7     11     11     9     9     11     8
    8/22/2011     13:00:57     13     16     8               10               16          12     6     9     10     7     22     11     11     8     7     15     8     11     10     14     8     15     9     10     10     10     10     8     8     9
    8/22/2011     13:15:57     6     21     14               26               7          10     9     13     10     12     13     7     8     18     11     10     10     9     25     17     8     21     7     11     7     18     17     9     17     6
    8/22/2011     13:30:53     9     12     6               5               9          14     6     9     7     15     10     6     8     12     8     9     7     9     10     12     7     8     13     11     13     7     8     10     7     10
    8/22/2011     13:46:05     6     13     8               9               10          10     8     22     8     11     8     10     10     11     8     10     6     9     9     8     8     7     11     7     9     8     8     7     10     8
    8/22/2011     14:00:46     13     8     8               11               9          12     8          9     14     9     9     11     14     10     9     11     14     8     16     23     9     6     12     8     8     9     9     9     18
    8/22/2011     14:15:46     8     13     9               7               9          29     7     9     18     10     10     7     9     9     17     10     10     10     12     10     13     12     15     7     12     8     13     9     8     9
    8/22/2011     14:31:13     9     11     11               20               10          9     8     9     9     9     8     25     9     7     11     8     9     10     12     7     10     23     11     9     10     9     10     9     9     9
    8/22/2011     14:45:52     9     12     12               13               25          11     17     8     12     9     11     10     11     10     11     8     21     11     8     7     9     25     11     10     11     10     13     11     8     8
    8/22/2011     15:00:52     7     33     11               9               7          12     9     11     12     10     34     10     11     9     7     9     11     10     9     29     11     10     13     8     10     13     17     15     14     12
    8/22/2011     15:16:16     8     10     6               25               13          10     9     9     13     13     15     10     10     17     8     12     10     11     61     9     9     9     26     10     10     12     10     11     13     9
    8/22/2011     15:31:07     9     10     9               11               11          9     14     14     12     12     19     12     8     11     11     9     9     12     0     11     10     7     24     11     11     9     19     22     10     9
    8/22/2011     15:45:44     7     10     9               25               14          11     23     10     34     11     7     8     7     7     15     16     8     5     9     9     10     10     7     9     7     7     10     10     21     13
    8/22/2011     16:00:59     27     9     12               10               11          9     16     16     16     19     10     10     11     9     7     17     10     10     6     27     11     12     9     20     9     10     18     12     12     9
    8/22/2011     16:15:42     12     9     8               8               9          18     10     9     25     11     8     8     16     10     13     11     23     33     12     8     11     20     9     8     9     22     10     8     11     10
    8/22/2011     16:31:03     10     10     9               14               9          14     10     15     9     14     9     10     11     22     8     9     10     13     8     10     10     8     11     13     10     9     11     10     11     9
    8/22/2011     16:45:44     10     9     10               11               13          10     10     12     8     9     10     9     16     7     8     9     8     14     7     10     11     5     7     11     8     9     10     11     20     11
    8/22/2011     17:00:46     9     12     10               9               11          7     12     10     9     7     11     8     9     7     8     12     10     10     8     15     12     12     8     6     6     10     9     10     9     9
    8/22/2011     17:16:04     7     7     7               20               9          9     9     8     9     8     10     20     8     17     31     10     10     9     8     17     9     8     8     16     8     6     14     10     9     9
    8/22/2011     17:31:22     6     7     9               9               8          6     8     7     8     9     5     18     8     7     8     7     7     12     13     11     16     8     7     25     9     8     22     12     14     10
    8/22/2011     17:45:56     12     6     11               8               8          8     7     6     7     7     7     15     9     8     10     10     13     14     5     9     9     19     9     6     5     14     17     9     14     6
    8/22/2011     18:00:53     8     8     6               8               7          8     5     8     6     7     6     8     16     5     7     7     9     15     8     8     6     8     6     8     9     7     10     7     6     10
    8/22/2011     18:16:04     6     7     6               19               12          12     9     9     8     6     6     7     12     8     7     7     5     6     7     7     7     10     6     7     8     6     6     6     6     9
    8/22/2011     18:31:00     7     6     9               6               11          6     6     6     6     9     6     5     7     7     12     9     18     8     5     5     5     7     5     6     10     6     10     10     15     8
    8/22/2011     18:45:43     17     13     22               11               5          6     6     6     12     4     5     5     5     4     5     5     9     8     4     6     7     5     6     6     7     5     6     7     6     5
    8/22/2011     19:00:57     7     7     4               7               15          17     6     7     10     8     4     6     6     4     5     6     5     13     7     5     6     3     5     5     6     6     16     7     6     4
    8/22/2011     19:15:47     5     4     6               5               4          4     4     4     6     3     5     5     6     4     3     10     6     6     4     7     5     6     6     6     7     5     4     4     8     5
    8/22/2011     19:30:39     5     5     7               4               8          12     3     5     3     5     6     6     4     5     4     4     5     6     4     6     5     4     4     6     7     4     4     6     4     3
    8/22/2011     19:45:39     5     5     15               5               6          6     6     4     5     8     6     6     6     4     6     5     7     4     3     5     3     3     3     4     6     7     6     4     5     5
    8/22/2011     20:01:02     3     4     4               5               3          6     4     5     5     4     2     3     4     4     5     6     4     4     5     4     5     5     4     5     3     5     5     3     4     5
    8/22/2011     20:15:38     6     4     3               4               5          5     4     2     5     3     4     6     4     4     4     5     2     2     4     4     5     4     3     2     4     3     5     4     3     4in short table contains the information about some sessions.
    now i want the output like below, (highest session for the report_date and report_time with the name of session)
    REPORT_DATE     REPORT_Hour     SESSION_CODE     SESSION_VALUE
    8/22/2011     7     Session30     5
    8/22/2011     7     Session24     5
    8/22/2011     8     Session41     8
    8/22/2011     9     Session19     15
    8/22/2011     10          
    8/22/2011     11          
    8/22/2011     12          
    8/22/2011     13          
    8/22/2011     14          
    8/22/2011     15          
    8/22/2011     16          
    8/22/2011     17          
    8/22/2011     18          
    8/22/2011     19          
    8/22/2011     20          How can i get using sql query.
    Any help appriciated.

    In version 11 you can use UNPIVOT.
    A sample with just three columns:
    SQL> with sessioninfo as (
      2     select date '2011-08-29' report_date, '7:12:34' report_time,
      3            1 session1, cast(null as number) session2, 11 session3 from dual union all
      4     select date '2011-08-29' report_date, '7:56:00' report_time,
      5            4 session1, 2 session2, cast(null as number) session3 from dual union all
      6     select date '2011-08-29' report_date, '14:44:44' report_time,
      7            cast(null as number) session1, cast(null as number) session2, 2 session3 from dual
      8  )
      9  select
    10  report_date,
    11  substr(lpad(report_time,8),1,2) report_hour,
    12  max(session_code) keep (dense_rank last order by session_value) session_code,
    13  max(session_value) session_value
    14  from sessioninfo
    15  unpivot(
    16     session_value for session_code in (
    17        session1 as 'Session1',
    18        session2 as 'Session2',
    19        session3 as 'Session3'
    20     )
    21  )
    22  group by
    23  report_date,
    24  substr(lpad(report_time,8),1,2)
    25  order by
    26  report_date,
    27  substr(lpad(report_time,8),1,2)
    28  ;
    REPORT_D RE SESSION_ SESSION_VALUE
    11-08-29  7 Session3            11
    11-08-29 14 Session3             2For your 43 columns you just need to expand the list in lines 17,18,19 - the rest will work fine.
    (Your best way would actually be to change your datamodel to be more useful in a relational database - having columns session1, session2,...,session43 is not a very useful datamodel. Storing a timestamp in a VARCHAR2 is also not very good for the database.)

  • Query Required To Get the datetime of insertion of row..urgent

    Hi all,
    i'm in great need to know if i can get the datetime of the rows inserted. please note that no audit trail neither db level or application level exists. i just want to know whether we can get to know which data has been inserted/updated during a month. because ultimately, the job is to find the rate of growth of data in a table in every month so as to plan for storage for next 5 months.
    thanx in advance

    Hi,
    you can Tracl these things by Columns like inserted_date and Modified Date to the tables.
    So when ever the New Data is Inserted into the respective columns and Updated The Modified Date Column Whenever the data is Updated.
    You can track by above method..
    Thanks
    Pavan Kumar N

  • Help required to get data from Cash Mgt

    Hi
    I need help to get following data from cash managemment .
    Bank Name
    Branch
    Account#
    Date
    cheque#/Ref
    Amount Direct Debited by bank
    Amount Direct credeted by bank.
    Kindly help
    Regards

    Hello.
    See if this helps. When the Amount column shows a negative number it represents a Debit.
    select b.bank_account_name "Bank Account" ,
    bb.bank_branch_name "Branch",
    b.bank_account_num "Bank Acc Num",
    l.trx_date "Date",
    l.trx_type "Type",
    l.trx_text "Description",
    l.amount "Amount"
    from ce_statement_headers_all h,
    ce_statement_lines l,
    ap_bank_accounts_all b,
    ap_bank_branches bb
    where b.bank_account_id = h.bank_account_id
    and l.statement_header_id = h.statement_header_id
    and bb.bank_branch_id = b.bank_branch_id
    and b.bank_account_id = <bank_account_id>
    and h.statement_number = <'statement number'>
    Octavio

  • Not able to get data in production client in BEX query

    Hi Experts,
                       I have an SD related query which is working fine in development.
    in production while i run the query iam not getting data for three fields "ship to party" , "Bill to party" and "sold to party.
    I am able to see the data at the cube level but it is not reflecting in the query. Transportation of this query also
    did not throw any errors. Please provide a solution.
    Regards,
    susheeth.
    Edited by: Susheeth on Aug 4, 2011 1:26 PM

    Hi,
    Check if the characteristics used in query are direct objects from cube or navigation attributes of any other characteristics. In case of navigation attributes you need to have master data maintained.
    And as mentioned by Vamsi, check the text data maintained for 0CUSTOMER. And for checking data you can mark Key and Text option.
    Regards,
    Durgesh.

  • Use destination table values in source to get data

    I have a requirement to get data from source table to destination table. Source is oracle say tablename - 'orasource' fielnames=empid, empname and destination table name is 'sqldest' and field name are empid, empname.
    My requirement - I want to fetch only those rows from source based on destination table 'sqldest' and field name is empid. How do I do this?

    I am desperatly looking help...
    Approach 1 - created two variables - oraquery string, empid string
    step1 - ms sql database - created sql task - declare @empid varchar(max)
    SELECT @empid=
    Stuff((SELECT ',' + empid
            FROM  
            (SELECT  DISTINCT  convert(varchar(10),empid ) empid FROM emp
             ) x
            For XML PATH ('')),1,1,'')
    select @empid =    '(' +  @empid + ')'
    select @empid
    resultset=singlerow
    resultset=resultname=0; variablename=User::empid (empid is declared as string)
    step2 - oracle database - created data flow task
    created oledb source
    I put  this statemnt in oraquery expression - "select * from dept where dept in  "
    +  @[User::empid] + "
    expression=true
    [OLE DB Source [1]] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E14.
    An OLE DB record is available.  Source: "Microsoft OLE DB Provider for Oracle"  Hresult: 0x80040E14  Description: "ORA-00936: missing expression
    If I put this statement in above, then it is working fine.
    SELECT  top 10 convert(varchar(10),empid ) empid FROM emp
    Approach-2
    created three variables - oraquery string, empid  int, loop object--when I put int then it is automatically setting to 0
    step1 - ms sql database - created sql task - SELECT  DISTINCT  convert(varchar(10),empid ) empid FROM emp
    resultset=fullresult
    resultset=resultname=0; variablename=User::loop 
    step2 - created a for each loop container
    for loop editor - for each ado ennumerator
    enumerator configuration - loop
    variablemapping - variable=empid;index=0
    step3 - oracle database - created data flow task (outside for each loop. If I put inside it is taking long time)
    created oledb source
    I put  this statemnt in oraquery expression - "select * from dept where dept in  "
    +  @[User::empid] + "
    expression=true
    Data inserting in a destination table but  empid=0.

  • Single query to get data from different databases

    i need to capture certain fields from certain tables in database 1 and certain fields from certain tables in database 2 into one file using a single SQL statement.
    i tried searching on the net
    i found that dblinks can help
    but iam not sure if ill be able to create dblinks in my situation which is:
    i need to get data from oracle to be copied to mysql
    this is not a replication acitivity, but i need certain fields from one database and certain from the other
    so what iwas thinking is, if i use an sql query to get all the fields (i need around 40) from the different oracle databases and create a singlefile with one insert per select, i can then read that file into mysql
    instead of creating multiple sql queries for each table and creating separate files and eventually separate tables in mysql.
    can anyone help me here?
    or maybe suggest another approach.
    thanks

    Hi,
    I think dblink is the only option available to get data from different databases. It will work for your case too.
    CREATE DATABASE LINK db_link CONNECT TO user_name IDENTIFIED BY  password USING 'instance_name'you must have the system privilege 'create database link' to create db links. This way you can get the required data and put it in a table in oracle. But i dont know how to put this data from oracle table to Mysql.
    HTH
    Muneer

  • Error in abap query sq03,02,01(to get data from structure) it is possible?

    hi
    experts,
    i am developing a report using abap query .(stand t code is s_alr_87012277 it contain more fields but i want only 4 fields , i found 2 but remaining 2 are from structure)
    my problem is that debit and credit amount is in structure
    how  i can get data from structure(FAGL_S_RFSSLD00_LIST )
    solbm = debit.
    habbm  = credit.
    report is like
    op.
    gl acc no, discription, credit amount,debit amount.

    Hi ajay,
    try to use with  logical database  SDF.
    assign the logical database name in info set.
    gl acc no    -               SKA1-SAKNR
    debit.         -     Field: um02h
    credit.        -     field:  um02s 
    discription  -               SKAT-TXT20
    regards,
    sateesh.

  • Abnormal, Same query get data in sql but not working on Fron-end

    Dear,
    Version :Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    We have created packed in oracle database befor two months ago & was working fine, but since morning select statment in package is not working while running via application which mentioned below and raise not data found but surprising thing is that same query is getting data when we execut on sql plus return one record.
    i don't know either it's abnormal behaviour or sth else becuase the same query run without changing any singl column in where_clause work in sql but not getting data while submition request through oracle application and raising not data found.
    --thankse
    Edited by: oracle0282 on Dec 29, 2011 2:20 AM

    Actully when i run this query in sql it return one record on the same parameter, while when we exeucte this select in pl/sql on the same parameter oracle raise no data found error.
    so i got confused the same query with same parameter retur record in sql but when we call it fron-end through packege raise 'no data found error'.
    hope you understand now.
    --thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Camel Query : Calender list : Get Items agains given date that must be greater than and eqaul to start date and greater less than or equal to end date ?

    Camel Query : Calender list : Get Items agains given date that must be greater than and eqaul to start date and greater less than or equal to end date ?
    A Snap of Employee holiday list
    Case : Anne juul Sondergaar is on leave from 05-06-2014 to 07-06-2014
    I need a query to check wheither Anne juul is on leave at 06-06-2014 ????
    I am using this query that return nothing
    SPQueryquery =
    newSPQuery();
                                query.Query =
    @"<Where>
    <And>
    <And>
    <Leq>
    <FieldRef Name='Til' />
    <Value Type='DateTime'>"
    + WorkingStartDate.ToString("yyyy-MM-dd")
    + @"</Value>
    </Leq>
    <Geq>
    <FieldRef Name='Fra' />
    <Value Type='DateTime'>"
    + WorkingStartDate.ToString("yyyy-MM-dd")
    + @"</Value>
    </Geq>
    </And>
    <Eq>
    <FieldRef Name='Medarbejdere' />
    <Value Type='Lookup'>"
    + EmployeeName.Trim() +
    @"</Value>
    </Eq>
    </And>
    </Where>"
                                query.ViewFields =
    " <FieldRef Name='ID' />";
    Ahsan Ranjha

    Hello,
    Download CAML query builder from below location and use it to build your query:
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/f7b36ebc-6142-404a-8b04-9c87de272871/where-can-i-download-the-u2u-caml-query-builder-for-sharepoint-2010may-i-know-the-exact-link?forum=sharepointgeneralprevious
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Required function module to get date one year in the past.

    Hi,
    Required function module to get date one year in the past.
    Thanks and regards,
    M.R.Reddy.

    Hello,
    You can check this:
    DATA:
    V_DATE1 TYPE D,
    V_DATE2 TYPE D.
    V_DATE1 = SY-DATUM.
    TRY.
        CALL METHOD CL_HRPAD_DATE_COMPUTATIONS=>SUBTRACT_YEARS_FROM_DATE
          EXPORTING
            START_DATE = V_DATE1
            YEARS      = 1
          RECEIVING
            DATE       = V_DATE2.
      CATCH CX_HRPA_VIOLATED_POSTCONDITION .
    ENDTRY.
    WRITE:
    / V_DATE1, / V_DATE2.
    Hope this helps.
    Br,
    Suhas

  • Bapi to get data from BW query

    Hi,
    Does anyone familiar with bapi function to get data from BW query .???
    I'm trying to use  RS_VC_GET_QUERY_VIEW_DATA_FLAT  but i get only the SUM rows of the query
    and not the details rows (drill down).
    i want to export the data of BW query to table and i need all the query data.
    if someone have an example or documention its will be great.
    Thanks.

    Hi,
    Does anyone familiar with bapi function to get data from BW query .???
    I'm trying to use  RS_VC_GET_QUERY_VIEW_DATA_FLAT  but i get only the SUM rows of the query
    and not the details rows (drill down).
    i want to export the data of BW query to table and i need all the query data.
    if someone have an example or documention its will be great.
    Thanks.

  • Requirement to get Inventory data at the Daily level (non-cumulative KF)

    Hello All,
    Kindly provide ur suggesstions on the issue mentioned below:
    We require the Inventory data at a daily level. Also we require that the non-cumulatve Key Figures such as 0TOTALSTOCK, etc. be available to us in the BW itself, since this is required for further processing.
    PS: Right now we are using RSCRM_BAPI to execute the qurey and store the data into a table, but it fails for non-cumulative keyfigures. Kindly suggest if ther are other ways which can suffice the requirement mentioned above.
    Thank you.
    Regards,
    Kunal Gandhi

    Another one?
    You should read this link: https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement

  • How to get data back from an action ?

    Hello,
    Would it be possible to get data back from an action (out of the question EO_MESSAGE & ET_FAILED_KEY )?
    For example we got an order with order positions and we need a "function" to e.g. count all positions. Because of Performance the function should not be processed each time the order is changed, read or a position is added. Instead the function should be processed only if it was called explicitly.
    Is it possible to create a kind of action which is actually counting all entries and export the number of them?
    How to mark a parameter in is_parameters as exporting?
    Is this just done by (naming-) convention?
    What is the preferred way to have “methods” with returning/exporting values?
    Regards,
    Lorenz

    Hello Lorenz,
    As you have already figured out , the Action API provides you with only the messages and failed keys if any.
    Post action execution , you can always execute a retrieve or retrive by association , to get the latest buffer snapshot , which of course would include the changes that you have made in your action.
    If you want to ensure that users have explict control on execution of your "fucntion", then of course , you should model it as an action on the BO.
    The parameter is_parameters is an IMPORTING parameter. You CANNOT use it to export anything back from the action. For importing ,  you can of course have any structure to use as the is_paramaters , which you model as the action parameter structure which modelling your BO action.
    From an external entity the only way to interact with a BO is by consuming the BO services and you are bound by the BOBF standard interfaces. Any and all data you require needs to be modelled as node attributes ( persistent or transient ) and fetched using the RETRIEVE, RETRIEVE_BY_ASSOCIATION or QUERY services.
    Regards,
    Indranil.

Maybe you are looking for